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

# CLI Commands Overview

> Complete reference of all NikCLI slash commands with syntax and examples

# CLI Commands Overview

NikCLI provides 144 interactive slash commands organized into functional categories. All commands are prefixed with `/` and can be used in the interactive CLI session.

## Quick Reference

| Command          | Category | Description                                   |
| ---------------- | -------- | --------------------------------------------- |
| `/help`          | System   | Show comprehensive help and command reference |
| `/quit`, `/exit` | System   | Exit NikCLI safely                            |
| `/clear`         | System   | Clear current session context                 |
| `/debug`         | System   | Show detailed debug information               |
| `/status`        | System   | Show comprehensive system status and health   |

## Command Categories

### 🏠 System Commands

Core system operations and information.

| Command               | Description                     | Example            |
| --------------------- | ------------------------------- | ------------------ |
| `/help`               | Show comprehensive help guide   | `/help`            |
| `/quit`, `/exit`      | Exit NikCLI safely              | `/quit`            |
| `/clear`              | Clear current session context   | `/clear`           |
| `/debug`              | Show detailed debug information | `/debug`           |
| `/dashboard [action]` | Toggle analytics dashboard      | `/dashboard start` |
| `/stats`              | Show session statistics         | `/stats`           |
| `/system [info]`      | Show system information         | `/system`          |

### 🤖 AI Model Management

Configure and manage AI models and providers.

| Command               | Description                     | Example                    |
| --------------------- | ------------------------------- | -------------------------- |
| `/model [name]`       | Switch AI model or show current | `/model claude-3-5-sonnet` |
| `/models`             | List available AI models        | `/models`                  |
| `/set-key [provider]` | Set API keys for AI providers   | `/set-key anthropic`       |
| `/router [action]`    | Configure model routing         | `/router status`           |
| `/temp [value]`       | Set model temperature (0.0-2.0) | `/temp 0.7`                |

### ⚙️ Configuration

System configuration and environment management.

| Command              | Description                  | Example                    |
| -------------------- | ---------------------------- | -------------------------- |
| `/config`            | Show current configuration   | `/config`                  |
| `/env [var] [value]` | Manage environment variables | `/env NODE_ENV production` |
| `/style [action]`    | Configure output styles      | `/style set compact`       |
| `/styles`            | List available output styles | `/styles`                  |

### 👥 Agent Management

Control AI agents and autonomous execution.

| Command                | Description                        | Example                                |
| ---------------------- | ---------------------------------- | -------------------------------------- |
| `/agents`              | List all available AI agents       | `/agents`                              |
| `/agent [name] [task]` | Execute task with specific agent   | `/agent backend-expert "optimize API"` |
| `/auto [task]`         | Fully autonomous task execution    | `/auto "build React app"`              |
| `/parallel [tasks]`    | Execute multiple tasks in parallel | `/parallel "test, lint, build"`        |
| `/factory`             | Show agent factory status          | `/factory`                             |
| `/create-agent [spec]` | Create custom agent                | `/create-agent frontend`               |
| `/launch-agent [name]` | Launch created agent               | `/launch-agent my-agent`               |

### 📋 Planning & Todo Management

Task planning and execution tracking.

| Command              | Description                | Example                         |
| -------------------- | -------------------------- | ------------------------------- |
| `/plan [task]`       | Generate execution plan    | `/plan "migrate to TypeScript"` |
| `/todo [action]`     | Manage todo items          | `/todo add "fix bug #123"`      |
| `/todos`             | Show all todos             | `/todos`                        |
| `/compact [mode]`    | Toggle compact display     | `/compact on`                   |
| `/super-compact`     | Ultra-compact display mode | `/super-compact`                |
| `/approval [action]` | Manage approval system     | `/approval enable`              |
| `/plan-clean`        | Clean completed plan items | `/plan-clean`                   |
| `/todo-hide`         | Hide completed todos       | `/todo-hide`                    |
| `/todo-show`         | Show all todos             | `/todo-show`                    |

### 🔒 Security Commands

Security settings and approval management.

| Command               | Description                 | Example            |
| --------------------- | --------------------------- | ------------------ |
| `/security [action]`  | Configure security settings | `/security status` |
| `/dev-mode [on\|off]` | Toggle development mode     | `/dev-mode on`     |
| `/safe-mode`          | Enable safe mode            | `/safe-mode`       |
| `/clear-approvals`    | Clear pending approvals     | `/clear-approvals` |

