AI for Linux commands
Project description
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, you should get "Please rephrase." printed:
ape "Tell me about monkeys"
Output:
Please rephrase.
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ape_linux-0.1.1.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for ape_linux-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 060369b8cec4091f530e1ea0d4eba8309b19738df7c0cf1ffaeb7f82cfd7edc4 |
|
MD5 | 92470b7eb07fbd662be38c5cc9b7094e |
|
BLAKE2b-256 | 6736293c2dba3f7064df82a69a5d4b7bc47a05f24ee3cc1cfb8fa7a53a35704a |