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

# Use the command line

> Command-line interface for interacting with Chucky

# Chucky CLI

The Chucky CLI (`@chucky.cloud/cli`) is a powerful command-line tool for developers to:

* **Deploy workspaces** to Chucky cloud
* **Schedule cron jobs** for recurring prompts
* **Run prompts** against any project in your account
* **Enable Claude to control your machine** with host tools (Possession Mode)

## Installation

```bash theme={null}
npm install -g @chucky.cloud/cli
```

## Authentication

Before using the CLI, authenticate with your Chucky account:

```bash theme={null}
chucky login
```

You'll be prompted to enter your API key (found in [app.chucky.cloud](https://app.chucky.cloud) under Account Settings).

## Commands

### Core Commands

| Command                   | Description                                       |
| ------------------------- | ------------------------------------------------- |
| `chucky login`            | Authenticate with your Chucky account             |
| `chucky list`             | List all projects in your account                 |
| `chucky init`             | Initialize a new project in the current directory |
| `chucky deploy`           | Deploy workspace and cron jobs to Chucky cloud    |
| `chucky keys`             | Show HMAC key for current project                 |
| `chucky prompt`           | Send prompts to any project                       |
| `chucky config anthropic` | Set Anthropic API key for a project               |
| `chucky delete`           | Delete a project                                  |

### Jobs (Background Tasks)

| Command              | Description                   |
| -------------------- | ----------------------------- |
| `chucky jobs create` | Create a new background job   |
| `chucky jobs list`   | List recent jobs              |
| `chucky jobs get`    | Get details of a specific job |
| `chucky jobs cancel` | Cancel a running job          |

### Sessions & History

| Command           | Description          |
| ----------------- | -------------------- |
| `chucky sessions` | List session history |

### Git Bundles (Sync Changes)

| Command          | Description                        |
| ---------------- | ---------------------------------- |
| `chucky fetch`   | Download changes to a local branch |
| `chucky diff`    | View pending changes               |
| `chucky log`     | View commit history                |
| `chucky apply`   | Apply changes to working directory |
| `chucky discard` | Remove fetched branch              |
| `chucky pull`    | Fetch + apply in one step          |

## Quick Examples

### List your projects

```bash theme={null}
chucky list
```

### Send a simple prompt

```bash theme={null}
chucky prompt "What is 2+2?" --project my-project
```

### Enable Claude to run commands on your machine

```bash theme={null}
chucky prompt "List all TypeScript files and count them" \
  --project my-project \
  --allow-possession \
  --dangerously-skip-permissions
```

<Note>
  The `--allow-possession` flag is a powerful feature that lets Claude execute commands on your local machine. See [Possession Mode](/cli/possession) for details.
</Note>

## Next Steps

<CardGroup cols={3}>
  <Card title="Prompt Command" icon="terminal" href="/cli/prompt">
    All options for the prompt command
  </Card>

  <Card title="Jobs" icon="clock" href="/cli/jobs">
    Create background tasks
  </Card>

  <Card title="Git Bundles" icon="code-branch" href="/cli/bundles">
    Fetch and apply changes
  </Card>

  <Card title="Sessions" icon="list" href="/cli/sessions">
    View session history
  </Card>

  <Card title="Cron Jobs" icon="calendar" href="/cli/cron">
    Schedule recurring prompts
  </Card>

  <Card title="Possession Mode" icon="ghost" href="/cli/possession">
    Let Claude control your machine
  </Card>
</CardGroup>
