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

# charm init

Scaffold a new Charm agent project.

## Usage

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
charm init <name> [--template <template>] [--create <file>] [--interactive]
```

## Common Examples

Create a minimal Python agent:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
charm init my-agent --template python
```

Start an interactive prompt for template selection:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
charm init my-agent --interactive
```

Create a single file from a template:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
charm init . --create charm.yaml
```

## Options

| Option                | Description                                                                                                                                                  |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `name`                | Agent directory path. Use `.` for the current directory.                                                                                                     |
| `--template`          | Template to use. Defaults to `python`. Valid values are fetched dynamically from the community templates registry (e.g., `python`, `openclaw`, `slack-bot`). |
| `--create`            | Create a single file instead of a full project.                                                                                                              |
| `--interactive`, `-i` | Launch guided template selection.                                                                                                                            |

## Generated Structure

Most templates produce:

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
my-agent/
├── charm.yaml
├── requirements.txt or pyproject.toml
└── src/
    └── main.py
```

After scaffolding, run:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
cd my-agent
charm validate .
charm run . --input "Hello"
```
