# CLI

Use ledger capabilities from terminals and agents.

Canonical page: /docs/cli

## Start and discover

Bare launch prepares a local ledger without prompts. Explicit start can offer service setup in an interactive terminal. Select a connection and ledger once, or pass --connection and --ledger-id for a specific operation.

```shell
op-sys
op-sys --output json ledgers inspect
op-sys --output json capabilities get --name records.append
```

- [Detailed contract and examples](/docs/raw/manuals/ledger-core.md)

## Pass structured input

JSON arguments accept inline JSON, @file or - for stdin. Use --output json for the CLI result envelope. Record operations include append, get, list, search, feed, state, outcome and erase; there is no separate local versus hosted record command set.

- [Detailed contract and examples](/docs/raw/manuals/cli-contract.md)

## Related guides

- [How ledgers work](/docs/raw/ledger-core.md)
