Git Product home page Git Product logo

ape's Introduction

Ape

Ape is an AI for Linux commands.

ape "Find all the important PDF files in user/projects. An important PDF file has 'attention' in its name. Write the results to important_files.txt and then move it to Documents."

Output:

find ~/user/projects -type f -name "*attention*.pdf" > important_files.txt && mv important_files.txt ~/Documents/

Currently, only OpenAI is supported.

To install:

pipx install ape-linux

Next, set your API key:

export OPENAI_API_KEY=key

To run:

ape "Create a symbolic link called win pointing to /mnt/c/Users/jdoe"

Output:

ln -s /mnt/c/Users/jdoe win

Another example:

ape "Delete all the .venv directories under projects/"

Output:

find projects/ -type d -name ".venv" -exec rm -rf {} +

If you try to ask something unrelated to Linux commands:

ape "Tell me about monkeys"

you should get:

echo "Please try again."

You can change the model using --model. The default is gpt-4o. See here for a list of models. For example:

ape "List the contents of the working directory with as much detail as possible" --model gpt-3.5-turbo

Output:

ls -lha

If you pass --execute, the tool will run the command for you after printing it! Be careful with this as LLMs often make mistakes:

ape "Who am I logged in as?"

Output:

whoami
jdoe

For more help:

ape --help

See also: Gorilla

ape's People

Contributors

sbalian avatar

Stargazers

Jack Butler avatar Tom Begley avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.