Cliffy / Field manual / v0.1.0

Make the shell yours.
Keep the final say.

A practical guide to installation, provider setup, and deliberate command drafting. Cliffy proposes; you review and execute.

Python 3.10+Bash 4+ for native modeLinux · macOS with newer Bash · WSL
01 / Start here

Install the package.

Download the wheel (or source archive) and optionally verify it against SHA256SUMS. Cliffy requires Python 3.10 or newer. It is not published on PyPI; install your downloaded file, not a similarly named registry package.

Virtual environment

Run this in the folder containing your downloaded wheel. Activate the environment again in each new terminal where you use Cliffy.

Terminal / Bash
python3 -m venv .venv
. .venv/bin/activate
python -m pip install ./cliffy_ai-0.1.0-py3-none-any.whl
cliffy --version

Prefer isolated global commands? If pipx is installed, use pipx install ./cliffy_ai-0.1.0-py3-none-any.whl. You can also inspect the source on GitHub and install from an extracted source directory.

02 / Your account

Bring your own provider.

Every user needs their own provider account and API key. Select a provider and model supported by your account; you are responsible for any provider charges. Default models and availability can change. Cliffy has no hosted model and this site never asks for, receives, or stores your key.

Provider environment variables and current default models
CLIFFY_PROVIDERKey variableDefault CLIFFY_MODEL
groqGROQ_API_KEYllama-3.1-8b-instant
openaiOPENAI_API_KEYgpt-4o-mini
anthropicANTHROPIC_API_KEYclaude-sonnet-4-5
geminiGEMINI_API_KEYgemini-2.5-flash
apinexAPINEX_API_KEYfree/glm-5.3-flash
customCUSTOM_API_KEYSet model and base URL yourself

Set your key without printing it

In Bash, the hidden prompt below keeps the value out of your typed command history and suppresses terminal echo. Obtain the key from your provider, not from Cliffy. These exports last for this terminal session; native drafts use exported variables, not a project .env file.

Example / Groq
export CLIFFY_PROVIDER=groq
export CLIFFY_MODEL=llama-3.1-8b-instant
read -rs -p 'Groq API key: ' GROQ_API_KEY; echo; export GROQ_API_KEY

For another provider, substitute its name, key variable, and an available model. CLIFFY_API_KEY is also supported as a generic key override. Never paste a literal key into a command, screenshot, repository, or prompt.

Custom OpenAI-compatible endpoint

A custom provider additionally requires an endpoint and model. Replace the example URL and model with your provider's actual values.

Example / Custom
export CLIFFY_PROVIDER=custom
export CLIFFY_BASE_URL='https://your-provider.example/v1'
export CLIFFY_MODEL='your-model-id'
read -rs -p 'Custom API key: ' CUSTOM_API_KEY; echo; export CUSTOM_API_KEY

cliffy --check-api is an optional, billable live request, not just a local configuration check. The free/ prefix of an APInex model does not guarantee no charges: verify entitlement and terms with the provider.

03 / Recommended

Draft inside real Bash.

With your provider configured, launch an independent native Bash child session. This needs Bash 4+ on Linux, macOS with a newer Bash installed, or WSL. It loads ~/.bashrc, does not edit your profiles, and leaves your normal terminal tab unchanged.

Terminal / Launch
cliffy --shell bash
  1. Type a natural-language task, such as show current directory, without pressing Enter.
  2. Press Ctrl+G to request a draft. No AI request happens before this shortcut.
  3. Review or edit the inserted command. Press Enter to execute it, or Ctrl+C to cancel. Cliffy never executes the AI draft automatically.

Ordinary commands are interpreted by Bash. Aliases, source, export, shell functions, and jobs behave normally in this child. exit returns to your parent shell; the child's working directory and environment are not handed back. Files are still shared with your user account. This is not a sandbox.

The opt-in plugin replaces Ctrl+G in the emacs and vi-insertion keymaps. It does not bind Enter, Tab, or Right. A failed or canceled draft retains the original request; discard or edit it rather than pressing Enter on natural-language text.

Already in Bash? source <(cliffy --shell-init bash) activates drafting in that existing session. For a printed draft without execution, use cliffy --draft 'show current directory'. Neither native Zsh integration nor native inline ghost text is implemented yet.
04 / Alternate mode

Use the interactive assistant.

Launch cliffy for the existing Python interactive assistant. It supports inline ghost suggestions (accept with Tab or Right at the end of the line), file completion, and reviewed AI workflows:

  • % <task> drafts one editable command.
  • %% <task> guides a multi-step task with per-step confirmation.
  • %%% <task> opens interactive coding with filename and overwrite review.
  • ai: <task> generates a unique code file without running it.

This mode is not a full login shell. Simple cd, export, and unset persist inside Cliffy, but compound cd x && command runs in a subprocess. Aliases, source, and other subprocess shell state do not persist. Prefer native Bash when you need actual shell state.

05 / Read before prompting

Know what leaves your machine.

For a native draft, the explicit task and current working directory are sent to the selected provider, not your whole shell environment. In the assistant, text used for AI suggestions or generation may be sent too. A manually entered prompt can contain secrets: never put credentials or private data into AI requests.

The assistant may store commands in local ~/.ai_shell_history and metadata/errors in ~/.ai_shell.log; keep them private and inspect before sharing diagnostics. Your Bash history follows your own Bash configuration. Secret-detection and safety checks are heuristic, not security guarantees. Review generated commands, destinations, and files. cliffy --no-ai disables provider requests; CLIFFY_NO_AI=1 also opts out of suggestions and generation.

06 / When things stall

A short diagnostic desk.

Why is the provider unavailable?

Check the exported provider key, CLIFFY_PROVIDER, CLIFFY_MODEL, and custom CLIFFY_BASE_URL if applicable. --no-ai disables requests. If you choose to run cliffy --check-api, it sends a live request that may incur charges.

What do HTTP 401/403, 429, or timeout mean?

401/403 usually indicates key or account access trouble; 429 indicates a rate limit or cooldown. For slow suggestions, consider CLIFFY_SUGGEST_TIMEOUT=20 and verify the provider endpoint and model. Do not reduce spacing below your provider quota simply to hide latency.

Is APInex free and automatically retried?

Check current account terms. Its documented free tier has 5 requests/minute per IP; Cliffy defaults to 12.1 seconds between APInex dispatches. Native drafts run separate helper processes, so spacing is not shared across tabs or invocations. Other apps on the same IP can still trigger 429. Cliffy does not automatically retry or switch to a paid model.

How do I remove Cliffy?

Exit the native child to remove that session's activation. Use pipx uninstall cliffy-ai for a pipx install, or python -m pip uninstall cliffy-ai inside the virtual environment. Activation sourced into an existing shell ends when that shell session ends.

Still stuck? Read the project README for additional flags and details.