# `alta chart`

> alta chart: creates a chart from a skeleton (kinds: agent, team, module, skill, quest-pack, universe), reads one without installing it, or pins a release at its version.

Creates a chart from a skeleton (kinds: agent, team, module, skill, quest-pack, universe), reads one without installing it, or pins a release at its version.

## Usage

```text
alta chart new <dir> [--kind <kind>] [--id <id>] [--force] | inspect <id|dir> [--files] [--file <path>] [--versions] [--json] | pin <chart> --reason <text> | unpin <chart>
```

## Arguments

| Name | | Description |
|---|---|---|
| `new|inspect|pin|unpin` | **required** | new: create a chart. inspect: read a chart without installing it: what it asks for, its risk level, its files, its versions (read only, no network). pin: keep an installed release at its version, with a reason: upgrades and rollbacks are skipped (through the machine's server). unpin: take the pin back. |
| `dir|id|chart` | **required** | new: the folder to write the chart into (created if missing); its name is the chart's id. inspect: a chart folder, or the id of a chart of this machine's folders, of a pulled chart or of a cached index. pin, unpin: an installed chart. |

## Options

| Name | Type | Default | Description |
|---|---|---|---|
| `--kind` | *string* | *Default: agent* | new: the chart's kind, one of agent, team, module, skill, quest-pack, universe. |
| `--id` | *string* | *Default: the folder's name* | new: the chart's id: lower-case letters, digits and dashes, 2 to 32 characters, starting with a letter. |
| `--force` | *flag* |  | new: overwrite files that already exist. |
| `--files` | *flag* |  | inspect: list every file with its size and sha256, and the tree digest. |
| `--file` | *string* |  | inspect: print one text file of the chart (a path inside it). |
| `--versions` | *flag* |  | inspect: the versions in the cached indexes, the ones kept here for a rollback, and the installed one. |
| `--reason` | *string* |  | pin: why this version stays, one line; shown each time an upgrade is skipped. |
| `--json` | *flag* |  | Print the result (alta.inspect/1) as JSON. |
| `--server` | *string* | *Default: http://127.0.0.1:8790* | The machine's server. Its token comes from the WORLD_TOKEN environment variable, never from an argument. |

## Exit codes

| Name | Description |
|---|---|
| `0` | ok |
| `1` | problems found |
| `2` | bad usage |
| `3` | not in this version |

## Examples

*An agent: its files, its sign-in, its proof*

```sh [Terminal]
alta chart new my-agent
```

```text [Output]
created my-agent/chart.json, my-agent/README.md, my-agent/agents/helper/SOUL.md, my-agent/agents/helper/AGENTS.md (chart, id my-agent)
next: edit the texts, then `alta lint my-agent`, then `alta template my-agent`
```

*A team of agents*

```sh [Terminal]
alta chart new my-team --kind team
```

```text [Output]
created my-team/chart.json, my-team/README.md, my-team/agents/writer/SOUL.md, my-team/agents/writer/AGENTS.md, my-team/agents/editor/SOUL.md, my-team/agents/editor/AGENTS.md (chart, id my-team)
next: edit the texts, then `alta lint my-team`, then `alta template my-team`
```

*Read a chart before installing it*

```sh [Terminal]
alta chart inspect my-agent
```

```text [Output]
my-agent 0.1.0 (agent)  My Agent
  Replace this summary: what the owner gets, in one sentence.
read from:    this folder
publisher:    you
license:      MIT
price:        free
privacy:      personal
locality:     local-first
risk:         medium
  - It installs programs on your machine.
  - It needs you to sign in (Claude, ChatGPT).
  - An agent may reach the network where it chooses (message).
  - It talks to online services while it runs (Claude).
capabilities: install
agent:        helper (Helper): files SOUL.md, AGENTS.md; tools read, message, never write, edit, exec, browser
requires:     alta-os >=0.1.0 <1.0.0
parts:        agent (agent.create)
ready when:   agent helper

more: --files, --file <path>, --versions, --json
```

*Its files and their digests*

```sh [Terminal]
alta chart inspect my-agent --files
```

```text [Output]
my-agent 0.1.0 (agent)  My Agent
  Replace this summary: what the owner gets, in one sentence.
read from:    this folder
publisher:    you
license:      MIT
price:        free
privacy:      personal
locality:     local-first
risk:         medium
  - It installs programs on your machine.
  - It needs you to sign in (Claude, ChatGPT).
  - An agent may reach the network where it chooses (message).
  - It talks to online services while it runs (Claude).
capabilities: install
agent:        helper (Helper): files SOUL.md, AGENTS.md; tools read, message, never write, edit, exec, browser
requires:     alta-os >=0.1.0 <1.0.0
parts:        agent (agent.create)
ready when:   agent helper

files (4, tree digest 5868a4d8874b1e4ac8b42810aac8e877074190f3efd288e96183e68a2263f322):
  README.md                                    138  cf99df079af0
  agents/helper/AGENTS.md                       94  ebdf78bbcf13
  agents/helper/SOUL.md                        132  e076ab815e8e
  chart.json                                  2042  e0cfa7213726
```

*Keep a release at its version*

```sh [Terminal]
alta chart pin morning-brief --reason "waiting for my review of 1.2"
```

*Talks to the machine's server (WORLD_TOKEN set): it prints the plan, then each change and the proofs.*

## See also

- [alta lint](https://docs.altasystem.ai/reference/cli/lint)
- [alta template](https://docs.altasystem.ai/reference/cli/template)
