Skip to main content

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/

Ape works with any provider supported by Pydantic AI — OpenAI, Anthropic, Google, Groq, Mistral and more.

To install (uv recommended):

uv tool install ape-linux

Next, set the API key for your provider using its standard environment variable. For example:

export OPENAI_API_KEY=key      # for OpenAI models
export ANTHROPIC_API_KEY=key   # for Anthropic models

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 ask for something that isn't a Linux command task:

ape Tell me about monkeys

Ape prints a short explanation to standard error and exits with status 2. Commands only ever go to standard output, so a refusal is never mistaken for one (and won't run if you pipe Ape into a shell):

ape: I can only help with Linux and Unix command-line tasks.

You can change the model with the APE_MODEL environment variable. Models are specified in provider:name form. See here for the supported providers and models. For example:

export APE_MODEL=anthropic:claude-sonnet-4-5

If APE_MODEL is unset, the default openai-chat:gpt-4.1 is used.

You can set the sampling temperature with the APE_TEMPERATURE environment variable (default 0.2). Some models — for example certain reasoning models — reject a temperature; set APE_TEMPERATURE=undefined to send none at all and let the model use its own default:

export APE_TEMPERATURE=0.7        # use a specific temperature
export APE_TEMPERATURE=undefined  # send no temperature at all

System-aware suggestions

Ape automatically detects a few facts about your machine and adds them to the prompt so the suggested command is correct for your environment — for example BSD (macOS) vs GNU (Linux) flags, the right package manager (brew, apt, dnf, pacman, ...), and tools that are actually installed. It looks at:

  • operating system and version (macOS version or Linux distribution),
  • whether the userland is BSD or GNU,
  • CPU architecture (e.g. arm64 vs x86_64),
  • your shell ($SHELL),
  • whether you are root,
  • available package manager(s) and common tools (rg, fd, jq, docker, ...).

This is all gathered locally with the Python standard library and is best-effort: if anything can't be determined it is simply left out. No identifying information is collected or sent — never your username, hostname, working directory, or home path.

To see exactly what Ape detects and sends (without calling the model), run ape-system-info:

ape-system-info

Output (example):

Operating system: Darwin
macOS version: 26.5
Userland: BSD (macOS) — prefer BSD-compatible flags
Architecture: arm64
Shell: /bin/zsh
Privileges: non-root (use sudo for privileged actions)
Package manager(s): brew
Available tools: rg, fd, jq, git, curl, docker, tar, rsync, sed, awk

See also: Gorilla

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.4.6.tar.gz (110.6 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.4.6-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ape_linux-0.4.6.tar.gz
  • Upload date:
  • Size: 110.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ape_linux-0.4.6.tar.gz
Algorithm Hash digest
SHA256 cd6734c55c14b4c766d72044af99ff92289a759e82e6ae80493173656eab5708
MD5 a994c11b900521121286c07089b4872e
BLAKE2b-256 4e0c5f9c4610dd27b758746278e45e5a04e31b12f93a849485cc88b97535eb00

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ape_linux-0.4.6-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ape_linux-0.4.6-py3-none-any.whl
Algorithm Hash digest
SHA256 3a5e1c48bb5226f00c41a5ff00d067a5539a45c9d1b9d81e6856825ef3350b79
MD5 924861941cfbae01cad2fa2994bd7054
BLAKE2b-256 2ffa7c6cda344e93b0105f938b666ce3de10534b66b679ee4e54c5fd6a31c135

See more details on using hashes here.

Release history Release notifications | RSS feed

0.5.1

2 files

0.5.0

2 files

This release

0.4.6 This release

2 files

0.4.5

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page