> ## Documentation Index
> Fetch the complete documentation index at: https://docs.augmentcode.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI Flags and Options

> A comprehensive reference for all command-line flags available in the Auggie CLI.

## CLI flags

| Command                                                              | Description                                                                             |
| :------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- |
| `auggie`                                                             | Start Auggie in interactive mode                                                        |
| `auggie --print "Summarize the staged changes"` (`-p`)               | Run one instruction in print mode and exit                                              |
| `auggie --print --quiet "Summarize the staged changes"`              | Show only the final assistant message                                                   |
| `auggie --print --compact "Summarize the staged changes"`            | Show compact streaming output in print mode                                             |
| `auggie --print --show-credits "Summarize the staged changes"`       | Include a credit usage summary at the end of the run                                    |
| `auggie --print --output-format json "Summarize the staged changes"` | Output the response in structured JSON format for automation workflows                  |
| `auggie --ask "Explain this function"` (`-a`)                        | Enable ask mode for retrieval and non-editing tools only                                |
| `auggie --print --queue "Step 2" --queue "Step 3" "Step 1"`          | Queue additional instructions for sequential execution (repeatable, requires `--print`) |
| `auggie --mcp`                                                       | Run Auggie as an MCP tool server                                                        |
| `auggie --acp`                                                       | Run Auggie as an [ACP](/cli/acp/agent) agent for compatible editors and clients         |

### Input

| Command                                                                                  | Description                                            |
| :--------------------------------------------------------------------------------------- | :----------------------------------------------------- |
| `auggie "Fix the typescript errors"`                                                     | Provide an initial instruction in interactive mode     |
| `auggie --print "Summarize the staged changes"`                                          | Provide an instruction and exit                        |
| `cat file \| auggie --print "Summarize this data"`                                       | Pipe content through stdin                             |
| `auggie --print "Summarize this data" < file.txt`                                        | Provide input from a file                              |
| `auggie --instruction "Fix the errors"`                                                  | Provide an initial instruction in interactive mode     |
| `auggie --instruction-file /path/to/file.txt`                                            | Provide the initial instruction from a file            |
| `auggie --print --queue "Write tests" --queue "Summarize remaining risks" "Fix the bug"` | Queue additional instructions for sequential execution |
| `auggie --image screenshot.png "Explain this UI error"`                                  | Attach one or more images to the initial prompt        |
| `auggie --print --enhance-prompt "Fix the flaky test"`                                   | Run the prompt enhancer before sending the instruction |

### Custom Commands

| Command                         | Description                                                                  |
| :------------------------------ | :--------------------------------------------------------------------------- |
| `auggie command list`           | List available custom commands discovered from command directories           |
| `auggie command <command-name>` | Execute a custom command from `.augment/commands/` or `~/.augment/commands/` |
| `auggie command help`           | Show help for custom commands and command discovery                          |

Custom commands are reusable instructions stored as markdown files. They can be placed in:

* `~/.augment/commands/<name>.md` - Global commands (user-wide)
* `./.augment/commands/<name>.md` - Project commands (workspace-specific)
* `~/.claude/commands/<name>.md` - Claude Code user commands
* `./.claude/commands/<name>.md` - Claude Code workspace commands

Commands are resolved in order of precedence, with Auggie-specific locations taking priority over Claude Code locations.

**Examples:**

```sh theme={null}
# Execute a custom deployment command
auggie command deploy-staging

# Execute a code review command
auggie command security-review

# List available commands
auggie command list
```

See [Custom Commands](/cli/custom-commands) for detailed information on creating and managing custom commands.

### Sessions

