Skip to main content

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 (uv recommended):

uv tool 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

ape_linux-0.3.3.tar.gz (29.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ape_linux-0.3.3-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file ape_linux-0.3.3.tar.gz.

File metadata

  • Download URL: ape_linux-0.3.3.tar.gz
  • Upload date:
  • Size: 29.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.6.17

File hashes

Hashes for ape_linux-0.3.3.tar.gz
Algorithm Hash digest
SHA256 70ae8d690181e9474ffc3756b56d53c80a1abce8fe6cdc3dab0ec9dc2f6a8ab6
MD5 f407392cfc2ff050732b5af58f7c9521
BLAKE2b-256 443e772f305cb9d98ae73208e31b6ba49fd8c8de37ab203b78fd132a89bed9ba

See more details on using hashes here.

File details

Details for the file ape_linux-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: ape_linux-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.6.17

File hashes

Hashes for ape_linux-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d9eab0d0b5435a194c9fe85cdd317a27d43c650d2b35bc8cc7e5c9100ffdab0c
MD5 b431db53efb0ce44f0e92930978d96e1
BLAKE2b-256 5d3118ab542983dc941cad2378edc031f2ff5d5a61fa798d3e87d405d3d62f5f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page