carry init
Create a new Dialog DB repository.
Synopsis
carry init [LABEL] [--repo <PATH>]
Description
Creates a .carry/ directory. If --repo is not specified, the repository is created in the current working directory.
The command:
- Generates an Ed25519 keypair for the repository.
- Creates
.carry/<did>/with acredentialsfile andclaims/directory. - Bootstraps the builtin concepts (
attribute,concept,bookmark) so they can be used immediately. - If
LABELis provided, asserts it as the repository label.
If a .carry/ directory already exists at the target location, the command reports its status.
Arguments
| Argument | Description |
|---|---|
LABEL | Optional label for the repository (e.g., “my-project”) |
Options
| Flag | Description |
|---|---|
--repo <PATH> | Directory where .carry/ should be created. Defaults to $PWD. |
Examples
# Initialize in current directory
carry init
# Initialize with a label
carry init my-project
# Initialize in a specific directory
carry init --repo /path/to/project
# Initialize with label in specific directory
carry init my-project --repo /path/to/project
Output
Initialized my-project repository in /path/to/.carry/did:key:zAbc123
Notes
- Running
carry initinside a directory that is already within an existing repository creates a nested repository. Carry does not detect or warn about nesting. - The DID (e.g.,
did:key:zAbc123) is derived from the generated public key and is globally unique. - The private key at
.carry/<did>/credentialsis stored with mode0600(owner read/write only).