### 📁 File Operations

File system operations and content management.

| Command                   | Description                | Example                        |
| ------------------------- | -------------------------- | ------------------------------ |
| `/read [file]`            | Read file contents         | `/read package.json`           |
| `/write [file] [content]` | Write content to file      | `/write README.md "# Project"` |
| `/edit [file]`            | Edit file interactively    | `/edit src/app.ts`             |
| `/ls [path]`              | List files and directories | `/ls src/`                     |
| `/search [pattern]`       | Search files by pattern    | `/search "TODO"`               |
| `/grep [pattern]`         | Search file contents       | `/grep "function.*export"`     |

### 💻 Terminal Operations

Command execution and process management.

| Command              | Description                   | Example            |
| -------------------- | ----------------------------- | ------------------ |
| `/run [command]`     | Execute shell command         | `/run npm install` |
| `/sh [command]`      | Execute shell command (alias) | `/sh ls -la`       |
| `/bash [command]`    | Execute bash command          | `/bash echo $PATH` |
| `/install [package]` | Install packages              | `/install lodash`  |
| `/npm [args]`        | Run npm commands              | `/npm run build`   |
| `/yarn [args]`       | Run yarn commands             | `/yarn add react`  |
| `/git [args]`        | Run git commands              | `/git status`      |
| `/docker [args]`     | Run docker commands           | `/docker ps`       |
| `/ps`                | Show running processes        | `/ps`              |
| `/kill [pid]`        | Kill process by PID           | `/kill 1234`       |

### 🏗️ Project Operations

Build, test, and project management commands.

| Command                 | Description        | Example                |
| ----------------------- | ------------------ | ---------------------- |
| `/build`                | Build project      | `/build`               |
| `/test [args]`          | Run tests          | `/test --watch`        |
| `/lint`                 | Run linter         | `/lint`                |
| `/create [type] [name]` | Create new project | `/create react my-app` |

### 🖥️ Virtual Machine Operations

Container and VM management for isolated development.

| Command               | Description           | Example                      |
| --------------------- | --------------------- | ---------------------------- |
| `/vm [action]`        | VM operations         | `/vm list`                   |
| `/vm-create [config]` | Create new VM         | `/vm-create node:18`         |
| `/vm-list`            | List all VMs          | `/vm-list`                   |
| `/vm-stop [id]`       | Stop VM               | `/vm-stop vm-123`            |
| `/vm-remove [id]`     | Remove VM             | `/vm-remove vm-123`          |
| `/vm-connect [id]`    | Connect to VM         | `/vm-connect vm-123`         |
| `/vm-logs [id]`       | Show VM logs          | `/vm-logs vm-123`            |
| `/vm-status [id]`     | Show VM status        | `/vm-status vm-123`          |
| `/vm-exec [id] [cmd]` | Execute command in VM | `/vm-exec vm-123 "npm test"` |
| `/vm-dashboard`       | Show VM dashboard     | `/vm-dashboard`              |
| `/vm-health`          | Check VM health       | `/vm-health`                 |
| `/vm-backup [id]`     | Backup VM state       | `/vm-backup vm-123`          |
| `/vm-stats [id]`      | Show VM statistics    | `/vm-stats vm-123`           |

### 🎨 Vision & Image Operations

Image analysis and generation capabilities.

| Command                    | Description                 | Example                                   |
| -------------------------- | --------------------------- | ----------------------------------------- |
| `/analyze-image [path]`    | Analyze image with AI       | `/analyze-image screenshot.png`           |
| `/vision [path]`           | Analyze image (alias)       | `/vision diagram.jpg`                     |
| `/generate-image [prompt]` | Generate image from text    | `/generate-image "sunset over mountains"` |
| `/create-image [prompt]`   | Generate image (alias)      | `/create-image "logo design"`             |
| `/images`                  | Discover and analyze images | `/images`                                 |

### 🌐 Web3 & Blockchain Operations

Blockchain interactions and DeFi operations.

