Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

@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 enc enclave 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 help

Published to the ENC registry at https://npm-registry.ocrybit.workers.dev/.

Top-level commands

CommandWhat it does
enc helpShow top-level help.
enc appsList installed/available apps.
enc add <app>Install a per-app SDK package locally.
enc remove <app>Uninstall an app.
enc listList installed apps.
enc keygenGenerate a keypair (saved to ~/.enc/key.json).
enc keygen --forceRegenerate keypair.
enc nodeStart a local node (development).

Skill commands

Install Claude Code skills into the current project.

CommandWhat 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 listList installed skills.
enc skill searchSearch 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)
Flags:
  • --mem — use the in-process backend (default is cf via NODE_URL)
  • --node=<url> — override NODE_URL
  • --json — output structured JSON (useful for piping or agents)

Resolution: data_types vs enclave events

enc <app> submit <name> accepts either:

  1. App-level data_type (preferred) — resolved via schema.tableMap to the underlying enclave event.
  2. 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

CommandWhat it does
enc app <app>Launch TUI (cf mode) — Ink terminal UI
enc app <app> --memLaunch TUI (mem mode)
enc <app>:replInteractive REPL (mem)
enc <app>:repl:cfInteractive REPL (cf)
enc <app>:tui:memTUI explicitly in mem mode
enc <app>:tui:cfTUI explicitly in cf mode

Environment variables

VariableDefaultDescription
ENC_HOME~/.encIdentity + per-app state directory.
NODE_URLcf-mode default backend (a wrangler dev URL or a production node).
ENC_SKILLS_DIR~/.claude/skillsLocal 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