# `alta new`

> alta new: creates content from a skeleton; genres: chart, quest-pack, onboarding, cinematics, universe, mission, signin (`alta new chart` is `alta chart new`).

Creates content from a skeleton; genres: chart, quest-pack, onboarding, cinematics, universe, mission, signin (`alta new chart` is `alta chart new`).

## Usage

```text
alta new <genre> <dir> [--id <id>] [--kind <kind>] [--branch <branch>] [--template <flow>] [--tool <id>] [--force]
```

## Arguments

| Name | | Description |
|---|---|---|
| `genre` | **required** | What to create: chart, quest-pack, onboarding, cinematics, universe, mission, signin. |
| `dir` | **required** | The folder to write the files into (created if missing). |

## Options

| Name | Type | Default | Description |
|---|---|---|---|
| `--id` | *string* | *Default: the folder's name* | The content's id: lower-case letters, digits and dashes, 2 to 32 characters, starting with a letter. |
| `--kind` | *string* | *Default: agent* | chart: its kind, one of agent, team, module, skill, quest-pack, universe. |
| `--branch` | *string* | *Default: core* | The branch a quest pack adds its quests to. |
| `--template` | *string* | *Default: link-code* | signin: the sign-in template, one of link-code, device-code, email-link, secret, tool-browser. |
| `--tool` | *string* | *Default: the template's own* | signin: the tool, one of claude, codex, gh, practice that offers the template. |
| `--force` | *flag* |  | Overwrite files that already exist. |

## Exit codes

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

## Examples

*A quest pack, with a step that does it (inputs, run, check)*

```sh [Terminal]
alta new quest-pack my-pack
```

```text [Output]
created my-pack/quests.json (quest-pack, id my-pack)
next: edit the texts, then `alta lint my-pack`, then `alta dev my-pack`
```

*A universe, as a folder of data*

```sh [Terminal]
alta new universe my-world
```

```text [Output]
created my-world/universe.json, my-world/vocabulary.json, my-world/palette.json, my-world/copy/en.json, my-world/art.json, my-world/onboarding.json, my-world/copy/fr.json, my-world/cinematics.json (universe, id my-world)
next: edit the texts, then `alta lint my-world`, then `alta dev my-world`
```

*A sign-in step: a device code shown to the player*

```sh [Terminal]
alta new signin my-login --template device-code --tool gh
```

```text [Output]
created my-login/quests.json (signin, id my-login)
next: edit the texts, then `alta lint my-login`, then `alta dev my-login`
```

**TypeScript SDK:**

*The same from TypeScript, with `scaffold` from `@altasystem/sdk`; run it with `node example.mjs`.*

```js [example.mjs]
// The files `alta new` writes, without writing them: a valid start for each genre.
import { GENRES, scaffold, validate } from "@altasystem/sdk";

console.log(GENRES.join(", "));
for (const f of scaffold("quest-pack", { id: "my-pack" })) {
  const doc = JSON.parse(f.content);
  console.log(f.path, doc.schema, validate(doc).ok);
}
```

```text [Output]
chart, quest-pack, onboarding, cinematics, universe, mission, signin
quests.json alta.quests/0.3 true
```

## See also

- [Quickstart](https://docs.altasystem.ai/quickstart)
- [alta lint](https://docs.altasystem.ai/reference/cli/lint)
- [`scaffold` (SDK)](https://docs.altasystem.ai/reference/sdk/scaffold)
