Skip to main content

Why use the CLI

The CLI runs the same agents as the web console, with one important difference: it works on the directory you started it in, on your machine. That makes it the right tool for code you’re actively editing. An agent can look at uncommitted changes, work-in-progress branches, and files that exist nowhere but your laptop — none of which a cloud sandbox can reach. See Installation to get set up.

Web console vs. CLI

The agents’ capabilities are the same. What differs is where they run and what they can reach.

Starting a session

Ask it something:
  • Find and resolve any vectors for XSRF/XSS attacks within this project.
  • Are there any exposed service endpoints in this project that shouldn’t be?
The footer shows whether you’re connected to Amplify Cloud (and which organization) or running offline, plus the active model.

One-shot prompts

Run a single prompt and exit — useful in scripts, git hooks, and CI:
It prints the agent’s final answer and exits. Also --version.

Slash commands

Type / to get an autocomplete dropdown rather than memorizing them.

The model picker

/model opens a tabbed picker:
  • Popular — a curated shortlist. Works even if the model catalog is unreachable.
  • Browse — grouped by provider; drill into one to see its models.
  • Search — substring match across the full catalog, with pricing and context length per model.
Switching models mid-session carries your context forward via a summary, the same as the web console, and the transcript notes the switch.

Authoring skills and agents

The CLI is where skills are authored, because it loads both skills and agents from the filesystem:
Override with AMPLIFY_SKILLS_DIR and AMPLIFY_AGENTS_DIR. Both load at startup, so restart after adding one. The loop is quick: write the file, restart, /skill <name> to activate, then give the agent a task that should trigger it.

Offline mode

Without an Amplify API key the CLI runs fully local: detections and findings go to a SQLite database under ~/.amplify instead of your organization, and the footer shows a red offline mode indicator. Once authenticated, detections write through to your organization instead, so work done locally shows up for your team.

Cancelling and exiting

Ctrl+C cancels a running turn and leaves the session open so you can redirect. Pressing it again when nothing is running exits.

What the CLI doesn’t do

  • No persistent chat history. Sessions aren’t saved; /clear is final and there’s no resuming a past conversation. Findings and detections do persist.
  • No input history recall. Arrow keys don’t walk previous messages.
  • No workflows. Workflows are a cloud feature — the CLI runs agents interactively, one session at a time.

Next steps

Write a skill

The CLI is where skills are authored.

Install the CLI

Setup and API keys.