Skip to content

amplihack CLI Reference

Complete command-line reference for the amplihack top-level command.

Contents


Synopsis

amplihack [--version] [--help] <subcommand> [<args>]

Running amplihack with no subcommand launches Claude Code directly. In user-facing docs, prefer the explicit amplihack claude form; amplihack launch remains a compatibility alias.


Global Flags

These flags are accepted before any subcommand.

Flag Description
--version Print amplihack <version> to stdout and exit 0.
--help, -h Print a brief usage summary and exit 0.

--version

Prints the installed version string and exits immediately. No network requests, no configuration loading.

amplihack --version
# amplihack 0.9.2

The version string comes from the __version__ attribute in amplihack/__init__.py, which is set from pyproject.toml at build time. It follows Semantic Versioning.


Subcommands

Subcommand Description
version Show amplihack version.
agent-binary Print the agent CLI that agent steps would run under, and why. --shell prints env -u <each session marker> AMPLIHACK_AGENT_BINARY=<cli> AMPLIHACK_AGENT_BINARY_SOURCE=<tag>, a prefix for a command started with tmux new-session, which gets the tmux server's environment rather than the caller's. The env -u part removes the markers the server holds from whatever started it, and the parent-watch variables AMPLIHACK_PARENT_RECIPE_PID, AMPLIHACK_PARENT_RECIPE_STARTTIME and AMPLIHACK_AUTODRIVE_STATE_DIR (#1976), and AMPLIHACK_RUN_GUIDANCE_DIRS (#2535), so use the line inline, inside the double-quoted tmux command, rather than rebuilding it with tmux new-session -e, which cannot unset a variable; see Active Agent Binary.
wait Sleep for --seconds N (0 to 86400) inside the amplihack process, then exit 0. Starts no child process and prints nothing. Use it instead of tail -f /dev/null or timeout N tail -f /dev/null, which the pre-tool-use hook denies; to wait for a command, run it in the background and use wait $pid. See Wait Without Leaving Orphan Processes.
install Install amplihack agents and tools to ~/.claude.
uninstall Remove amplihack agents and tools from ~/.claude.
directory Search installed skills and agents with find WORD.... Use enable NAME or disable NAME to change persistent extensions to the default lists for installed tools. See directory command.
update Self-update the amplihack binary, then automatically run install to refresh framework assets. Pass --skip-install (alias --no-install) for a binary-only update.
claude Launch Claude Code. Preferred explicit launcher in user-facing docs.
launch Compatibility alias for claude; amplihack with no subcommand also launches Claude Code.
RustyClawd Launch RustyClawd (Rust implementation).
copilot Launch GitHub Copilot CLI.
codex Launch OpenAI Codex CLI; --reset-recovery preserves a pending recovery journal before startup; --local-model NAME starts Codex for a local model with its own Codex home.
amplifier Launch Microsoft Amplifier with amplihack bundle.
uvx-help Get help with UVX deployment.
plugin Install, uninstall, and list amplihack plugins.
memory Manage the amplihack memory backend.
new Generate a new goal-seeking agent.
recipe Run, list, validate, inspect and stop workflow recipes. recipe guide <session \| run-id \| issue \| pr-url> [-] [--file <path>] adds an operator instruction, read from stdin or a file, that every later agent step of a running build or drive receives, finding the run from its start-time record; see amplihack recipe guide.
mode Claude installation mode commands.
fleet Manage coding agents across VMs.
agent Register long-lived Claude sessions and resume them from their saved conversation after a terminal loss. amplihack claude --supervise NAME registers a session as it starts.

See the documentation for each subcommand:

codex

Launches Codex after reconciling Amplihack's native plugin and hooks.

amplihack codex [--reset-recovery] [--local-model NAME] [other amplihack options] [-- <codex arguments>]
Flag Description
--reset-recovery Archive a pending Codex recovery journal, then continue launch.
--local-model NAME Launch for a local model. NAME is the Codex profile <user Codex home>/NAME.config.toml. Also set by AMPLIHACK_CODEX_LOCAL_MODEL; the flag wins. Not allowed with --docker or --auto; Unix only.

The reset flag must precede native arguments and the explicit -- separator. Amplihack consumes it immediately after parsing, before client resolution, startup updates, self-healing or reconciliation. A reset failure stops before updates can install assets. It is not forwarded to native Codex, auto-mode or Docker launches. A token after -- belongs to Codex and does not reset recovery.

Reset preserves $HOME/.amplihack/codex/pending.json byte for byte as pending.json.stale-<UTC stamp> in the same directory, using a collision suffix when necessary. It accepts safely accessible malformed journals. It changes recovery metadata only; normal launch still enforces configuration, package and ownership checks. CODEX_HOME selects Codex targets, defaulting to $HOME/.codex, and does not change the metadata location.

Successful archival emits one recovery status line: amplihack: preserved Codex recovery journal: followed by the preserved path. With nothing to archive or resume, reset reports amplihack: no pending Codex recovery journal. Both cases continue normal launch. Archival errors stop launch and identify the affected path and corrective action.

amplihack codex --reset-recovery -- exec "Summarize the public interfaces without changing files"

The recovery status appears before the unattended task starts; the task returns the repository summary. See recovery steps and ownership and archival guarantees.

--local-model NAME starts Codex on a Codex home that amplihack builds at ~/.amplihack/codex-local/NAME/ from the profile, in place of the plugin setup described above. Your ~/.codex is not modified.

amplihack codex --local-model inkling -- exec --output-last-message /tmp/final.txt -

See Run amplihack codex with a Local Model and Codex Local-Model Launches.

update

Self-updates the amplihack binary by downloading the latest release from GitHub (with SHA-256 verification), atomically replacing the running executable, and then automatically running amplihack install to refresh the framework assets staged under ~/.amplihack/.claude so the on-disk agents, hooks, and prompts match the newly installed binary.

Synopsis

amplihack update [--skip-install | --no-install]

Flags

Flag Description
--skip-install Skip the automatic post-update install step (binary-only update — legacy behavior). Alias: --no-install.

Behavior

  1. Check GitHub for a newer release. If none, exit with a "already at latest" message.
  2. Download the platform-specific archive and verify its SHA-256, then atomically replace the running binary.
  3. Unless --skip-install was passed, run the new binary's amplihack install --force-refresh as a subprocess to re-stage framework assets. This is non-interactive. Unlike a standalone amplihack install, it doesn't reuse ~/.amplihack/amplifier-bundle/ or consult the current directory. It stages from AMPLIHACK_HOME when that tree has the new binary's version, and otherwise fetches the release tag v<version>. This ensures the new binary always gets the bundle belonging to its release. See Framework source selection.

If step 2 fails, the install step does not run and the original binary remains in place. If step 3 fails, amplihack update exits non-zero and the new binary is already installed; you can re-run amplihack install manually to retry the asset refresh.

Examples

# Default: update binary and refresh framework assets in one step
amplihack update

# Binary-only update (preserve old framework assets on disk)
amplihack update --skip-install

# Equivalent alias
amplihack update --no-install

# Manually refresh framework assets (e.g. after a --skip-install update,
# or to recover from a failed post-update install step)
amplihack install

Why install runs automatically

A binary-only update can leave the on-disk agents, hooks, prompts, and recipes out of sync with the new binary, producing confusing behavior (missing skills, stale prompts, hook signature mismatches). Running install immediately after a successful update keeps the binary and the staged framework consistent.

Prior to issue #675, the post-update install could re-stage the old bundle from ~/.amplihack/amplifier-bundle/ instead of downloading the new one, because find_bundled_framework_root() found the stale local copy before falling through to the network download. The post-update install no longer uses that copy. It stages from a same-version AMPLIHACK_HOME or fetches the release tag, so the recipes always match the new binary.

Startup-prompt updates

When amplihack prompts you to update at startup ("Update now? [y/N]") and you accept, the same flow runs: binary swap followed by automatic install. There is no way to pass --skip-install through the startup prompt — answer N and run amplihack update --skip-install manually if you want the legacy behavior in that situation.


Exit Codes

Code Meaning
0 Completed successfully (or --version / --help printed).
1 User error (bad argument, missing config). Stderr contains a message.
2 Internal error. Stderr contains a traceback.

Environment Variables

These variables are read at startup. All are optional.

Variable Default Effect
AMPLIHACK_AGENT_BINARY set by launcher Identifies the active agent binary in child processes. Set automatically to claude, copilot, codex, or amplifier. Hook wire-protocol selection uses a separate host marker so a nested agent does not inherit its parent's protocol.
AMPLIHACK_DEBUG unset Set to true to print debug messages during CLI execution.
AMPLIHACK_ENABLE_BLARIFY unset Set to 1 to enable blarify code-graph indexing.
AMPLIHACK_HOME ~/.amplihack Override the root directory for staged framework files and runtime data. Set automatically by each launcher when not already present in the environment; an existing value is always preserved.
AMPLIHACK_LOG_LEVEL WARNING Python logging level for the launcher (DEBUG, INFO, WARNING, ERROR).

Examples

Check the installed version

amplihack --version
# amplihack 0.9.2

Launch an interactive Claude session

Prefer amplihack claude in user-facing docs. amplihack launch remains supported as a compatibility alias.

amplihack claude
# or simply:
amplihack
# compatibility alias:
amplihack launch

Launch an interactive Copilot session

amplihack copilot

Run a workflow recipe non-interactively

amplihack recipe run default-workflow \
  --context '{"task_description": "Add input validation to the login endpoint"}'

Enable blarify code indexing for a session

AMPLIHACK_ENABLE_BLARIFY=1 amplihack claude

See Also