# engram init

Source: https://usecns.dev/engram-cli-init/

[Start here](https://usecns.dev/manual-engram/)
[CLI commands](https://usecns.dev/commands-engram/)
[Configuration & integration](https://usecns.dev/engram-topics/)

Create a workspace's memory configuration and database. Run this before recording your first rule.

## Syntax

```
engram init [--domain SLUG] [--archetype NAME] [--template PATH] [--out PATH] [--db PATH] [--force]
```

## Options

| Option | Meaning / default / errors |
| --- | --- |
| `--domain SLUG` | Nonempty ontology domain; changes M2 mount to `repo:SLUG`. Otherwise template/built-in domain. |
| `--archetype NAME` | Nonempty role; adds `archetype:` if absent and changes M1 mount. Otherwise template/built-in role. |
| `--template PATH` | Read an existing valid OTE as the starting template; otherwise built-in. |
| `--out PATH` | OTE output, default `.engram/ote.toml`. |
| `--force` | Allow overwriting an existing OTE; without it an existing file fails. |
| `--db PATH` | Database output; default beside `--out`, with `.engram/engram.db` fallback. |

## Example

In an empty test directory:

```
engram init --domain synthetic-demo
engram validate-ote .engram/ote.toml
```

## Results and errors

Creates `.engram/ote.toml` and `.engram/engram.db` by default. The domain selects the M2 mount `repo:synthetic-demo`. Initialization refuses an existing manifest unless `--force` is supplied; use that option only when replacing the configuration is intentional. Invalid templates, blank domain/archetype values and unwritable outputs fail.

Next, [record a rule](https://usecns.dev/engram-cli-record/) or [review workspace configuration](https://usecns.dev/engram-topic-configure-workspaces-and-mounted-scopes/).

See [CLI conventions](https://usecns.dev/engram-cli-usage/) for shared configuration and exit behavior, or [browse all commands](https://usecns.dev/commands-engram/).