| Command                    | Description                   | Example                   |
| -------------------------- | ----------------------------- | ------------------------- |
| `/web3 [action]`           | Web3 operations               | `/web3 wallet`            |
| `/blockchain [action]`     | Blockchain operations (alias) | `/blockchain status`      |
| `/goat [action]`           | GOAT SDK operations           | `/goat init`              |
| `/defi [action]`           | DeFi operations               | `/defi balance`           |
| `/polymarket [action]`     | Polymarket trading            | `/polymarket markets`     |
| `/web3-toolchain [action]` | Web3 toolchain operations     | `/web3-toolchain list`    |
| `/w3-toolchain [action]`   | Web3 toolchain (alias)        | `/w3-toolchain status`    |
| `/defi-toolchain [action]` | DeFi toolchain operations     | `/defi-toolchain execute` |

### 🔍 Diagnostics & Monitoring

System diagnostics and health monitoring.

| Command                | Description             | Example            |
| ---------------------- | ----------------------- | ------------------ |
| `/diagnostic [action]` | Run diagnostics         | `/diagnostic scan` |
| `/diag [action]`       | Run diagnostics (alias) | `/diag status`     |
| `/monitor [action]`    | Start monitoring        | `/monitor start`   |
| `/diag-status`         | Show diagnostic status  | `/diag-status`     |

### 🧠 Memory & Context Management

Memory operations and context management.

| Command               | Description                 | Example                          |
| --------------------- | --------------------------- | -------------------------------- |
| `/remember [content]` | Store information in memory | `/remember "API key is in .env"` |
| `/recall [query]`     | Recall stored information   | `/recall "API key"`              |
| `/memory [action]`    | Manage memory system        | `/memory stats`                  |
| `/forget [query]`     | Remove from memory          | `/forget "old API key"`          |
| `/context [action]`   | Show execution context      | `/context`                       |
| `/index [action]`     | Manage workspace index      | `/index rebuild`                 |

### 📸 Snapshot Management

State snapshots and restoration.

| Command            | Description             | Example                       |
| ------------------ | ----------------------- | ----------------------------- |
| `/snapshot [name]` | Create state snapshot   | `/snapshot "before-refactor"` |
| `/snap [name]`     | Create snapshot (alias) | `/snap "working-state"`       |
| `/restore [name]`  | Restore from snapshot   | `/restore "before-refactor"`  |
| `/snapshots`       | List all snapshots      | `/snapshots`                  |

### 🎨 Figma Integration

Figma design tool integration.

| Command                  | Description                 | Example                                     |
| ------------------------ | --------------------------- | ------------------------------------------- |
| `/figma-info [url]`      | Get Figma file info         | `/figma-info https://figma.com/file/...`    |
| `/figma-export [url]`    | Export Figma assets         | `/figma-export https://figma.com/file/...`  |
| `/figma-to-code [url]`   | Convert Figma to code       | `/figma-to-code https://figma.com/file/...` |
| `/figma-open [url]`      | Open Figma file             | `/figma-open https://figma.com/file/...`    |
| `/figma-tokens [action]` | Manage design tokens        | `/figma-tokens extract`                     |
| `/figma-config`          | Configure Figma integration | `/figma-config`                             |
| `/figma-create [spec]`   | Create Figma designs        | `/figma-create "landing page"`              |

### 💼 Session Management

Work session and state management.

| Command                  | Description          | Example                           |
| ------------------------ | -------------------- | --------------------------------- |
| `/new [name]`            | Create new session   | `/new "feature-branch"`           |
| `/sessions`              | List all sessions    | `/sessions`                       |
| `/resume [name]`         | Resume work session  | `/resume "feature-branch"`        |
| `/work-sessions`         | Manage work sessions | `/work-sessions`                  |
| `/save-session [name]`   | Save current session | `/save-session "checkpoint"`      |
| `/delete-session [name]` | Delete session       | `/delete-session "old-work"`      |
| `/export-session [name]` | Export session data  | `/export-session "project-state"` |
| `/export [format]`       | Export current state | `/export json`                    |

### ↩️ Edit History

Undo/redo and edit history management.

| Command             | Description            | Example          |
| ------------------- | ---------------------- | ---------------- |
| `/undo [steps]`     | Undo recent changes    | `/undo 3`        |
| `/redo [steps]`     | Redo undone changes    | `/redo 1`        |
| `/edit-history`     | Show edit history      | `/edit-history`  |
| `/history [action]` | Manage command history | `/history clear` |

