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 OpenAI API key:
export APE_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
or -m
. 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
or -e
, 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
Built Distribution
File details
Details for the file ape_linux-0.2.1.tar.gz
.
File metadata
- Download URL: ape_linux-0.2.1.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.14 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a62041f6d6971d4ede622a0642afd676ed11520e8421e1dd2307582c4c3d059c |
|
MD5 | 9d982cd0e30c02ce39f6d1659b091bd9 |
|
BLAKE2b-256 | 2435ca1953ec2cea814b30fe1ae134f47bc4f2bad5a27f89f6453132cf352593 |
File details
Details for the file ape_linux-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: ape_linux-0.2.1-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.14 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18bc665659906a1d9e0e0325a0525ffbbb5f227f1b5d621f2189790aab0ff8e4 |
|
MD5 | 262eacd42f5d7cf95e7539dc8e0cd777 |
|
BLAKE2b-256 | 59cfd455b8bdeaba25ae4ba4d147dc06541cd4225d7303b1416377622ff6171e |