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

# Basic Usage and Main Commands

> Learn how to interact with ChatCLI and use the essential commands for navigation, configuration, and control.

## Interactive Mode

ChatCLI's default mode is interactive. To start it, simply run:

```bash theme={"system"}
chatcli
```

You will see a welcome screen and a prompt ( `❯` ), ready to receive your questions or commands. Any text that does not start with `/` or `@` will be treated as a prompt for the AI.

```bash theme={"system"}
help me list all active docker containers
```

***

## Essential Commands

Internal commands are your control center. They always start with `/`.

| Command                | Description                                                                                                                                     |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `/help`                | Displays the full help screen with all available commands and options                                                                           |
| `/menu` (or `/`)       | Opens the interactive command palette — a navigable list of every command (arrows to navigate)                                                  |
| `/exit` or `/quit`     | Safely exits the application                                                                                                                    |
| `/newsession`          | Clears the conversation history and starts a new dialogue from scratch                                                                          |
| `/config` or `/status` | Shows the current configuration: provider, active model, and variables (with sensitive values hidden); bare opens the palette with the sections |
| `/reload`              | Reloads settings from `.env` without restarting the application                                                                                 |
| `/switch`              | Switch the provider or model — bare opens the navigable palette of providers/flags                                                              |
| `/provider`            | Switch the LLM provider by name — bare opens the palette with the active providers (same UX as `/model`)                                        |
| `/compact`             | Compact conversation history (automatic or guided with instruction)                                                                             |
| `/rewind`              | Rewind to a previous conversation checkpoint                                                                                                    |

***

## Advanced Commands

<CardGroup cols={2}>
  <Card title="Context Commands (@)" icon="at" href="/core-concepts/context-commands">
    Inject dynamic information into your prompt: `@file`, `@git`, `@command`, `@env`, `@history`.
  </Card>

  <Card title="Agent Mode (/agent)" icon="robot" href="/core-concepts/agent-mode">
    Delegate complete tasks. The AI plans and executes commands with your approval.
  </Card>

  <Card title="Coder Mode (/coder)" icon="code" href="/core-concepts/coder-mode">
    AI that reads, edits, applies patches, and runs tests in a loop — with automatic rollback.
  </Card>

  <Card title="Conversation Control" icon="clock-rotate-left" href="/features/conversation-control">
    Use `/compact` to compact and `/rewind` (or Esc+Esc) to go back in time.
  </Card>

  <Card title="Skills and Plugins" icon="plug" href="/features/plugin-system">
    Extend ChatCLI with custom plugins and skills from remote registries.
  </Card>
</CardGroup>

***

## Coder Mode (/coder)

The `/coder` mode is specialized for software engineering. The AI automatically calls tools in a read, edit, and test loop.

```bash theme={"system"}
/coder fix the failing tests
```

```xml theme={"system"}
<tool_call name="@coder" args='{"cmd":"tree","args":{"dir":"."}}'/>
<tool_call name="@coder" args='{"cmd":"search","args":{"term":"FAIL","dir":"."}}'/>
<tool_call name="@coder" args='{"cmd":"read","args":{"file":"cli/agent_mode.go"}}'/>
<tool_call name="@coder" args='{"cmd":"test","args":{"dir":"."}}'/>
<tool_call name="@coder" args='{"cmd":"git-diff","args":{"dir":".","stat":true}}'/>
```

<Info>
  In `/coder`, it is always the AI that issues the `@coder` commands — you only describe the goal.
</Info>

See the full guides: [Coder Mode](/core-concepts/coder-mode) and [@coder Plugin](/features/coder-plugin)

***

## Prompt Navigation

ChatCLI supports keyboard shortcuts for efficient navigation:

| Shortcut                        | Action                                                               |
| ------------------------------- | -------------------------------------------------------------------- |
| **Alt/Option + arrows**         | Move cursor by word                                                  |
| **Ctrl + arrows**               | Move cursor by word                                                  |
| **Cmd + arrows** / **Home/End** | Move to beginning/end of line                                        |
| **Alt + Backspace**             | Delete word to the left                                              |
| **Esc+Esc**                     | Open rewind menu (double Esc within 500ms, only when input is empty) |
| **`/` or `/menu` + Enter**      | Open the command palette (arrows to navigate, Enter to select)       |

For the full list, see the [Command Reference](/reference/command-reference#keyboard-shortcuts).

***

## Smart Paste Detection

ChatCLI automatically detects pasted text via *Bracketed Paste Mode*. For large pastes (more than 150 characters), the content is replaced by a compact placeholder in the prompt:

```text theme={"system"}
«1234 chars | 5 lines»
```

The actual content is preserved internally and sent in full when you press Enter. Small pastes (150 characters or less) are rendered normally.

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Context Commands" icon="at" href="/core-concepts/context-commands">
    Learn how to inject context from your environment into the prompt.
  </Card>

  <Card title="Agent Mode" icon="robot" href="/core-concepts/agent-mode">
    Delegate complete tasks for the AI to execute.
  </Card>
</CardGroup>