### 🔄 Background Agents

Background job management (via nikctl integration).

| Command              | Description              | Example              |
| -------------------- | ------------------------ | -------------------- |
| `/bg-agent [action]` | Manage background agents | `/bg-agent start`    |
| `/bg-jobs`           | List background jobs     | `/bg-jobs`           |
| `/bg-status [id]`    | Show job status          | `/bg-status job-123` |
| `/bg-logs [id]`      | Stream job logs          | `/bg-logs job-123`   |

### 🌐 Web Browsing

Automated web browsing and interaction.

| Command                    | Description                | Example                             |
| -------------------------- | -------------------------- | ----------------------------------- |
| `/browse-session [action]` | Manage browse sessions     | `/browse-session start`             |
| `/browse-search [query]`   | Search the web             | `/browse-search "React hooks"`      |
| `/browse-visit [url]`      | Visit webpage              | `/browse-visit https://example.com` |
| `/browse-chat [message]`   | Chat about current page    | `/browse-chat "summarize this"`     |
| `/browse-sessions`         | List browse sessions       | `/browse-sessions`                  |
| `/browse-info`             | Show current page info     | `/browse-info`                      |
| `/browse-close [id]`       | Close browse session       | `/browse-close session-1`           |
| `/browse-cleanup`          | Clean up sessions          | `/browse-cleanup`                   |
| `/browse-quick [query]`    | Quick search and summarize | `/browse-quick "latest React news"` |

### 📋 Blueprint Management

Code blueprints and templates.

| Command                      | Description            | Example                           |
| ---------------------------- | ---------------------- | --------------------------------- |
| `/blueprints`                | List all blueprints    | `/blueprints`                     |
| `/blueprint [name]`          | Show blueprint details | `/blueprint react-component`      |
| `/delete-blueprint [name]`   | Delete blueprint       | `/delete-blueprint old-template`  |
| `/export-blueprint [name]`   | Export blueprint       | `/export-blueprint my-template`   |
| `/import-blueprint [file]`   | Import blueprint       | `/import-blueprint template.json` |
| `/search-blueprints [query]` | Search blueprints      | `/search-blueprints "react"`      |

### 🔄 Streaming & Output

Output formatting and streaming control.

| Command            | Description              | Example          |
| ------------------ | ------------------------ | ---------------- |
| `/stream [action]` | Control output streaming | `/stream enable` |
| `/default`         | Switch to default mode   | `/default`       |
| `/pro`             | Switch to pro mode       | `/pro`           |

## Usage Examples

### Basic Workflow

```bash theme={null}
# Start new session
/new "feature-development"

# Check system status
/debug

# Set AI model
/model claude-3-5-sonnet

# Create execution plan
/plan "implement user authentication"

# Execute with agent
/agent backend-expert "create JWT auth middleware"

# Save progress
/save-session "auth-implementation"
```

### Development Workflow

```bash theme={null}
# Create VM for isolated development
/vm-create node:18

# Connect to VM
/vm-connect vm-123

# Install dependencies
/npm install

# Run tests
/test --watch

# Build project
/build

# Check status
/vm-status vm-123
```

### Web3 Development

```bash theme={null}
# Initialize Web3 environment
/goat init

# Check wallet status
/goat wallet

# Deploy contract
/web3-toolchain execute deploy-contract

# Check balance
/goat balance

# Monitor transactions
/polymarket positions
```

## Command Aliases

Many commands have shorter aliases for convenience:

* `/q` → `/quit`
* `/h` → `/help`
* `/ls` → `/list`
* `/sh` → `/run`
* `/diag` → `/diagnostic`
* `/snap` → `/snapshot`

## Getting Help

* Use `/help` for comprehensive command reference
* Use `/help [command]` for specific command help
* Use `/debug` to troubleshoot issues
* Use `/status` to check system health

## Prerequisites

Some commands require additional setup:

* **Web3 commands**: Require wallet configuration and API keys
* **Figma commands**: Require Figma access token
* **Background agents**: Require nikd daemon running
* **VM commands**: Require Docker installation
* **Image commands**: Require vision model access

For detailed setup instructions, see the [Configuration Guide](/configuration/cli-setup).
