@enc-protocol/cli — the app CLI
The global enc binary that drives ENC Protocol apps from the command line — installing
app SDKs, minting enclaves, and submitting/querying app data.
This is the npm app-driver CLI. It's distinct from the Rust
encenclave CLI, which is the lower-level git-style tool for raw enclave operations (commits, bundles, proofs).
Install
npm install -g @enc-protocol/cli --registry https://npm-registry.ocrybit.workers.dev/
enc helpPublished to the ENC registry at https://npm-registry.ocrybit.workers.dev/.
Top-level commands
| Command | What it does |
|---|---|
enc help | Show top-level help. |
enc apps | List installed/available apps. |
enc add <app> | Install a per-app SDK package locally. |
enc remove <app> | Uninstall an app. |
enc list | List installed apps. |
enc keygen | Generate a keypair (saved to ~/.enc/key.json). |
enc keygen --force | Regenerate keypair. |
enc node | Start a local node (development). |
Skill commands
Install Claude Code skills into the current project.
| Command | What it does |
|---|---|
enc skill add <name> | Install skill → symlinks SKILL.md into ./.claude/commands/<name>.md. |
enc skill remove <name> | Remove the symlink + uninstall the skill package. |
enc skill list | List installed skills. |
enc skill search | Search available skills on the registry. |
Resolution: enc skill add <name> looks for @enc-protocol/skill-<name> first, falls back to
@enc-protocol/<name>.
Per-app commands
For any app with an apps/<id>/ definition:
enc <app> help # actions/reads + examples
enc <app> submit <name> [<json-args>] # write (data_type or enclave event)
enc <app> query [<name>] # read events; no name = all events
enc <app> whoami # identity / enclaves / mode
enc <app> create # mint enclaves (cf only)--mem— use the in-process backend (default is cf viaNODE_URL)--node=<url>— overrideNODE_URL--json— output structured JSON (useful for piping or agents)
Resolution: data_types vs enclave events
enc <app> submit <name> accepts either:
- App-level data_type (preferred) — resolved via
schema.tableMapto the underlying enclave event. - Enclave-level event (backward compat) — passed through unchanged.
# App-level (super has tableMap.messages → DM.message)
enc super submit messages '{"message_draft":"hi"}'
# Enclave-level (writes to DM.message directly)
enc super submit message '{"message_draft":"hi"}'For multi-enclave apps, app-level routing is the canonical surface.
TUI / REPL
| Command | What it does |
|---|---|
enc app <app> | Launch TUI (cf mode) — Ink terminal UI |
enc app <app> --mem | Launch TUI (mem mode) |
enc <app>:repl | Interactive REPL (mem) |
enc <app>:repl:cf | Interactive REPL (cf) |
enc <app>:tui:mem | TUI explicitly in mem mode |
enc <app>:tui:cf | TUI explicitly in cf mode |
Environment variables
| Variable | Default | Description |
|---|---|---|
ENC_HOME | ~/.enc | Identity + per-app state directory. |
NODE_URL | — | cf-mode default backend (a wrangler dev URL or a production node). |
ENC_SKILLS_DIR | ~/.claude/skills | Local skill install directory. |
State layout
~/.enc/
key.json identity keypair
apps/<app>/state/
cf-state.json enclaveId + nodeUrl (single-enclave apps)
cf-<enclave>.json per-enclave for multi-enclave apps
mem-state.json replayed event log (mem mode)See also
@enc-protocol/cli-sdk-base— the base SDK classes the CLI uses internally- Per-app SDKs — the programmatic surface behind
enc <app>