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

# Blink CLI

> The open-source terminal interface where you can build, test, and deploy your agents.

## Keyboard Shortcuts

The Blink terminal interface includes powerful keyboard shortcuts to help you build and use agents efficiently.

### Essential Shortcuts

<ResponseField name="Ctrl+T" type="shortcut">
  Toggle between Edit Mode and Run Mode. This is your primary way to switch
  contexts while developing your agent.
</ResponseField>

<ResponseField name="Ctrl+N" type="shortcut">
  Create a new chat. Useful for testing your agent in isolation or organizing
  different conversations.
</ResponseField>

<ResponseField name="Ctrl+R" type="shortcut">
  Reset the current chat. Clears all messages and starts fresh while staying in
  the same chat.
</ResponseField>

<ResponseField name="Escape" type="shortcut">
  Stop the agent and process queued messages. If the agent is currently
  responding, this will interrupt it. If you have queued messages (sent while
  the agent was busy), pressing Escape will stop the current response and begin
  processing the next message in the queue incrementally.
</ResponseField>

<ResponseField name="Ctrl+C" type="shortcut">
  Quit Blink. Press twice to confirm exit (prevents accidental quits).
</ResponseField>

## Message Queuing

When you send multiple messages while the agent is still processing, Blink queues them for sequential processing. This allows you to keep working without waiting for each response.

**How it works:**

* Messages sent while the agent is busy are added to a queue
* The terminal status bar shows: `X message(s) queued - Press [Escape] to stop and process queue`
* Press `Escape` to interrupt the current response and process the next queued message
* Each press of `Escape` stops the current message and moves to the next one in the queue

This is useful when you realize mid-response that you want to redirect the agent or provide additional context.

## Slash Commands

Slash commands provide quick access to common operations. Type `/` in the input to see available commands, and use Tab for autocompletion.

### Mode Management

<ResponseField name="/edit" type="command">
  Switch to Edit Mode where AI helps you build your agent. In this mode, you can
  modify your agent's behavior, add tools, and refine how it works.
</ResponseField>

<ResponseField name="/run" type="command">
  Switch to Run Mode where you use your agent. Test your agent with real tasks
  and see how it performs.
</ResponseField>

### Chat Management

<ResponseField name="/reset" type="command">
  Reset the current chat and clear all messages. Alias: `/clear`
</ResponseField>

<ResponseField name="/new [chat-id]" type="command">
  Create a new chat with an optional custom ID. If no ID is provided, a unique
  one is generated.
</ResponseField>

<ResponseField name="/switch [chat-id]" type="command">
  Switch to a different chat by ID. Use Tab for autocompletion from your
  available chats.
</ResponseField>

### Help

<ResponseField name="/help" type="command">
  Display help information about building agents, including the development loop
  and tips for effective agent building.
</ResponseField>

## Development Workflow

The terminal interface is designed around a rapid iteration workflow:

<Steps>
  <Step title="Start in Edit Mode">
    Press `Ctrl+T` or type `/edit` to enter Edit Mode. Describe what you want
    your agent to do.
  </Step>

  <Step title="Switch to Run Mode">
    Press `Ctrl+T` or type `/run` to test your agent. Give it real tasks and
    observe its behavior.
  </Step>

  <Step title="Refine in Edit Mode">
    Press `Ctrl+T` again to return to Edit Mode. The AI in Edit Mode has full
    context of your Run Mode conversations and can help you fix issues.
  </Step>

  <Step title="Reset when needed">
    Use `Ctrl+R` or `/reset` to start fresh conversations while testing. Use
    `Ctrl+N` or `/new` to create separate test scenarios.
  </Step>
</Steps>

## Terminal Status Bar

The bottom of the terminal displays useful information:

* **mode**: Shows whether you're in `edit` or `run` mode (color-coded: orange for edit, blue for run)
* **chat**: Displays the current chat ID
* **tokens**: Shows token usage (input → output, with cached tokens if applicable)

## Tips

* **Tab completion**: Works for slash commands and their arguments. Start typing and press Tab to autocomplete.
* **Command aliases**: `/reset` and `/clear` do the same thing - use whichever you prefer.
* **Chat organization**: Use `/new` with descriptive IDs to organize test scenarios (e.g., `/new feature-test-1`)
* **Quick mode switching**: `Ctrl+T` is faster than typing `/edit` or `/run` when you're iterating quickly.
* **Don't fear interruptions**: Press `Escape` if your agent starts going in the wrong direction - it's better to stop and redirect early.
