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

# Using CLI

## TUI Mode

Run `qodercli` from any project root to enter the default TUI (interactive) mode. You can chat with the CLI by text or execute special functions via slash commands.

### Input modes

Multiple input modes are available in the TUI:

| Command | Description                                                               |
| :------ | :------------------------------------------------------------------------ |
| `>`     | Dialog mode (default). Type any text to chat with the CLI.                |
| `!`     | Bash mode. From dialog mode, enter `!` to run shell commands directly.    |
| `/`     | Slash mode. From dialog mode, type `/` to open and run built-in commands. |
| `\` `⏎` | Enter to start multiline input.                                           |

### Built-in tools

Qoder CLI ships with tools like Grep, Read, Write, and Bash for file/directory operations and shell command execution.

For more details about tool capabilities and controls, see [Tools](/en/cli/tools).

### Slash commands

Quickly access features and settings with these built-in slash commands:

| Command          | Description                                                                   |
| :--------------- | :---------------------------------------------------------------------------- |
| `/login`         | Log in to your Qoder account                                                  |
| `/help`          | Show TUI help                                                                 |
| `/init`          | Initialize or update the `AGENTS.md` memory file in the project               |
| `/memory`        | Open the memory overview for user, project, local, and auto-memory entries    |
| `/quest`         | Spec-driven delegated task                                                    |
| `/review`        | Code review for local changes                                                 |
| `/resume`        | List and resume sessions                                                      |
| `/clear`         | Clear the current session context history                                     |
| `/compact`       | Summarize the current session’s context history                               |
| `/usage`         | Show your current credit usage                                                |
| `/status`        | Show CLI status: version, model, account, API connectivity, tool status, etc. |
| `/config`        | Show system configuration of Qoder CLI                                        |
| `/effort`        | Adjust reasoning effort and related options for the current model             |
| `/agents`        | Subagent commands: list, create, manage subagents                             |
| `/tasks`         | List running background tasks                                                 |
| `/release-notes` | Show Qoder CLI release notes                                                  |
| `/vim`           | Open an external editor to edit input                                         |
| `/feedback`      | Send feedback about Qoder CLI                                                 |
| `/quit`          | Exit TUI                                                                      |
| `/logout`        | Log out of your Qoder account                                                 |

### Advanced startup options

When launching the CLI, use the following options to control its behavior:

| Command              | Description                     | Example                                          |
| :------------------- | :------------------------------ | :----------------------------------------------- |
| `-w`                 | Specify the workspace directory | `qodercli -w /Users/demo/projects/nacos`         |
| `-c`                 | Continue the last session       | `qodercli -c`                                    |
| `-r`                 | Resume a specific session       | `qodercli -r *******-c09a-40a9-82a7-a565413fa39` |
| `--allowed-tools`    | Allow only specified tools      | `qodercli --allowed-tools=Read,Write`            |
| `--disallowed-tools` | Disallow specified tools        | `qodercli --disallowed-tools=Read,Write`         |
| `--max-turns`        | Maximum dialog turns            | `qodercli --max-turns=10`                        |
| `--yolo`             | Skip permission checks          | `qodercli --yolo`                                |

For permission-related flags and settings, see [Permissions](/en/cli/permissions).

## Print Mode

Print mode is non-interactive. Run `qodercli --print` to enter. Output is printed according to `--output-format`.

### Flags

Global options can be used with any command:

| Option               | Description                            | Example                                             |
| :------------------- | :------------------------------------- | :-------------------------------------------------- |
| `-p`                 | Run the Agent non-interactively        | `qodercli -q -p hi`                                 |
| `--output-format`    | Output format: text, json, stream-json | `qodercli --output-format=json`                     |
| `-w`                 | Specify the workspace directory        | `qodercli -w /Users/qoder_user/projects/qoder_demo` |
| `-c`                 | Continue the last session              | `qodercli -c`                                       |
| `-r`                 | Resume a specific session              | `qodercli -r ********-c09a-40a9-82a7-a565413fa393`  |
| `--allowed-tools`    | Allow only specified tools             | `qodercli --allowed-tools=Read,Write`               |
| `--disallowed-tools` | Disallow specified tools               | `qodercli --disallowed-tools=Read,Write`            |
| `--max-turns`        | Maximum dialog turns                   | `qodercli --max-turns=10`                           |
| `--yolo`             | Skip permission checks                 | `qodercli --yolo`                                   |

## Worktree

Use `--worktree [name]` to start a Qoder CLI session in a separate Git worktree. This is useful when you want to run parallel sessions against the same repository without sharing the same working directory.

> Requirements: run the command inside a Git repository and make sure Git is installed locally.

### Start in a worktree

```shell theme={null}
qodercli --worktree feature-a
qodercli --worktree feature-a "Implement the login fix"
qodercli --worktree
```

If you omit the worktree name, Qoder CLI generates one automatically. After the worktree is prepared, Qoder CLI changes into that worktree and starts the session normally.

When the session ends, Qoder CLI prints the worktree path and the command for resuming the session:

```shell theme={null}
cd <worktree-path> && qodercli --resume <session-id>
```

To remove the worktree manually, run:

```shell theme={null}
git worktree remove <worktree-path>
```

## Memory

Qoder CLI carries context across sessions with `AGENTS.md` files and optional auto-memory. Common files include user-level `~/.qoder/AGENTS.md`, project-level `${project}/AGENTS.md`, and local project-level `${project}/AGENTS.local.md`.

### Automatically generate

Start TUI in the target project and enter `/init` to generate `AGENTS.md` in the project directory.

### Manually manage

* Create `AGENTS.md` in the project and edit its content.
* In TUI, enter `/memory` to manage user, project, and local memory files.
* When auto-memory is enabled, use `/memory` to open the auto-memory folder, or enter `/memory manage` to manage automatically saved memory files.

For details, see [Memory](/en/cli/memory).