| Command                             | Description                                                    |
| :---------------------------------- | :------------------------------------------------------------- |
| `auggie --continue` `(-c)`          | Resume the most recent conversation                            |
| `auggie --resume` `(-r)`            | Interactively choose a saved session to resume                 |
| `auggie --resume <sessionId>`       | Resume a specific session by ID or prefix                      |
| `auggie --dont-save-session`        | Do not save the conversation to the local history              |
| `auggie session list`               | List saved sessions from the current workspace                 |
| `auggie session list --json`        | Output saved sessions in JSON format                           |
| `auggie session list --all`         | Show sessions from all workspaces                              |
| `auggie session list -n <number>`   | Limit the number of sessions shown                             |
| `auggie session continue`           | Continue from the most recent session (same as `--continue`)   |
| `auggie session resume [sessionId]` | Resume a specific session by ID or prefix (same as `--resume`) |
| `auggie session delete`             | Interactively delete saved sessions                            |
| `auggie session delete --all`       | Delete saved sessions from all workspaces                      |
| `auggie session share [sessionId]`  | Generate a shareable link for a saved session                  |

### Configuration

| Command                                            | Description                                                                      |
| :------------------------------------------------- | :------------------------------------------------------------------------------- |
| `auggie --workspace-root /path/to/project`         | Specify the root of the workspace                                                |
| `auggie --add-workspace /path/to/another/project`  | Index an additional workspace alongside the primary workspace                    |
| `auggie --rules /path/to/rules.md`                 | Additional rules to append to workspace guidelines                               |
| `auggie --model "name"`                            | Select the model to use (accepts long or short names from the model list)        |
| `auggie --persona "persona-id"`                    | Select the agent persona to use for this session                                 |
| `auggie --augment-cache-dir /path/to/cache`        | Override the Augment cache directory                                             |
| `auggie --retry-timeout 30`                        | Set the rate-limit retry timeout in seconds                                      |
| `auggie --print --max-turns 10 "Review this diff"` | Limit the number of agentic turns in print mode                                  |
| `auggie --allow-indexing`                          | Skip the interactive indexing confirmation screen                                |
| `auggie --wait-for-indexing`                       | Wait for complete workspace indexing before the codebase retrieval tool executes |
| `auggie --no-update-terminal-title`                | Disable automatic terminal title updates based on conversation content           |

<Note>Skills are loaded automatically from `.augment/skills/` and `.claude/skills/` directories in both your workspace and home directory. See [Skills](/cli/skills) for more information.</Note>

### Rules

Inspect the rules and guidelines that Auggie detects in your workspace.

| Command             | Description                                                 |
| :------------------ | :---------------------------------------------------------- |
| `auggie rules list` | List rules and guidelines detected in the current workspace |

### Models

List out available models and their short names to be passed into the `--model` flag

| Command                          | Description                                                                                                                                     |
| :------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------- |
| `auggie models list`             | List available models                                                                                                                           |
| `auggie models list --json`      | Output full model metadata as JSON for downstream tooling                                                                                       |
| `auggie models list --full-info` | Output structured JSON with full model metadata including display names, descriptions, cost tiers, effort levels, and the account default model |

### Tools

Manage which tools are available to the agent. You can temporarily disable tools for a session or persistently manage them via settings.

| Command                                               | Description                                                                              |
| :---------------------------------------------------- | :--------------------------------------------------------------------------------------- |
| `auggie --mcp-config /path/to/mcp.json`               | Load MCP server configuration from a JSON file for the current run                       |
| `auggie --permission launch-process:allow`            | Set a tool permission rule for the current run                                           |
| `auggie --remove-tool <tool-name>`                    | Remove a specific tool by name for the current session. Can be specified multiple times. |
| `auggie --shell zsh`                                  | Override the shell used by process tools for the current session                         |
| `auggie --startup-script "source .venv/bin/activate"` | Run a startup script before each shell command                                           |
| `auggie --startup-script-file /path/to/script.sh`     | Load a startup script from a file                                                        |
| `auggie tools list`                                   | List all available tools and their current status                                        |
| `auggie tools remove <tool-name>`                     | Persistently remove a tool by adding it to the `removedTools` list in settings.json      |
| `auggie tools add <tool-name>`                        | Re-enable a previously removed tool by removing it from the `removedTools` list          |
| `auggie tools schemas`                                | Print the tool definitions and input schemas                                             |

