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

# Project

> Initialize, load, save, and inspect Vibrai project files.

Initialize, load, save, and inspect Vibrai project files.

## Command line

### `project init`

Initialize a new .vibrai project file

```bash theme={null}
vibrai project init --name <NAME> --project <PATH> --demo --genre <NAME> --preset <PRESET>
```

<ParamField path="--name">
  Project name (default: basename of --project, or "Untitled")
</ParamField>

<ParamField path="--project">
  Path to .vibrai file (default: Untitled.vibrai in CWD; auto-uniquified to Untitled-2.vibrai, etc. if it already exists)
</ParamField>

<ParamField path="--demo">
  Write opinionated demo content (3 sections, 2 parts, exercises variation + scale overrides + naming) instead of the boilerplate
</ParamField>

<ParamField path="--genre">
  Seed from a genre library by id or display name (run 'vibrai genre list')
</ParamField>

<ParamField path="--preset">
  Preset id or display name within --genre (default: first preset alphabetically)
</ParamField>

### `project load`

Load and display a project file

```bash theme={null}
vibrai project load --project <PATH>
```

<ParamField path="--project">
  Path to .vibrai file (default: Untitled.vibrai in CWD)
</ParamField>

### `project save`

Save the current project state

```bash theme={null}
vibrai project save --project <PATH>
```

<ParamField path="--project">
  Path to .vibrai file (default: Untitled.vibrai in CWD)
</ParamField>

### `project info`

Show project file info

```bash theme={null}
vibrai project info --project <PATH>
```

<ParamField path="--project">
  Path to .vibrai file (default: Untitled.vibrai in CWD)
</ParamField>

## MCP tools

### `init_project`

Create a new .vibrai YAML file at the given absolute path. Without `demo`, writes a minimal 2-section / 1-part boilerplate. With `demo: true`, writes an opinionated 3-section / 2-part starter that exercises variation, per-section scale overrides, naming, and both generator types. Track IDs are probed from the bridge (first N MIDI tracks) and each probed binding records the track's current name (part `track_name`) so `generate` reuses those tracks; if the bridge is unreachable, falls back to track 1 (and 2 for demo) with no binding.

```json theme={null}
{
  "tool": "init_project",
  "arguments": {
    "path": "<String>",
    "name": "<String>",
    "demo": "<Boolean>"
  }
}
```

<ParamField path="path" type="String" required>
  Absolute filesystem path for the new .vibrai file.
</ParamField>

<ParamField path="name" type="String">
  Project display name. Defaults to the basename of `path` (e.g. "my-song" for `…/my-song.vibrai`).
</ParamField>

<ParamField path="demo" type="Boolean">
  If true, write the demo content instead of the boilerplate.
</ParamField>

### `load_project`

Load a .vibrai YAML file from the given absolute path. Returns the VibraiProject. Returns null if the file is missing.

```json theme={null}
{
  "tool": "load_project",
  "arguments": {
    "path": "<String>"
  }
}
```

<ParamField path="path" type="String" required>
  Absolute filesystem path to the .vibrai file.
</ParamField>

### `save_project`

Save a VibraiProject (same shape as load\_project's return value) to the given absolute path, overwriting any existing file. Validates the project first; rejects invalid input (e.g. section modifier \<= 0) without writing the file.

```json theme={null}
{
  "tool": "save_project",
  "arguments": {
    "path": "<String>"
  }
}
```

<ParamField path="path" type="String" required>
  Absolute filesystem path to write to.
</ParamField>

### `project_info`

Return a summary of the project (counts of sections, parts, templates) at the given path.

```json theme={null}
{
  "tool": "project_info",
  "arguments": {
    "path": "<String>"
  }
}
```

<ParamField path="path" type="String" required>
  Absolute filesystem path to the .vibrai file.
</ParamField>
