Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CLI Reference

Carry provides a small set of commands for interacting with Dialog DB. Every command follows a consistent pattern and shares global options.

Commands

CommandAliasDescription
carry initiCreate a new repository
carry assertaAssert claims (add or update data)
carry queryqQuery entities by domain or concept
carry retractrRetract claims (remove data)
carry statusstShow repository info

Global Options

Every command accepts:

FlagDescription
--repo <PATH>Path to a specific .carry/ repository. Skips filesystem walk.
--format <FORMAT>Output format: yaml (default), json, or triples.

Repo Resolution

When --repo is omitted, Carry walks up the filesystem tree from $PWD toward $HOME, looking for a .carry/ directory. The first one found is used. You can also set the CARRY_REPO environment variable.

Output Formats

FormatDescriptionBest for
yamlAsserted notation (default)Human reading, file round-trips
jsonArray of objects with id fieldProgrammatic consumption
triplesFlat EAV YAML (the/of/is)Piping between carry commands

The preferred format can also be persisted as a setting:

carry assert xyz.tonk.carry output-format=json

Command-line --format always takes precedence over the persisted preference.

Target Syntax

Several commands accept a <TARGET> argument. The syntax is:

PatternInterpretationExample
Contains .Domain targetcom.app.person
No .Concept target (resolved by bookmark name)person
-Read from stdin-
Contains / or ends in .yaml/.yml/.jsonFile pathschema.yaml

Field Syntax

Commands that accept fields use the format FIELD[=VALUE]:

SyntaxMeaning
nameProjection: include this field in output
name="Alice"Filter: only match entities where name is Alice
this=did:key:z...Target a specific entity
@mynameAssert dialog.meta/name on the entity (bookmark)

Value Auto-Detection

When asserting values via the CLI, Carry auto-detects the type:

InputDetected Type
did:key:z...Entity reference
123Unsigned integer
-5Signed integer
3.14Float
true / falseBoolean
Anything elseText (string)