**Examples:**

```sh theme={null}
# Disable the web-fetch tool for this session
auggie --remove-tool web-fetch

# Disable multiple tools for this session
auggie --remove-tool web-fetch --remove-tool web-search

# Persistently disable a tool
auggie tools remove launch-process

# Re-enable a previously disabled tool
auggie tools add launch-process

# See all tools and their status
auggie tools list
```

<Note>Command-line `--remove-tool` flags take precedence over settings. For fine-grained control over tool behavior (allow, deny, ask-user), see [Permissions](/cli/permissions).</Note>

### Plugins and Marketplaces

| Command                                       | Description                                                                                                        |
| :-------------------------------------------- | :----------------------------------------------------------------------------------------------------------------- |
| `auggie plugin marketplace add <github-repo>` | Add a plugin marketplace from a GitHub repository                                                                  |
| `auggie plugin marketplace list`              | List all installed plugin marketplaces                                                                             |
| `auggie plugin marketplace update [name]`     | Update a specific marketplace or all marketplaces                                                                  |
| `auggie plugin marketplace remove <name>`     | Remove an installed marketplace                                                                                    |
| `auggie plugin list`                          | List all available plugins from installed marketplaces                                                             |
| `auggie plugin install <plugin-id>`           | Enable a plugin                                                                                                    |
| `auggie plugin install <plugin-id> --disable` | Disable a plugin                                                                                                   |
| `auggie --plugin-dir <path>`                  | Load plugins from a local marketplace directory for the current run (repeatable; useful while developing a plugin) |

<Note>Plugin commands are available when the plugin marketplace feature is enabled for your account.</Note>

For detailed information about plugins and marketplaces, see [Plugins and Marketplaces](/cli/plugins).

### MCP and integrations

| Command                             | Description                                       |
| :---------------------------------- | :------------------------------------------------ |
| `auggie mcp add [options] <name>`   | Create or update a named MCP server configuration |
| `auggie mcp add-json <name> <json>` | Add an MCP server from JSON configuration         |
| `auggie mcp list`                   | Display all configured MCP servers                |
| `auggie mcp remove <name>`          | Remove a named MCP server configuration           |

