Documentation
CLI Reference
The zt binary is the primary interface to 0trace. It is a thin dispatcher
over the runtime core — capability enforcement and audit logging apply to every command.
Installation
Linux / macOS (binary)
# Linux x86_64
curl -L https://releases.0trace.ai/latest/zt-linux-x86_64 -o /usr/local/bin/zt
chmod +x /usr/local/bin/zt
# macOS arm64
curl -L https://releases.0trace.ai/latest/zt-macos-arm64 -o /usr/local/bin/zt
chmod +x /usr/local/bin/zt
zt help Docker (no install)
docker run --rm -it ghcr.io/0trace-ai/zt:latest help To run a skill with Docker, mount your skill file into the container:
docker run --rm -it \
-v "$(pwd):/workspace" \
ghcr.io/0trace-ai/zt:latest \
run /workspace/my-skill.md Build from source
Requires Zig 0.13.0. Produces a single static binary with no runtime dependencies.
git clone https://github.com/0trace-ai/zt.git
cd zt
zig build -Doptimize=ReleaseSafe
./zig-out/bin/zt help Command Reference
Full list of zt commands and their flags.
| Command | Description |
|---|---|
zt help | Show available commands |
zt run <skill.md> | Execute a skill |
zt run <skill.md> --input k=v | Execute with input parameter |
zt install <skill.md> | Install and verify a skill |
zt verify <skill.md> | Verify skill signature |
zt sign <skill.md> | Sign a skill with your key |
zt skill init <name> | Scaffold a new skill from template Planned |
zt skill compat-check <skill.md> | Check capability declarations vs usage Planned |
zt skill publish <skill.md> | Publish skill to the 0trace registry Planned |
zt skills list | List installed skills Planned |
zt keys list | List trusted signing keys |
zt keys generate --name <id> | Generate a new Ed25519 signing keypair Planned |
zt keys trust <pubkey> | Trust a signing key |
zt keys revoke <pubkey> | Revoke a trusted key |
zt audit verify <run-id> | Verify the hash chain for a run |
zt audit export <run-id> | Export audit bundle (compliance) |
zt policy show | Show current global policy |
zt policy update | Update global policy |
zt serve | Start the HTTP API server (port 8743) |
zt serve --host 0.0.0.0 --port 8743 | Bind server to all interfaces |
zt node start --gateway <url> --token <bearer> | Start an execution node worker |
zt identity enroll <agent-id> | Generate an Ed25519 keypair and enroll an agent identity |
zt secrets list | List credential handles |
zt secrets audit | Review credential access events |
zt secrets rotate <handle-id> | Rotate a credential handle |
zt secrets breach-report --hours <n> | Export breach events for a time window |
zt credentials store | Store a credential in the vault Planned |
zt credentials rotate | Rotate a stored credential Planned |
Planned commands are implemented as internal runtime modules
but not yet wired into the zt CLI dispatcher — they are not callable in the current
build. Everything else on this page reflects the binary as it ships today.
Running Skills
zt run executes a skill file directly. No signing is required for local execution.
The runtime enforces all capability declarations and resource limits regardless.
Basic execution
zt run my-skill.md Passing input parameters
Input values are passed as key=value pairs with the --input flag.
zt run fetch-summary.md --input url=https://example.com
zt run report.md --input format=json --input limit=50 Deterministic mode
Replaces non-determinism (time, scheduling) for reproducible runs. Useful for testing and compliance.
zt run my-skill.md --deterministic Running an installed skill by name
Once installed, skills can be invoked by their registry name instead of file path.
zt run @acme/summarize --input text="..." Skill Management
Installing a skill locally
zt sign my-skill.md --key my-publisher-key
zt install my-skill.md zt skill init (scaffolding), zt skill
compat-check (capability-vs-usage validation), zt skill publish
(registry publish), and zt skills list (list installed skills) are
implemented as internal runtime modules but not yet wired into the zt CLI
dispatcher. Today, skill installation is limited to zt sign +
zt install.
See Writing Skills for the full skill format and the target sign-and-publish workflow.
Key Management
Skills published to the registry must be signed with an Ed25519 key. Private keys are stored in your system keychain — never written to disk as plaintext.
zt keys generate is not yet wired into the CLI.
Agent identity keys can be generated today via zt identity enroll <agent-id>,
which writes an Ed25519 key to ~/.zt/keys/<id>.key.
List trusted keys
zt keys list
Key ID Fingerprint Trust Level
────────────────────────────────────────────────────────────────
my-publisher-key ed25519:a1b2c3d4e5f6... local
acme-corp ed25519:f6e5d4c3b2a1... registry Trust a key
Verify the fingerprint out-of-band before trusting any key.
zt keys trust ed25519:<public-key-hex> Revoke a key
zt keys revoke <key-id> --reason "publisher account compromised" zt install --skip-verification. If a skill fails
signature verification, investigate before proceeding.
Audit Trail
Every execution produces a hash-chained audit log stored in SQLite.
Events are SHA256-chained — any tampering is detectable with zt audit verify.
Verify the hash chain
zt audit verify abc123
Chain OK — 5 events, no tampering detected Export a compliance bundle
zt audit export abc123 --output audit-bundle.json zt audit only exposes verify and export subcommands
today — there is no standalone command to print a run's event list; use
zt audit export and inspect the JSON bundle, or query
GET /api/audit/:run_id on a running zt serve instance.
Audit event types
| Event Type | When Emitted |
|---|---|
execution_start | Skill execution begins |
capability_check | A capability is checked (pass or deny) |
host_invocation | A host function is called |
file_access | A file is read or written |
network_call | An HTTP request is made |
resource_violation | A resource limit is exceeded |
execution_end | Skill execution completes |
Policy
Global policy defines domain allowlists, path restrictions, rate limits, and capability overrides that apply to every skill execution on the host.
View current policy
zt policy show Update policy
zt policy update <policy.json> [--skill <id>] [--dry-run] Default resource limits per execution
| Resource | Default Limit |
|---|---|
| Memory | 64 MB |
| Wall-clock time | 30 seconds |
| Outbound network bytes | 10 MB |
| File I/O operations | 1,000 |
| Concurrent task depth | 16 levels |
Skills can declare lower limits in their ## Policy section. They cannot
override stricter limits set by the operator policy.
HTTP Server
zt serve starts a REST API on port 8743 (default). The server binds to
127.0.0.1 by default — pass --host 0.0.0.0 to expose it.
zt serve
# API token printed to stderr on startup — required for all requests
zt serve --host 0.0.0.0 --port 8743 HTTP API endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /api/status | Server health and version |
POST | /api/run | Execute a skill |
GET | /api/skills | List installed skills |
POST | /api/skills/install | Install a skill |
POST | /api/skills/verify | Verify a skill signature |
GET | /api/policy | Get global policy |
PUT | /api/policy | Update global policy |
GET | /api/keys | List trusted keys |
POST | /api/keys/trust | Trust a signing key |
POST | /api/keys/revoke | Revoke a key |
GET | /api/audit/:run_id | Fetch audit log for a run |
GET | /api/audit/:run_id/export | Export audit bundle |
GET | /api/csrf | Get CSRF token |
All endpoints require the API token generated at server startup (passed as Authorization: Bearer <token>).
Credentials
API keys and secrets are stored in 0trace's encrypted vault — never in environment variables or plaintext files. See Secret Management for the full architecture.
# List credential handles
zt secrets list
# Review credential access in the audit log
zt secrets audit
# Rotate a credential handle
zt secrets rotate <handle-id>
# Export breach events from the last 24 hours
zt secrets breach-report --hours 24 zt credentials store/rotate/migrate (interactive
credential entry) are not yet wired into the CLI. Credentials are currently provisioned
through the vault backend configuration — see
Secret Management.