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

# CLI Overview

> Command-line interface for Coconut

# Coconut CLI (`nut`)

The Coconut CLI (`nut`) is a powerful command-line tool for managing your Coconut instances, agents, and change proposals directly from your terminal.

## Installation

The `nut` CLI is included with your Coconut installation.

## Quick Start

Initialize Coconut in your repository:

```bash theme={null}
nut init
```

Check the version:

```bash theme={null}
nut --version
```

Get help for any command:

```bash theme={null}
nut --help
nut <command> --help
```

## Command Categories

The `nut` CLI provides comprehensive commands for managing your Coconut instance:

<CardGroup cols={2}>
  <Card title="nut init" icon="rocket" href="/cli/init">
    Initialize Coconut in your repository
  </Card>

  <Card title="nut task" icon="list-check" href="/cli/task">
    Manage tasks (change proposals)
  </Card>

  <Card title="nut serve" icon="globe" href="/cli/serve">
    Launch the Coconut web interface
  </Card>

  <Card title="nut code" icon="code" href="/cli/code">
    AI-assisted task implementation
  </Card>

  <Card title="nut skill" icon="wand-magic-sparkles" href="/cli/skill">
    Manage AI skills (agents)
  </Card>

  <Card title="nut resource" icon="image" href="/cli/resource">
    Generate images, audio, and video
  </Card>

  <Card title="nut context" icon="book" href="/cli/context">
    Manage context documents
  </Card>

  <Card title="nut knowledge" icon="brain" href="/cli/knowledge">
    Manage knowledge base
  </Card>

  <Card title="nut events" icon="timeline" href="/cli/events">
    View activity events
  </Card>

  <Card title="nut coconut" icon="tree-palm" href="/cli/coconut">
    Call peer Coconut MCP tools
  </Card>

  <Card title="nut connect" icon="plug" href="/cli/connect">
    Access third-party connectors
  </Card>

  <Card title="nut notify" icon="bell" href="/cli/notify">
    Send notifications to external services
  </Card>

  <Card title="nut config" icon="gear" href="/cli/config">
    Manage configuration and API keys
  </Card>

  <Card title="nut auth" icon="lock" href="/cli/auth">
    Manage authentication
  </Card>

  <Card title="nut schema" icon="file-code" href="/cli/schema">
    Manage schema reference files
  </Card>
</CardGroup>

## Common Workflows

### Getting Started

```bash theme={null}
# Initialize Coconut in your repository
nut init

# Launch the web interface
nut serve
```

### Working with Tasks

```bash theme={null}
# Create a new task
nut task create "Add user authentication feature"

# List all tasks
nut task list

# View details of a specific task
nut task get cp-1234567890

# Add plan steps
nut task step cp-1234567890 "Implement login endpoint"

# Add comments
nut task comment cp-1234567890 "Ready for review"
```

### AI-Assisted Development

```bash theme={null}
# Start implementing a task with AI assistance
nut code cp-1234567890

# Use autonomous mode
nut code cp-1234567890 --autonomous

# Work in an isolated git worktree
nut code cp-1234567890 --new-worktree
```

### Managing Skills

```bash theme={null}
# List all skills
nut skill list

# Create a new skill
nut skill create "Code Reviewer" "Reviews pull requests for quality"

# Browse the skill registry
nut skill registry
```

### Generating Resources

```bash theme={null}
# Generate an image
nut resource image "A modern dashboard interface"

# Generate audio
nut resource audio "Welcome to our platform"

# Generate video
nut resource video "Product demonstration"
```

### Managing Knowledge

```bash theme={null}
# Create knowledge document
nut knowledge create "API Guidelines" --file ./docs/api.md

# List all documents
nut knowledge list

# Search knowledge base
nut knowledge list --search "authentication"
```

### Working with Peer Coconuts

```bash theme={null}
# List Coconut instances visible to you
nut coconut list

# List tasks on a peer Coconut
nut coconut task list --name coconut-research

# Search knowledge on a peer Coconut
nut coconut knowledge search "runbook" --name coconut-research

# List skills on a peer Coconut
nut coconut skill list --name coconut-research

# Inspect scheduled jobs on a peer Coconut
nut coconut job list --name coconut-research

# Discover raw MCP tools exposed by the Coconut Dashboard
nut coconut tools
```

### Notifications

```bash theme={null}
# Post to the configured Slack channel
nut notify slack "Deployment to staging complete"

# Include a title
nut notify slack "All systems operational" --title "Health Check"
```

### Context Management

```bash theme={null}
# Update role context
nut context update role --file ./ROLE.md

# Read context
nut context get agents

# Append to context
nut context append team "## Additional guidelines..."
```