| Command                                 | Description                                                                                                                        |
| :-------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------- |
| `auggie --mcp-config {key: value}`      | MCP configuration as a JSON string                                                                                                 |
| `auggie --mcp-config /path/to/mcp.json` | MCP configuration from a JSON file                                                                                                 |
| `auggie --enable-tool-search`           | Hide individual MCP tools and expose `find-tool`/`execute-tool` instead. See [MCP Tool Search](/cli/integrations#mcp-tool-search). |

<Note>You can define MCP servers persistently in the settings files: `~/.augment/settings.json`. Any `--mcp-config` flags are applied last and override settings.</Note>

For detailed usage examples, options, settings.json format, and precedence rules, see [Integrations and MCP](/cli/integrations#manage-mcp-servers-with-the-auggie-cli).

### MCP Server Mode

Run Auggie as an MCP server to expose the codebase-retrieval tool to external AI tools like Claude Code, Cursor, and others.

| Flag                   | Description                                                                                       |
| :--------------------- | :------------------------------------------------------------------------------------------------ |
| `--mcp`                | Run Auggie as an MCP tool server. Uses the current working directory as the workspace by default. |
| `--mcp-auto-workspace` | Enable automatic workspace discovery based on client requests (added in v0.14.0)                  |
| `-w /path/to/project`  | Specify a workspace to index                                                                      |

#### Automatic Workspace Discovery

The `--mcp-auto-workspace` flag enables dynamic workspace discovery in MCP mode. When enabled:

* The `codebase-retrieval` tool accepts a `directory_path` parameter to specify which workspace to search
* Workspaces are indexed on-demand when first accessed
* Multiple workspaces can be searched within a single MCP server session

This is useful when the MCP client (e.g., Claude Code) needs to work with multiple projects or when the workspace isn't known at startup time.

You can combine `--mcp-auto-workspace` with `-w` to pre-index a primary workspace at startup while still allowing dynamic discovery of additional workspaces. This is useful for large workspaces that take time to index, or to reduce latency on the first query to your main project.

**Examples:**

```bash theme={null}
# MCP server with auto-discovery (recommended)
auggie --mcp --mcp-auto-workspace

# Pre-index a workspace, allow dynamic discovery of others
auggie --mcp --mcp-auto-workspace -w /path/to/primary/project

# Use only a single workspace path
auggie --mcp -w /path/to/project

# Use current working directory as the workspace
auggie --mcp
```

<Note>When using `--mcp-auto-workspace`, the first query to a new workspace may take longer as the workspace is indexed. Subsequent queries to the same workspace will be fast.</Note>

### Authentication

| Command                                        | Description                                                     |
| :--------------------------------------------- | :-------------------------------------------------------------- |
| `auggie login`                                 | Login to Augment and store the token locally                    |
| `auggie logout`                                | Remove the locally stored token                                 |
| `auggie token print`                           | Print the locally stored session JSON for automation            |
| `auggie token revoke`                          | Revoke all authentication tokens for the current user           |
| `auggie --augment-session-json <json-or-path>` | Session JSON or path to session file for authentication         |
| `auggie --github-api-token <path>`             | Path to file containing GitHub API token for GitHub integration |

### Diagnostics

Flags for troubleshooting and capturing logs. These are not shown in `auggie --help` but are stable and can be used in scripts.

| Command                      | Description                                                                                                                                                                                                                                              |
| :--------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `auggie --log-file <path>`   | Write logs to the given file. Use `-` to log to the console (stderr). Defaults to a temp file. Ignored when `-` is combined with `--mcp` or `--acp` (those modes reserve stdout/stderr for the protocol, so logs are redirected to a temp file instead). |
| `auggie --log-level <level>` | Set the log level. One of `error`, `warn`, `info` (default), `debug`.                                                                                                                                                                                    |
| `auggie --no-bell`           | Disable the terminal bell that sounds when the agent completes a task in interactive mode.                                                                                                                                                               |

### Additional commands

| Command                                | Description                          |
| :------------------------------------- | :----------------------------------- |
| `auggie account status`                | Show account and billing information |
| `auggie upgrade [--skip-confirmation]` | Upgrade Auggie to the latest version |
| `auggie --help`                        | Show help                            |
| `auggie --version`                     | Show version                         |

## Environment Variables

| Variable                      | Description                   |
| ----------------------------- | ----------------------------- |
| `AUGMENT_SESSION_AUTH`        | Authentication JSON.          |
| `GITHUB_API_TOKEN`            | GitHub API token              |
| `AUGMENT_DISABLE_AUTO_UPDATE` | Disable automatic CLI updates |

### Shell Environment

When Auggie executes shell commands using the `launch-process` tool, it sets the following environment variable:

| Variable        | Description                                                                                                                        |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `AUGMENT_AGENT` | Set to `1` when a command is executed by Auggie. Scripts can check for this variable to detect if they are being run by the agent. |

**Example usage in a script:**

```sh theme={null}
if [ -n "$AUGMENT_AGENT" ]; then
  echo "Running inside Auggie"
  # Adjust behavior for agent execution
fi
```

## See Also

* [Custom Rules and Guidelines](/cli/rules) - Configure custom rules for project-specific guidance
* [Skills](/cli/skills) - Extend capabilities with specialized domain knowledge
* [Custom Commands](/cli/custom-commands) - Create reusable command templates
* [Plugins and Marketplaces](/cli/plugins) - Manage and install plugins to extend Auggie
* [Permissions](/cli/permissions) - Configure tool permissions and security
* [Integrations](/cli/integrations) - Connect external tools and services
