AI terminal copilot: fixes failed commands and answers plain thoughts (claude/codex), with an arrow-key run menu
Project description
AITERMITE
AITERMITE is an AI terminal copilot for Windows, macOS, and Linux. It does two things:
- Fixes failed commands — manually, before Enter where the shell supports it, and automatically after a command fails through shell hooks.
- Answers plain thoughts — type a question at your prompt with no command and no prefix; AITERMITE recognises it as natural language, asks Claude or Codex, and if the answer contains runnable shell commands, an arrow-key menu lets you confirm and run one.
Ask mode (new in v0.5.0)
Just type what you're thinking and press Enter:
$ how do I list the 5 largest files here
AITERMITE · claude
The classic way with find:
find . -maxdepth 1 -type f -printf '%s %p\n' | sort -rn | head -5
↑/↓ move · Enter run · e edit · q cancel
› [medium] find . -maxdepth 1 -type f -printf '%s %p\n' | sort -rn | head -5
[medium] du -ah . | sort -rh | head -5
- No prefix needed. A failed line that looks like natural language is routed to the AI instead of the typo fixer (a real-command typo like
gti statusstill goes to the fixer). - Or be explicit:
ai how do I tar a folder/aitermite ask "how do I tar a folder". - Backends, auto-detected: the installed
claudeCLI, thencodex, then a localollama. No API keys required when a CLI agent is signed in. Force one with--ask-provider claude|codex|ollamaorAITERMITE_ASK_PROVIDER. - Arrow-key run menu with per-command risk badges.
Enterruns the highlighted command through your shell,eedits it first,qcancels. Commands matching dangerous patterns (e.g.rm -rf /) are shown but blocked from running. --jsonprints the answer and extracted commands instead of opening the menu (handy for scripts and CI).
Current packaged release
Latest PyPI release: v0.5.0 Ask Mode.
Main features:
- Ask plain thoughts at the prompt — no command, no prefix.
- Answers from the
claude/codexCLIs (auto-detected), or localollama. - Arrow-key menu to confirm and run commands found in the answer.
- Manual command fixing with
aitermite. - Inline fixing with
aitermite <command>. - Automatic post-failure suggestion hooks.
- Pre-enter typo detection where supported.
- Ollama local provider support.
- OpenAI fallback support.
- Heuristic offline fallback.
- Windows PowerShell / Windows Terminal support.
- macOS/Linux zsh, bash, and fish support.
- cmd.exe helper macros.
- Clink bootstrap integration for true cmd.exe auto-hooks.
- Secret redaction before provider calls.
- Dangerous command blocking and safety checks.
Install from PyPI
python -m pip install aitermite
aitermite --doctor
Upgrade to the latest published version:
python -m pip install --upgrade aitermite
aitermite --version
Install a specific version:
python -m pip install aitermite==0.5.0
Quick start
aitermite --doctor
aitermite git push # fix a command
aitermite ask "how do I tar a folder" # ask a thought, get an arrow-key run menu
ai how do I free up disk space # 'ai' alias, after shell integration
aitermite --precheck gti status
aitermite --install-shell auto
After shell integration, restart the terminal. AITERMITE then prints suggestions after failed commands, and — where the shell hook is supported — routes a plain natural-language line straight to the AI ask flow with no command or prefix.
Install from wheel
python -m pip install aitermite-0.5.0-py3-none-any.whl
aitermite --doctor
Install from source
git clone https://github.com/sathkruthdamera/AITERMITE.git
cd AITERMITE
python -m pip install -e .
aitermite --doctor
Shell integration
aitermite --install-shell auto
Supported shell targets:
aitermite --install-shell zsh
aitermite --install-shell bash
aitermite --install-shell fish
aitermite --install-shell powershell
aitermite --install-shell cmd
aitermite --install-shell clink
aitermite --install-shell universal
Automatic post-failure behavior
Target behavior:
Wrong command entered -> command fails -> AITERMITE automatically prints suggestion
Example:
gti status
Output:
command not found: gti
AITERMITE suggestion after failed command
Typed: gti status
Fix: git status
Why: Known command typo detected.
Confidence: high (0.94)
Run manually: git status
Provider settings
export AITERMITE_PROVIDER=auto
export AITERMITE_POSTFAIL_PROVIDER=auto
export AITERMITE_POSTFAIL_TIMEOUT_MS=900
For Ollama:
ollama pull gemma3:latest
export AITERMITE_PROVIDER=ollama
export AITERMITE_OLLAMA_MODEL=gemma3:latest
For OpenAI:
export OPENAI_API_KEY="your_api_key"
export AITERMITE_PROVIDER=openai
Common commands
aitermite --doctor
aitermite git push
aitermite --json git push
aitermite --precheck gti status
aitermite --postfail 127 gti status
aitermite --install-shell auto
Safety
AITERMITE blocks or avoids risky commands such as destructive delete patterns, curl | sh, fork bombs, device writes, shutdown/reboot patterns, and unsupported shell control operators in auto-apply flows.
Validation from local build
CLI builtin typo tests: 2/2 passed
Precheck tests: 2/2 passed
Redaction tests: 1/1 passed
Safety tests: 3/3 passed
Ask provider tests: 5/5 passed
Command extraction tests: 7/7 passed
NL detection tests: 6/6 passed
Arrow-key menu tests: 6/6 passed
Total targeted tests: 32/32 passed
Pentest checks: passed
Editable install: passed
Wheel build: passed (aitermite-0.5.0-py3-none-any.whl)
CLI smoke test: passed
Version: 0.5.0
Repository import status
This repository has been initialized from ChatGPT. The full v0.4.2 source ZIP and wheel were generated in the workspace. Source import should include:
src/aitermite/
tests/
security/
examples/
assets/
README.md
pyproject.toml
LICENSE
FULL_DOCUMENTATION.md
CROSS_PLATFORM_SHELL_INTEGRATION.md
POSTFAIL_AUTOMATION.md
SHELL_AND_ANIMATION.md
VALIDATION_REPORT.md
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aitermite-0.5.0.tar.gz.
File metadata
- Download URL: aitermite-0.5.0.tar.gz
- Upload date:
- Size: 27.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8abf5c24b6a821ad1366f5544d2525d5e429606127a31c927115c48709269c98
|
|
| MD5 |
56818d404558b9b40e838fcb409d7367
|
|
| BLAKE2b-256 |
2c7ea6c0375fa931fd6cb2d34ac194c3a26d4d8902b775ecb304d1f07fe636a9
|
Provenance
The following attestation bundles were made for aitermite-0.5.0.tar.gz:
Publisher:
pypi-publish-python-package.yml on sathkruthdamera/AITERMITE
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aitermite-0.5.0.tar.gz -
Subject digest:
8abf5c24b6a821ad1366f5544d2525d5e429606127a31c927115c48709269c98 - Sigstore transparency entry: 1786671643
- Sigstore integration time:
-
Permalink:
sathkruthdamera/AITERMITE@b4a7c2cd19ac133d4c1bc1e76118d6e3b0bff122 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/sathkruthdamera
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish-python-package.yml@b4a7c2cd19ac133d4c1bc1e76118d6e3b0bff122 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file aitermite-0.5.0-py3-none-any.whl.
File metadata
- Download URL: aitermite-0.5.0-py3-none-any.whl
- Upload date:
- Size: 27.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
463e12c2903a2fc381598e1d8d4377992ecb4ad529dc2c2c4e986caf8e1e8175
|
|
| MD5 |
e8b362b773d4a3d62e316292cd5abaad
|
|
| BLAKE2b-256 |
75501a382ce95f07404ae2e740c0a971adf5bec4fec5dbc48678616bc3a7fd8b
|
Provenance
The following attestation bundles were made for aitermite-0.5.0-py3-none-any.whl:
Publisher:
pypi-publish-python-package.yml on sathkruthdamera/AITERMITE
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aitermite-0.5.0-py3-none-any.whl -
Subject digest:
463e12c2903a2fc381598e1d8d4377992ecb4ad529dc2c2c4e986caf8e1e8175 - Sigstore transparency entry: 1786671753
- Sigstore integration time:
-
Permalink:
sathkruthdamera/AITERMITE@b4a7c2cd19ac133d4c1bc1e76118d6e3b0bff122 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/sathkruthdamera
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish-python-package.yml@b4a7c2cd19ac133d4c1bc1e76118d6e3b0bff122 -
Trigger Event:
workflow_dispatch
-
Statement type: