AI / AI Tools
Claude CLI / Codex CLI / Agy CLI / Copilot CLI command reference.
Claude CLI (officially Claude Code) is Anthropic's agentic coding tool that runs in your terminal. It can understand your codebase, edit files, run tests, and handle Git workflows.
Install via npm (requires Node.js ≥18):
# Install globally
npm install -g @anthropic-ai/claude-code
# Or use via npx (no global install)
npx @anthropic-ai/claude-code
# Verify installation
claude --version
Prerequisites: Node.js 18+, and an Anthropic API key or Claude Pro/Max subscription.
# Login interactively (opens browser)
claude auth
# Set API key via environment variable
export ANTHROPIC_API_KEY="sk-ant-..."
# Use a custom API base URL (for proxies)
claude --api-key "sk-..." --model claude-3-5-sonnet-20241022
| Command | Description |
|---|---|
claude | Start an interactive REPL session in the current directory |
claude "prompt" | Send a one-shot prompt and print the response |
claude -p "prompt" | Print mode — output response to stdout (good for piping) |
claude -c | Continue the most recent conversation |
claude --model <model> | Specify which Claude model to use |
claude --max-tokens <N> | Set the maximum tokens in the response |
claude --temperature <N> | Set sampling temperature (0–1) |
Once inside the REPL, use these slash commands:
| Command | Description |
|---|---|
/help | Show available commands |
/clear | Clear conversation history |
/model <name> | Switch model mid-session |
/ compact | Summarize the conversation to save tokens |
/diff | Show pending file changes |
/undo | Revert the last file change |
/commit | Create a Git commit with the changes |
exit / quit | Exit the REPL |
# Run with extra context files
claude "review this code" --context src/*.py
# Use MCP (Model Context Protocol) servers
claude mcp add --transport http server-name https://...
# List configured MCP servers
claude mcp list
# Run in "headless" CI mode
claude -p "write tests" --output-format json
Codex CLI (officially codex) is OpenAI's official terminal-based AI coding assistant and agentic orchestration tool. It interacts directly with your local codebase to provide explanation, refactoring, bug fixes, and command line automation.
Requires Node.js ≥18. Install globally via npm:
# Install globally via npm
npm install -g @openai/codex
# Or install via Homebrew on macOS
brew install --cask codex
# Verify
codex --version
On your first run of the codex command, the terminal will guide you to sign in. You can authenticate via OAuth in your browser using your ChatGPT account (supporting Plus, Pro, Team, or Enterprise), or supply an OpenAI API key in the configuration.
# Start and authenticate
codex
| Command / Flag | Description |
|---|---|
codex | Start an interactive Terminal User Interface (TUI) session |
codex "prompt" | Run a single prompt non-interactively and output to the terminal |
-c key=value / --config | Override a configuration key for the current execution (e.g., -c model=gpt-4o) |
-a <mode> / --ask-for-approval | Set approval policy (choices: untrusted, on-request, or never) |
--add-dir <path> | Grant read/write/execute permissions to additional directories |
--profile <name> | Load a specific profile (e.g., ~/.codex/name.config.toml) |
--skip-git-repo-check | Skip Git repository checks during runtime |
Codex CLI reads user defaults from ~/.codex/config.toml. You can customize the active model, safety policies, and register MCP servers:
# Sample ~/.codex/config.toml
model = "gpt-4o"
approval_policy = "on-request"
# Configure Model Context Protocol (MCP) servers
[mcp_servers.my_helper]
enabled = true
command = "node"
args = ["/path/to/server.js"]
Project-level configs can be defined in a local .codex/config.toml to override global user configs (trusted projects only).
Within the active codex TUI session, type / to trigger a popup containing the following commands:
| Shortcut | Description |
|---|---|
/agent | Switch to or inspect a spawned subagent thread |
/apps | Browse and attach apps/connectors to the active session |
/approvals | Adjust tool execution approval modes (e.g., Auto, Read Only, Full Access) |
/clear | Clear terminal screen and start a fresh chat session |
/compact | Summarize the conversation history to free up context tokens |
/diff | Show Git diffs (including untracked files) of changes made |
/fork | Clone the current conversation context into a new thread |
/ide | Import the active IDE context (open files, selection) into the next prompt |
/model | Switch the active AI model for the session |
/permissions | Configure tool and filesystem auto-approval rules |
/plugins | Manage, inspect, or install plugin tools |
/review | Request an AI code review of current local codebase modifications |
/side | Start an ephemeral side-thread for alternative code exploration |
/status | View connection status, organization billing, and API rate limits |
/theme | Preview and set TUI color themes and syntax highlights |
/usage | Show detailed token usage graphs and session statistics |
/exit / /quit | Exit the active Codex CLI session |
Make sure you verify the exact package name before running npm install. Malicious actors have historically published package typos (e.g., codexui-android) attempting to steal authentication tokens from ~/.codex/auth.json. Always verify official package sources.
Agy CLI — Google's Antigravity (Agy) CLI is a lightweight, terminal-based agentic AI development and orchestration tool that brings powerful AI capabilities directly to your command line interface.
Run the following command in your terminal to install agy:
# macOS & Linux Installation
curl -fsSL https://antigravity.google/cli/install.sh | bash
# Windows (PowerShell) Installation
irm https://antigravity.google/cli/install.ps1 | iex
# Verify installation
agy --version
On your first run, type agy and press Enter. It will guide you through the OAuth flow in your browser to sign in to your Google account, then paste the code back in the terminal.
# Start and login
agy
# Logout
# Run /logout inside the interactive session
| Command | Description |
|---|---|
agy | Start an interactive Terminal User Interface (TUI) session |
agy -p "prompt" / agy --print "prompt" | Run a single prompt non-interactively and print the response |
agy -c / agy --continue | Continue the most recent conversation session |
agy --conversation <ID> | Resume a previous conversation by its ID |
agy --model <model> | Specify the model used for the current CLI session |
agy --sandbox | Run in a sandbox environment with terminal command restrictions enabled |
agy --dangerously-skip-permissions | Auto-approve all tool permission requests without prompting |
| Subcommand | Description |
|---|---|
agy changelog | Display product changelog and release notes |
agy models | List available AI models |
agy plugin / plugins | Manage plugins (install, uninstall, list, enable, disable) |
agy update | Update Agy CLI to the latest version |
agy install | Configure environment paths and shell integration settings |
Within the interactive agy TUI session, you can run the following shortcut slash commands:
| Shortcut | Description |
|---|---|
/add-dir | Add a new directory path to the active workspace |
/agents | List active subagents and custom agents (such as Fleet) |
/artifact | Open the TUI artifact viewer |
/btw | Ask a quick side-question without starting a full agent run |
/changelog | Display product changelog and release notes |
/clear / /new | Clear terminal screen and conversation context |
/config / /settings | Open TUI configuration panel to customize settings |
/context | List files and symbols currently in the agent's context |
/copy | Copy the last agent response to the system clipboard |
/diff | Display current codebase diff of changes made by the agent |
/fork / /branch | Fork the current conversation into a new thread, preserving history |
/help | Display the help menu with commands and keyboard shortcuts |
/hooks | List all registered lifecycle hooks |
/keybindings | Configure and view all active CLI keyboard shortcuts |
/logout | Log out of the active Google account session |
/mcp | List active MCP servers and their exposed tools |
/model | Change the active model for the session |
/open | Open a file in your preferred local editor (e.g., vim, nano, auto) |
/permissions | Manage tool execution permissions (allow/deny rules) |
/planning | Open the interactive graphical planning and task list editor |
/rename | Rename the active conversation thread |
/skills | List all active agent skills |
/tasks | Display the active task list and progress |
/usage / /quota | Display token usage, session cost, and quota statistics |
/exit / /quit | Exit the active Antigravity CLI session |
Or programmatically orchestrate agents using the official Python SDK:
pip install google-antigravity
import asyncio
from google.antigravity import Agent, LocalAgentConfig, CapabilitiesConfig
async def main():
# Read-only by default. Pass CapabilitiesConfig() to allow write/command execution.
config = LocalAgentConfig(
system_instructions="You are an expert codebase assistant.",
capabilities=CapabilitiesConfig()
)
async with Agent(config) as agent:
response = await agent.chat("Write a short Python script to list files")
# Stream response tokens
async for token in response:
print(token, end="", flush=True)
if __name__ == "__main__":
asyncio.run(main())
GitHub Copilot CLI (officially copilot, package @github/copilot) is GitHub's official terminal-native AI coding assistant and agentic CLI. It allows you to interact with your codebase using natural language, enabling autonomous planning, code generation, debugging, and git workflow integration.
Requires Node.js ≥22. Install globally via npm:
# Install globally via npm
npm install -g @github/copilot
# Verify
copilot --version
Note: Older packages like @githubnext/github-copilot-cli are deprecated. Please migrate to the new @github/copilot package.
Run the copilot command and use the /login command inside the session to authenticate with your GitHub account:
# Start Copilot CLI
copilot
# Run login inside the session
/login
Requires an active GitHub Copilot subscription.
| Shortcut / Control | Description |
|---|---|
Shift + Tab | Toggle into **Plan Mode** to outline and design multi-step tasks before execution |
@filename | Type @ followed by a filename to add specific files to the agent context |
Ctrl + C | Interrupt execution or clear the current prompt input |
Ctrl + L | Clear the terminal screen |
Esc | Cancel the current action |
Within the interactive copilot session, use these slash commands starting with /:
| Slash Command | Description |
|---|---|
/login | Authenticate with your GitHub account |
/model | Choose or switch active AI models (e.g. Claude 3.5 Sonnet, GPT-4o) |
/help | Display command help and documentation guides |
/pr | Manage and interact with GitHub Pull Requests directly from the terminal |
/fleet | Enable multi-subagent collaboration (Fleet) mode to accelerate complex tasks |
/experimental | Toggle experimental features and options |
/exit | Exit the active Copilot CLI session |
For programmatic agent orchestration, you can use the official Copilot SDK in Node.js / TypeScript projects:
# Install official SDK
npm install @github/copilot-sdk
This SDK communicates via JSON-RPC with the Copilot CLI or its underlying runtime to orchestrate task planning, tool execution, and codebase edits.