chainlesschain
v0.166.0
Published
CLI for ChainlessChain - install, configure, and manage your personal AI management system
Downloads
8,120
Maintainers
Readme
chainlesschain CLI
Command-line interface for installing, configuring, and managing ChainlessChain — a decentralized personal AI management system with hardware-level security.
Quick Start
npm install -g chainlesschain
chainlesschain setupAfter installation, four equivalent commands are available:
| Command | Description |
| ---------------- | ----------------------------------------------------------------- |
| chainlesschain | Full name |
| cc | Shortest alias, recommended for daily use |
| clc | ChainLessChain abbreviation, avoids cc conflict with C compiler |
| clchain | chainlesschain abbreviation, easy to recognize |
cc setup # equivalent to: chainlesschain setup
clchain start # equivalent to: chainlesschain start
# In a terminal, no subcommand starts the coding agent
cc
# Piped input runs one non-interactive agent turn
git diff | ccRequirements
- Node.js >= 22.12.0
- Docker (optional, for backend services)
Shell completion
Completion files are generated from the same command manifest as cc --help
and ship in the npm package under completions/:
# Bash
source "$(npm root -g)/chainlesschain/completions/cc.bash"
# Zsh
fpath=("$(npm root -g)/chainlesschain/completions" $fpath)
autoload -Uz compinit && compinit
# Fish
source (npm root -g)/chainlesschain/completions/cc.fish# PowerShell
. (Join-Path (npm root -g) "chainlesschain/completions/cc.ps1")Commands
175 top-level compatibility commands are registered.
cc --helpshows the curated coding-agent surface; runcc help --allfor the complete manifest-generated list andcc help <command>for generated command-specific help.
Compatibility namespace and command lifecycle
The registered Commander graph contains 175 top-level commands (net growth 0 against the 175-command baseline). After excluding 25 deprecated compatibility entries and adding lab as their recommended namespace, the recommended top-level surface contains 151 commands. lab is phase-0 only, not another eagerly registered command.
| Legacy entry | Replacement | Deprecated since | Removal not before | Minimum window |
| ------------ | ---------------- | ---------------- | ------------------ | -------------- |
| bm25 | lab bm25 | 0.162.194 | 0.164.0 | 2 minor cycles |
| ccron | lab ccron | 0.162.194 | 0.164.0 | 2 minor cycles |
| compt | lab compt | 0.162.194 | 0.164.0 | 2 minor cycles |
| consol | lab consol | 0.162.194 | 0.164.0 | 2 minor cycles |
| dao | lab dao | 0.162.189 | 0.164.0 | 2 minor cycles |
| evomap | lab evomap | 0.162.189 | 0.164.0 | 2 minor cycles |
| execbe | lab execbe | 0.162.194 | 0.164.0 | 2 minor cycles |
| fflag | lab fflag | 0.162.194 | 0.164.0 | 2 minor cycles |
| itbudget | lab itbudget | 0.162.194 | 0.164.0 | 2 minor cycles |
| mcpscaf | lab mcpscaf | 0.162.194 | 0.164.0 | 2 minor cycles |
| meminj | lab meminj | 0.162.194 | 0.164.0 | 2 minor cycles |
| orchgov | lab orchgov | 0.162.194 | 0.164.0 | 2 minor cycles |
| pdfp | lab pdfp | 0.162.194 | 0.164.0 | 2 minor cycles |
| promcomp | lab promcomp | 0.162.194 | 0.164.0 | 2 minor cycles |
| seshhook | lab seshhook | 0.162.194 | 0.164.0 | 2 minor cycles |
| seshsearch | lab seshsearch | 0.162.194 | 0.164.0 | 2 minor cycles |
| seshtail | lab seshtail | 0.162.194 | 0.164.0 | 2 minor cycles |
| seshu | lab seshu | 0.162.194 | 0.164.0 | 2 minor cycles |
| sganal | lab sganal | 0.162.194 | 0.164.0 | 2 minor cycles |
| slotfill | lab slotfill | 0.162.194 | 0.164.0 | 2 minor cycles |
| svccont | lab svccont | 0.162.194 | 0.164.0 | 2 minor cycles |
| tms | lab tms | 0.162.194 | 0.164.0 | 2 minor cycles |
| topiccls | lab topiccls | 0.162.194 | 0.164.0 | 2 minor cycles |
| uprof | lab uprof | 0.162.194 | 0.164.0 | 2 minor cycles |
| vcheck | lab vcheck | 0.162.194 | 0.164.0 | 2 minor cycles |
Both forms route to the same lazy command registrar during the compatibility window. Legacy invocations emit their migration notice on stderr only.
chainlesschain setup
Interactive setup wizard. Checks prerequisites, configures LLM provider, downloads the desktop binary, and optionally starts Docker services.
chainlesschain setup
chainlesschain setup --skip-download # Skip binary download
chainlesschain setup --skip-services # Skip Docker setupchainlesschain start
Launch the ChainlessChain desktop application.
chainlesschain start # Launch GUI app
chainlesschain start --headless # Start backend services only (no GUI)
chainlesschain start --services # Also start Docker serviceschainlesschain stop
Stop ChainlessChain.
chainlesschain stop # Stop desktop app
chainlesschain stop --services # Stop Docker services only
chainlesschain stop --all # Stop app + Docker serviceschainlesschain status
Show status of the desktop app, Docker services, and port availability.
chainlesschain status
chainlesschain status --json # Fast machine-readable snapshot
chainlesschain status --deep # Also inspect Docker Compose serviceschainlesschain services <action>
Manage Docker backend services (Ollama, Qdrant, PostgreSQL, Redis, etc.).
chainlesschain services up # Start all services
chainlesschain services up ollama redis # Start specific services
chainlesschain services down # Stop all services
chainlesschain services logs # View logs
chainlesschain services logs -f # Follow logs
chainlesschain services pull # Pull latest imageschainlesschain config <action>
Manage configuration.
chainlesschain config list # Show all config values
chainlesschain config get llm.provider # Get a specific value
chainlesschain config set llm.provider openai
chainlesschain config set-secret llm.apiKey # Hidden prompt; secret never enters argv
chainlesschain config validate # Validate schema + private permissions
chainlesschain config explain llm.model # Show effective source / policy lock
chainlesschain config edit # Open in $EDITOR
chainlesschain config reset # Reset to defaultschainlesschain update
Check for and install updates.
chainlesschain update # Update to latest stable
chainlesschain update --check # Check only, don't download
chainlesschain update --channel beta # Use beta channel
chainlesschain update --channel dev # Use dev channel
chainlesschain update --force # Re-download even if existschainlesschain doctor
Diagnose your environment.
chainlesschain doctorChecks: Node.js version, npm, Docker, Docker Compose, Git, config directory, binary installation, setup status, port availability, disk space.
Headless Commands
These commands work without the desktop GUI, using core packages directly.
chainlesschain db <action>
Database management.
chainlesschain db init # Initialize the database
chainlesschain db init --path ./my.db # Custom database path
chainlesschain db info # Show database info (driver, tables, size)
chainlesschain db info --json # JSON output
chainlesschain db backup [output] # Create backup
chainlesschain db restore <backup> # Restore from backupchainlesschain note <action>
Note and knowledge base management.
chainlesschain note add "My Note" -c "Content here" -t "tag1,tag2"
chainlesschain note list # List recent notes
chainlesschain note list --category dev --tag important
chainlesschain note show <id> # Show note by ID prefix
chainlesschain note search "keyword" # Full-text search
chainlesschain note delete <id> # Soft delete
chainlesschain note history <id> # Version history
chainlesschain note diff <id> <v1> <v2> # Diff between versions
chainlesschain note revert <id> <ver> # Revert to a versionchainlesschain chat
Start an interactive AI chat session with streaming output.
chainlesschain chat # Default: Ollama qwen2.5:7b
chainlesschain chat --model llama3 # Use different model
chainlesschain chat --provider openai # Reads the stored credential
chainlesschain chat --agent # Agentic mode (can read/write files)Slash commands in chat: /exit, /model, /provider, /clear, /history, /help
chainlesschain ask <question>
Single-shot AI question (non-interactive).
chainlesschain ask "What is WebRTC?"
chainlesschain ask "Explain this code" --model gpt-4o --provider openai
chainlesschain ask "Hello" --json # JSON output with question/answer/modelchainlesschain llm <action>
LLM provider management.
chainlesschain llm models # List installed Ollama models
chainlesschain llm models --json # JSON output
chainlesschain llm test # Test Ollama connectivity
chainlesschain llm test --provider openai # Reads the stored credential
chainlesschain llm providers # List 10 built-in LLM providers
chainlesschain llm add-provider <name> # Add custom provider
chainlesschain llm switch <name> # Switch active providerchainlesschain agent (alias: a)
Start an agentic AI session — the AI can read/write files, run shell commands, search the codebase, execute code (Python/Node.js/Bash with auto pip-install), and invoke 141 built-in skills.
chainlesschain agent # Explicit form; plain `cc` is equivalent in a TTY
chainlesschain a --model llama3 # Short alias
chainlesschain config set-secret llm.apiKey
chainlesschain agent --provider openai # Reads the stored credentialBuilt-in tools (19): read_file, write_file, edit_file, edit_file_hashed, notebook_edit, run_shell, check_shell, git, search_files, list_dir, run_skill, list_skills, run_code, spawn_sub_agent, web_fetch, web_search, todo_write, ask_user_question, search_sessions
Agent slash commands (49 built-in) — type / for TAB completion, /help for the in-session list. Full reference: cli-agent-mode.
- Session:
/help/clear/exit/session/sessions/rewind/search/export/copy - Model:
/model/provider/think/ultrathink - Context & memory:
/context/compact/microcompact/memory/init/reindex/stats/task/todos/profile - Display:
/theme/vim/statusline/output-style/terminal-setup/cd/add-dir - Tools & observability:
/cost/doctor/status/release-notes/config/permissions/hooks/ide/mcp/review/pr-comments/reload-skills - Autonomous & multi-agent:
/auto/plan/cowork/agents/sub-agents/tasks
Plus user macros (.claude/commands/*.md) and MCP prompts (/mcp__<server>__<prompt>). Prefixes: ! (run shell), # (note to cc.md).
Sub-Agent Isolation v2 (v0.43.0): Complex tasks are automatically decomposed into isolated sub-agents, each with its own namespaced memory, scoped context, and lifecycle tracking. Use /sub-agents inside an agent session to inspect active and completed sub-agents, token usage, and average durations.
chainlesschain skill <action>
Manage and run 139 built-in AI skills across a 4-layer system: bundled < marketplace < managed (global) < workspace (project).
chainlesschain skill list # List all skills grouped by category
chainlesschain skill list --category automation
chainlesschain skill list --category cli-direct # CLI command skill packs
chainlesschain skill list --tag code --runnable
chainlesschain skill list --json # JSON output
chainlesschain skill categories # Show category breakdown
chainlesschain skill info code-review # Detailed skill info + docs
chainlesschain skill info code-review --json
chainlesschain skill search "browser" # Search by keyword
chainlesschain skill run code-review "Review this function..."
chainlesschain skill add my-skill # Create custom project skill
chainlesschain skill remove my-skill # Remove custom skill
chainlesschain skill sources # Show skill layer paths and countsCLI Command Skill Packs
Automatically wraps 63 CLI commands into 9 Agent-callable domain skill packs:
Since 0.162.177, generated direct/hybrid handlers execute through a frozen,
host-scoped Process Broker facade instead of importing child_process. The
host owns skill/plugin provenance, command-domain allowlists remain enforced,
shell metacharacters are rejected, and a missing Broker fails closed.
chainlesschain skill sync-cli # Generate/update all 9 CLI skill packs
chainlesschain skill sync-cli --force # Force regenerate all packs
chainlesschain skill sync-cli --dry-run # Preview changes without writing
chainlesschain skill sync-cli --remove # Remove all CLI packs
chainlesschain skill sync-cli --json # JSON output
# Run CLI commands via skill packs (Agent can call these directly)
chainlesschain skill run cli-knowledge-pack "note list"
chainlesschain skill run cli-identity-pack "did create"
chainlesschain skill run cli-infra-pack "services up"
chainlesschain skill run cli-ai-query-pack "ask what is RAG"
chainlesschain skill run cli-agent-mode-pack "agent"
chainlesschain skill run cli-web3-pack "wallet assets"
chainlesschain skill run cli-security-pack "encrypt file secret.txt"
chainlesschain skill run cli-enterprise-pack "org list"
chainlesschain skill run cli-integration-pack "mcp servers"| Pack | Mode | Commands |
| ---------------------- | --------- | -------------------------------------------------------- |
| cli-knowledge-pack | direct | note, search, memory, session, import, export |
| cli-identity-pack | direct | did, auth, audit |
| cli-infra-pack | direct | setup, start, stop, status, services, config, doctor, db |
| cli-ai-query-pack | llm-query | ask, llm, instinct, tokens |
| cli-agent-mode-pack | agent | agent, chat, cowork |
| cli-web3-pack | direct | wallet, p2p, sync, did |
| cli-security-pack | direct | encrypt, decrypt, audit, pqc |
| cli-enterprise-pack | direct | org, plugin, lowcode, compliance |
| cli-integration-pack | hybrid | mcp, browse, cli-anything, serve, ui |
Phase 1: AI Intelligence Layer
chainlesschain search <query>
BM25 hybrid keyword search across notes.
chainlesschain search "machine learning"
chainlesschain search "API design" --mode bm25 --top-k 10
chainlesschain search "security" --jsonchainlesschain tokens <action>
Token usage tracking and cost analysis.
chainlesschain tokens show # Current usage summary
chainlesschain tokens breakdown # Per-model breakdown
chainlesschain tokens recent # Recent usage entries
chainlesschain tokens cache # Cache hit/miss statschainlesschain memory <action>
Persistent memory management.
chainlesschain memory show # Show all memories
chainlesschain memory add "Always use TypeScript"
chainlesschain memory search "coding" # Search memories
chainlesschain memory delete <id> # Delete by ID prefix
chainlesschain memory daily # Today's daily note
chainlesschain memory file # Show memory file pathchainlesschain session <action>
Session persistence and management.
chainlesschain session list # List saved sessions
chainlesschain session show <id> # Show session details
chainlesschain session resume <id> # Resume a session
chainlesschain session export <id> # Export as Markdown
chainlesschain session delete <id> # Delete a session
chainlesschain session location compare # Local/WSL/SSH/Container/Cloud catalog
chainlesschain session location handoff <id> <target> --facts <facts.json>
chainlesschain session location attest <id> <target> \
--facts <facts.json> --profile <target-profile.json> --json
chainlesschain session location resume <id> <target> \
--facts <facts.json> --profile <target-profile.json> \
--expected-target-facts-digest sha256:<digest>
chainlesschain session location result-pack <id> \
--result-id <id> --summary <summary.txt> --diff <result.diff> \
--artifact application/json=<artifact.json> --json
chainlesschain session location result-verify <id> \
--bundle <returned-bundle.json> --expected-handoff-id sha256:<digest>
chainlesschain session location result-collect <id> <target> \
--facts <facts.json> --profile <target-profile.json> \
--expected-target-facts-digest sha256:<digest> \
--expected-handoff-id sha256:<digest> --request-id <stable-id> \
--result-id <id> \
--summary <target-summary.txt> --diff <target-result.diff> --json
chainlesschain session budget status <id>
chainlesschain session budget receipts <id> --jsonTarget attestation and resume support configured WSL, SSH, and existing
Container hosts. The launcher invokes only fixed ChainlessChain commands. SSH
requires a digest-pinned known_hosts file, uses strict host-key checking, and
materializes the verified bytes into a private temporary authority file for the
actual invocation. Resume re-runs the ambient host probe, verifies the accepted
stable facts digest, then handles the declared session-store mode. A
replicated profile streams the source's locked, verified transcript bytes to
the fixed target-side session location receive command; the target validates
strict UTF-8, a 64 MiB boundary, transcript structure/hash chain, exact byte
digest, head hash, and event count before atomic publication and creation of
its own sidecar and machine-local anti-rollback witness. It never replaces a
divergent or tombstoned target session, while an exact retry is idempotent. A
shared profile performs no copy. Both modes re-read the target's canonical
authority and revalidate that the source session head has not advanced before
the fixed session resume invocation. This is whole-revision transfer, not
incremental/bidirectional synchronization or a cross-host writer fence;
remote network/sandbox policy and disconnect/reconnect durability remain
unattested.
After a replicated target session has produced work, result-pack can bind
the actual bounded summary, diff, artifact, and evidence bytes to that
session's verified location-handoff authority. Every payload is included as
canonical base64 with its byte count and SHA-256; all input files must be
regular single-link files inside the session's declared data boundary. Copy
the JSON bundle back through an approved transport, then run result-verify
on the source. Verification rehashes every returned byte and succeeds only
while the source session still has the predecessor head/count accepted by the
handoff. Its receipt is content-free and explicitly reports applied=false:
this command does not patch the source worktree, import artifacts, fence two
hosts, or make transport/disconnect claims.
result-collect removes the manual-copy step for configured WSL, SSH, and
Container profiles. It re-attests stable target facts, invokes only the fixed
target-side result-pack argv through the existing strict launcher, accepts a
bounded JSON response, then revalidates the source predecessor a second time
before appending one CAS-bound, content-free settlement event and returning the
bundle. The stable request id is bound to the exact profile, handoff, result,
paths, and item list. If the caller loses the first response, an exact retry
reads the canonical settlement before loading handoff facts or running another
target command. That recovery proves which bundle was accepted but cannot
recreate bytes from a legacy v1 settlement. New collections first publish the
canonical bundle into the owner-only, content-addressed
execution-location-results store, re-read and rehash the stored bytes, then
bind that deterministic storage receipt into settlement v2. An exact retry can
therefore return the verified bundle without another target command. The store
uses no-replace publication, file fsync, and directory fsync where supported;
it is local explicit-delete storage, not WORM retention. Result collection
still does not provide a distributed writer fence, Cloud transport, or
automatic source application.
Artifact access, deletion, and TTL cleanup settlement
The repository candidate adds explicit, content-free audit and recovery for managed ArtifactStore bytes:
chainlesschain artifacts access <id> --client cli --action open \
--access-id <stable-id> --json
chainlesschain artifacts remove <id> --client cli \
--deletion-id <stable-id> --json
chainlesschain artifacts clean --client cli \
--cleanup-id <stable-batch-id> --json
chainlesschain artifacts access-log --json
chainlesschain artifacts deletion-log --json
chainlesschain artifacts cleanup-log --cleanup <stable-batch-id> --jsonartifacts clean freezes the expired rows once under the ArtifactStore index
lock. Its prepared event binds the cleanup id, cutoff, exact item list, scope
digest, deterministic per-item deletion ids, and pre-cleanup index generation.
Each item then uses the same prepared/terminal managed-copy deletion protocol as
an explicit remove. The batch terminal is written only after every selected
managed path is absent. An exact cleanup-id retry replays the frozen scope,
recovers already-settled items without selecting newly expired rows, and returns
the same terminal summary after response loss. A partial failure remains a
prepared batch whose item deletion events identify settled and pending work.
These receipts prove removal of the managed directory entries only. They do not
claim secure erasure of external hardlinks, downloads, backups, snapshots, or
viewer caches; the local JSONL ledgers are not WORM or an off-box transparency
log. The currently published stable CLI is [email protected], whose npm
tag predates these Artifact audit/settlement commands. Keep 0.165.2 for
existing stable surfaces; use the new commands only after a subsequent exact-
gated CLI release includes them.
Durable budget recovery stores a canonical local receipt for each operator
adjudication. Ordinary budget status shows only chain and coverage metadata;
budget receipts is the explicit detailed reader for provider/model/token
records. These receipts are local evidence, not provider billing readback or
WORM retention.
Phase 2: Knowledge & Content Management
chainlesschain import <format>
Import knowledge from external sources.
chainlesschain import markdown ./docs # Import markdown directory
chainlesschain import evernote backup.enex # Import Evernote ENEX
chainlesschain import notion ./export # Import Notion export
chainlesschain import pdf document.pdf # Import PDF textchainlesschain export <format>
Export knowledge base.
chainlesschain export markdown -o ./output # Export as Markdown files
chainlesschain export site -o ./site # Export as static HTML sitechainlesschain git <action>
Git integration for knowledge versioning.
chainlesschain git status # Show git status
chainlesschain git init # Initialize git repo
chainlesschain git auto-commit # Auto-commit all changes
chainlesschain git hooks # Install pre-commit hooks
chainlesschain git history-analyze # Analyze repo historyNote Versioning
chainlesschain note history <id> # Show version history
chainlesschain note diff <id> <v1> <v2> # Diff between versions
chainlesschain note revert <id> <ver> # Revert to versionPhase 3: MCP & External Integration
chainlesschain mcp <action>
MCP (Model Context Protocol) server management.
chainlesschain mcp servers # List configured servers
chainlesschain mcp add <name> -c <cmd> # Add a server
chainlesschain mcp remove <name> # Remove a server
chainlesschain mcp connect <name> # Connect to server
chainlesschain mcp disconnect <name> # Disconnect
chainlesschain mcp tools # List available tools
chainlesschain mcp call <server> <tool> # Call a toolchainlesschain browse <action>
Browser automation (headless fetch-based).
chainlesschain browse fetch <url> # Fetch page content
chainlesschain browse scrape <url> -s "h2" # Scrape CSS selector
chainlesschain browse screenshot <url> # Take screenshot (requires playwright)chainlesschain instinct <action>
Instinct learning — tracks user preferences over time.
chainlesschain instinct show # Show learned instincts
chainlesschain instinct categories # List 6 instinct categories
chainlesschain instinct prompt # Generate system prompt from instincts
chainlesschain instinct delete <id> # Delete an instinct
chainlesschain instinct reset # Clear all instincts
chainlesschain instinct decay # Decay old instinctsPhase 4: Security & Identity
chainlesschain did <action>
DID identity management (Ed25519).
chainlesschain did create --label "My Identity"
chainlesschain did list
chainlesschain did show <did>
chainlesschain did sign <did> "message"
chainlesschain did verify <did> "message" <signature>
chainlesschain did export <did>
chainlesschain did set-default <did>
chainlesschain did delete <did>chainlesschain encrypt / decrypt
AES-256-GCM file encryption.
chainlesschain encrypt file <input> -o <output>
chainlesschain encrypt db
chainlesschain encrypt info <file>
chainlesschain encrypt status
chainlesschain decrypt file <input> -o <output>
chainlesschain decrypt dbchainlesschain auth <action>
RBAC permission engine.
chainlesschain auth roles # List roles
chainlesschain auth create-role <name> # Create custom role
chainlesschain auth grant <user> <role> # Assign role
chainlesschain auth check <user> <scope> # Check permission
chainlesschain auth permissions <user> # List user permissions
chainlesschain auth scopes # List all 26 scopeschainlesschain audit <action>
Audit logging and compliance.
chainlesschain audit log # Recent events
chainlesschain audit search --type security # Search by type
chainlesschain audit stats # Statistics
chainlesschain audit export --format json # Export logs
chainlesschain audit purge --before 90 # Purge old logs
chainlesschain audit types # List event typesPhase 5: P2P, Blockchain & Enterprise
chainlesschain p2p <action>
Peer-to-peer messaging and device pairing.
chainlesschain p2p status # P2P network status
chainlesschain p2p peers # List known peers
chainlesschain p2p send <peer-id> "message" # Send message
chainlesschain p2p inbox # View inbox
chainlesschain p2p pair <device-name> # Pair a device
chainlesschain p2p devices # List paired devices
chainlesschain p2p unpair <device-id> # Unpair a devicechainlesschain sync <action>
File and knowledge synchronization.
chainlesschain sync status # Sync status
chainlesschain sync push # Push local changes
chainlesschain sync pull # Pull remote changes
chainlesschain sync conflicts # List conflicts
chainlesschain sync resolve <id> --strategy local # Resolve conflict
chainlesschain sync log # Sync history
chainlesschain sync clear # Clear sync statechainlesschain wallet <action>
Digital wallet and asset management.
chainlesschain wallet create --name "My Wallet" # Create wallet
chainlesschain wallet list # List wallets
chainlesschain wallet balance <address> # Check balance
chainlesschain wallet set-default <address> # Set default wallet
chainlesschain wallet delete <address> # Delete wallet
chainlesschain wallet asset <address> <type> <name> # Create asset
chainlesschain wallet assets [address] # List assets
chainlesschain wallet transfer <asset-id> <to> # Transfer asset
chainlesschain wallet history [address] # Transaction history
chainlesschain wallet summary # Overall summarychainlesschain org <action>
Organization management and workflows.
chainlesschain org create <name> # Create organization
chainlesschain org list # List organizations
chainlesschain org show <id> # Organization details
chainlesschain org delete <id> # Delete organization
chainlesschain org invite <org-id> <user-id> # Invite member
chainlesschain org members <org-id> # List members
chainlesschain org team-create <org-id> <name> # Create team
chainlesschain org teams <org-id> # List teams
chainlesschain org approval-submit <org-id> <title> # Submit approval
chainlesschain org approvals <org-id> # List approvals
chainlesschain org approve <request-id> # Approve request
chainlesschain org reject <request-id> # Reject requestchainlesschain plugin <action>
Plugin marketplace management.
chainlesschain plugin list # List installed plugins
chainlesschain plugin install <name> --version <v> # Install plugin
chainlesschain plugin remove <name> # Remove plugin
chainlesschain plugin enable <name> # Enable plugin
chainlesschain plugin disable <name> # Disable plugin
chainlesschain plugin update <name> --version <v> # Update plugin
chainlesschain plugin info <name> # Plugin details
chainlesschain plugin search <query> # Search registry
chainlesschain plugin registry # List all registry plugins
chainlesschain plugin summary # Installation summary
chainlesschain plugin installed --all-scopes # Physical inventory + effective authority
chainlesschain plugin transaction <name> --scope project --json
# Inspect redacted durable transaction authority
chainlesschain plugin recover <name> --scope project --action rollback
# Recover a transaction after its owner dies
chainlesschain plugin provenance-plan <name> --scope project --version 1.0.0 --metadata source.json
# Emit exact bytes for an external Ed25519 signature
chainlesschain plugin provenance-migrate <name> --scope project --version 1.0.0 --attestation signed.json --expected-signer-sha256 <hex> --yes
# Backfill one legacy install without replacing payload bytes
chainlesschain plugin catalog --registry https://plugins.example/index.json --offline --registry-digest https://plugins.example/index.json=<sha256>
# Review one exact immutable cached registry document without network
chainlesschain plugin add <name> --registry https://plugins.example/index.json --proxy http://proxy.example:8080 --ca-file enterprise-ca.pem
# Private registry through an explicit proxy and appended custom CA
chainlesschain plugin browse --registry https://plugins.example/index.json --pac-file enterprise.pac
# Resolve PROXY/HTTPS/DIRECT in a bounded, terminable PAC workerWhen enabling, disabling, uninstalling, or replacing a scoped plugin would
switch the effective local > project > user source, review plugin impact
and pass --allow-source-switch explicitly. Semantic SBOM downgrades remain
blocked even with that approval.
Plugin lifecycle mutation holds one same-user, same-name OS coordinator across
user, project, and local scopes. Add/upgrade keeps that owner through
validation, consent, finalize, or rollback, while the journal binds the exact
target scope and workspace context. Enable/disable records the exact prior and
intended marker bytes before publication. Version uninstall quarantines the
immutable version before publishing its pointer/marker fallback, while
whole-name uninstall quarantines the complete name directory before physical
collection. Each can therefore be explicitly finalized or rolled back after a
process crash. Ordinary commands never steal an abandoned owner. Inspect it
with plugin transaction, then use plugin recover only after the recorded
process has died. --force-owner overrides a live or cross-host owner and
therefore requires external operator adjudication; it is not automatic
stale-lock cleanup.
Legacy provenance migration is explicit and non-overwriting. The plan binds the
installed name, version, scope, canonical path, complete payload digest, source
metadata, and issuance time. Sign the decoded signingPayloadBase64 bytes with
an Ed25519 key, then supply an attestation containing authority,
publicKeyPem, and signatureBase64. Apply requires the exact SPKI fingerprint
and --yes; managed trusted-key policy is also enforced when configured. The
signed record is checked on every strict provenance read and participates in
the same crash-recoverable lifecycle journal. It proves the reviewed migration
authority only—it does not invent Marketplace publisher identity. Existing
provenance and installs with a component-SBOM signature lock must be reinstalled
instead of rewritten.
An organization can require registry publisher identity with managed settings:
{
"requireTrustedPluginPublishers": true,
"trustedPluginPublishers": [
{
"trustRootId": "acme-marketplace-2026",
"publisherId": "tools-team",
"organizationId": "acme",
"pluginNames": ["@acme/reviewer"],
"registryOrigins": ["https://plugins.acme.example"],
"signingKeySha256": ["<ed25519-spki-sha256>"],
"notBefore": "2026-01-01T00:00:00.000Z",
"notAfter": "2027-01-01T00:00:00.000Z"
}
],
"revokedPluginPublisherKeys": []
}The registry entry must declare matching publisher.id and
publisher.organizationId, and the mapped key must cryptographically verify
the installed manifest. The persisted authority is re-evaluated against the
current managed policy on strict read and runtime admission; adding the key to
revokedPluginPublisherKeys fails closed immediately. This direct managed
binding does not by itself provide an external transparency service.
Remote registry documents are capped at 4 MiB and cached immutably by complete
URL plus document SHA-256. --offline never opens a network transport; an
unpinned URL with multiple valid cached revisions is rejected as ambiguous, so
use repeatable --registry-digest <url=sha256> pins. Remote signature, public
key, and SBOM documents use their existing bounded digest-addressed cache. For
plugin add and plugin upgrade, a successful online Git materialization is
also copied into an immutable source-package cache only when the registry binds
both the manifest digest and a repository-defined semantic payload SBOM. An
offline replay recomputes both anchors before installation; payload or cache
authority tampering, symlinks, hard-linked payload files, and exact cache misses
fail closed. Registries without that full payload anchor
must reference an existing local plugin directory for offline use and are not
silently treated as cacheable.
Private registries support --proxy, a bounded local --pac-file, and an
appended --ca-file; the dedicated environment equivalents are
CC_PLUGIN_REGISTRY_PROXY, CC_PLUGIN_REGISTRY_PAC_FILE, and
CC_PLUGIN_REGISTRY_CA_FILE. Proxy credentials are removed from persisted
authority, while the sanitized proxy origin, PAC SHA-256, and CA SHA-256 are
bound into the catalog/provenance record. PAC execution uses QuickJS in a
resource-limited worker with a hard timeout. Proxy URL and PAC are mutually
exclusive, PAC supports PROXY, HTTP, HTTPS, and DIRECT, and ambient
HTTP_PROXY/HTTPS_PROXY values are not silently adopted.
Project Initialization & Collaboration
chainlesschain init
Initialize a new ChainlessChain project with a .chainlesschain/ directory, workspace skills, and an optional AI persona.
chainlesschain init # Interactive template selection
chainlesschain init --bare # Minimal project structure
chainlesschain init --template code-project --yes # Software project (code-review, refactor, unit-test)
chainlesschain init --template data-science --yes # Data science / ML project
chainlesschain init --template devops --yes # DevOps / infrastructure project
chainlesschain init --template medical-triage --yes # Medical triage assistant (with Persona)
chainlesschain init --template agriculture-expert --yes # Agriculture expert (with Persona)
chainlesschain init --template general-assistant --yes # General-purpose assistant (with Persona)
chainlesschain init --template ai-media-creator --yes # AI media creator (ComfyUI/AnimateDiff/TTS)
chainlesschain init --template ai-doc-creator --yes # AI doc creator (LibreOffice/pandoc/doc-edit)
chainlesschain init --template empty --yes # Bare projectAI Media Creator Template (ai-media-creator)
Generates 3 workspace skills for AI image/video/audio creation:
chainlesschain skill run comfyui-image "a sunset over mountains, oil painting style"
chainlesschain skill run comfyui-video '{"prompt":"a cat walking","workflow":"workflows/animatediff.json"}'
chainlesschain skill run audio-gen "你好,欢迎使用 ChainlessChain"| Skill | Description |
| --------------- | --------------------------------------------------------------------- |
| comfyui-image | ComfyUI REST API image generation (txt2img/img2img, custom workflows) |
| comfyui-video | ComfyUI + AnimateDiff video generation (requires workflow JSON) |
| audio-gen | AI TTS: auto-selects edge-tts → piper-tts → ElevenLabs → OpenAI |
Also creates a workflows/ directory with README for saving ComfyUI workflow JSON files.
AI Doc Creator Template (ai-doc-creator)
Generates 3 workspace skills for AI document creation and editing:
chainlesschain skill run doc-generate "2026年技术趋势分析报告"
chainlesschain skill run doc-generate '{"topic":"项目方案","format":"docx","style":"proposal"}'
chainlesschain skill run libre-convert "report.docx"
chainlesschain skill run libre-convert '{"input_file":"slides.pptx","format":"pdf"}'
chainlesschain skill run doc-edit '{"input_file":"report.md","instruction":"优化摘要部分"}'
chainlesschain skill run doc-edit '{"input_file":"data.xlsx","instruction":"首字母大写"}'| Skill | Description |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| doc-generate | AI-generated structured documents: md/html/docx/pdf, 4 styles (report/proposal/manual/readme) |
| libre-convert | LibreOffice headless conversion: docx/pdf/html/odt/pptx/xlsx/png |
| doc-edit | AI edit existing docs: md/txt/html (direct LLM), docx (pandoc/soffice), xlsx (openpyxl, formulas preserved), pptx (python-pptx, charts preserved) |
Requirements: winget install pandoc (for docx), winget install LibreOffice.LibreOffice (for PDF/format conversion).
Also creates a templates/ directory with README for document templates.
chainlesschain pack
Package a ChainlessChain project into a standalone executable (single-file, no Node.js required) for macOS / Windows / Linux. Includes --project mode for embedding a specific project's skills, persona, and allowed-command whitelist directly into the binary.
chainlesschain pack # Pack current dir as a generic CLI binary
chainlesschain pack --project # Project mode: bake current project's skills/persona into the binary
chainlesschain pack --project --name myproject # Override output binary name
chainlesschain pack --platform win-x64 # Target Windows x64 (default: host platform)
chainlesschain pack --platform darwin-arm64 # Target macOS Apple Silicon
chainlesschain pack --platform linux-x64 # Target Linux x64
chainlesschain pack --dry-run # Print effective config without building
chainlesschain pack check-update # Probe OTA manifest for a newer pack on this channelProject mode (--project) bakes the following into the executable at build time:
.chainlesschain/skills/**— project-local skills, loaded viaCC_PROJECT_ROOTat runtime.chainlesschain/persona.json— auto-applied project persona (name / role / behavior)commander.allowedCommandswhitelist — only the subcommands the project actually uses- Sanitized project name (kebab-case) as the default binary name + manifest sidecar (
<binary>.manifest.json) with a signed descriptor
OTA check-update reads the pack's baked channel + version, fetches the configured manifest URL, and reports whether a newer build is available (no auto-download — download/install is a separate workflow).
chainlesschain persona <action>
Manage the AI persona for the current project (set by init templates or manually).
chainlesschain persona show # Show current project persona
chainlesschain persona set --name "Bot" --role "Helper" # Set persona name and role
chainlesschain persona set -b "Always respond in English" # Add behavior constraint
chainlesschain persona set --tools-disabled run_shell # Disable specific tools
chainlesschain persona reset # Remove persona, restore defaultchainlesschain cowork <action>
Multi-agent collaboration for code review and analysis.
chainlesschain cowork debate <file> # Multi-perspective code review
chainlesschain cowork compare <prompt> # A/B solution comparison
chainlesschain cowork analyze <path> # Code analysis (style/knowledge-graph/decisions)
chainlesschain cowork status # Show cowork statusWeb Cowork: Daily Task Collaboration (v0.46.0)
Web-based daily task collaboration via the /#/cowork page. Powered by SubAgentContext + agentLoop, with 11 task templates covering common daily tasks. Prioritizes open-source CLI tools (ffmpeg, pandoc, ImageMagick, Tesseract, etc.) via cli-anything bridge, with automatic tool installation (winget > choco > pip > npm).
11 Task Templates:
| Template ID | Name | Category | Accepts Files |
| ----------------- | ------------ | --------- | ------------- |
| doc-convert | 文档格式转换 | document | ✅ |
| media-process | 音视频处理 | media | ✅ |
| data-analysis | 数据分析 | data | ✅ |
| web-research | 网络调研 | research | ❌ |
| image-process | 图片处理 | image | ✅ |
| code-helper | 代码辅助 | code | ✅ |
| code_review | 代码评审 | code | ✅ |
| system-admin | 系统管理 | system | ❌ |
| file-organize | 文件整理 | file | ✅ |
| network-tools | 网络工具 | network | ❌ |
| learning-assist | 学习辅助 | education | ✅ |
Usage: Navigate to http://127.0.0.1:18810/#/cowork after starting chainlesschain ui. Select a template or use free mode, describe your task, and optionally attach files.
WebSocket Protocol:
→ { type: "cowork-task", templateId: "doc-convert", userMessage: "转换PDF", files: [] }
← { type: "cowork:started", templateId: "doc-convert" }
← { type: "cowork:done", taskId, status, templateName, summary, artifacts, toolsUsed, iterationCount }Key files: src/lib/cowork-task-templates.js (11 templates), src/lib/cowork-task-runner.js (pipeline), src/gateways/ws/action-protocol.js (WS handler). Tests: 79+ (57 unit + 11 integration + 11 E2E).
Cowork Workflow Editor (v0.47.0, N1)
Form-based Cowork Workflow editor at /#/workflow in the Web Panel. Create, edit, run, and export multi-step Cowork DAG workflows — each step invokes a Cowork task with placeholder substitution (${step.<id>.summary}) from upstream step outputs. Client-side DFS cycle detection mirrors the backend validateWorkflow guard.
The CLI can also generate a model-proposed definition without granting it
write authority. draft emits a secret-scanned, digest-bound
pending-review JSON artifact; review requires a human to repeat that exact
digest before an accepted definition enters the immutable version store.
Generation and review provenance remain inside the saved definition, while the
runtime continues to declare durable pause/resume and post-resume exactly-once
as unsupported.
chainlesschain cowork workflow draft "Review a release" --provider ollama > workflow-draft.json
chainlesschain cowork workflow review workflow-draft.json \
--expected-draft-digest sha256:<digest> --reviewer <identity> --acceptAccepted or hand-authored versioned definitions can opt into the bounded-parallel
durable runtime. Every concurrently scheduled dispatch group is persisted as one
atomic effect batch before any provider call. Each step/iteration/attempt keeps
its own stable effect identity plus batch identity, index, and size. A second
persisted marker distinguishes a requested-but-not-dispatched effect from one
whose provider call may have started. If a provider throws or its settlement
response is lost, the run becomes blocked and will not replay an outcome-
unknown effect until an operator supplies a bounded result file at the exact
runtime revision and in the recorded recovery order.
chainlesschain cowork workflow run <workflow-id> \
--execution-authority-session <session-id> --durable-run-id <run-id>
chainlesschain cowork workflow runtime-status <run-id> --json
chainlesschain cowork workflow runtime-pause <run-id> --expected-revision <n>
chainlesschain cowork workflow runtime-resume <run-id> --expected-revision <n>
chainlesschain cowork workflow runtime-stop <run-id> --expected-revision <n>
chainlesschain cowork workflow runtime-reconcile <run-id> <effect-id> <result.json> \
--expected-revision <n>The durable runtime accepts maxParallel only within the digest-bound admission,
the workflow budget, and the hard 64-effect batch limit. A pause remains
pause_requested until every already-requested parallel provider has physically
settled; an unknown outcome keeps the run blocked. Multi-effect reconciliation
is ordered by the persisted batch sequence, and the run becomes ready only
after every outcome-unknown pending effect is settled. Retry and timeout steps
use attempt-scoped effect identities: an explicit failed result may advance to
the next attempt, a timeout before dispatch is recorded as
runtime-not-dispatched, a late completed result is accepted without retry,
and a late unknown outcome blocks. A crash with no dispatch marker may safely
resume that same effect; a persisted dispatch marker requires provider return
or reconciliation. Reconciliation is an explicit operator assertion about an
outcome-unknown provider call, not an automatic retry or a third-party receipt.
For a durable workflow effect, the production Cowork runner now validates the
canonical sha256: effect identity before constructing a child agent and locks
that identity into the child loop. Each ordinary model turn and each automatic
semantic-compaction provider query derives a source-separated, stable
ccwf_... request identity. Injected compaction adapters receive the same
frozen binding context. The OpenAI transport sends that value as
X-Client-Request-Id only for the official https://api.openai.com origin and
retains a bounded receipt only when OpenAI returns an x-request-id header or
response object ID; a custom OpenAI-compatible gateway receives no official
contract claim. Workflow-bound turns disable
transparent streaming retries and cross-provider fallback so one durable model
boundary cannot hide another physical provider attempt. The child records a
cc-provider-request-attempt/v1 boundary before every bound transport; a
completed Cowork result matches each returned receipt to the exact provider,
call, source, sequence and client request ID. A normal-model or
semantic-compaction provider exception,
invalid receipt, unknown compaction usage, or post-provider compaction
settlement failure is propagated to the outer durable runtime as an unknown
outcome; it is never downgraded to an ordinary failed task that step retry could
replay. These identifiers are
explicitly trace-only: they do not provide native provider idempotency or an
independently readable receipt, and unsupported providers return no receipt.
Nested tool/MCP/external-system effects remain outside this provider-call
receipt slice.
The dynamic runtime also installs synchronous durable-call observers around the
Cowork child. Before each bound provider or directly dispatched tool call can
continue to transport, the runtime appends a bounded started row under the
pending outer effect with the exact provider request or child-effect identity.
When a provider returns a trace receipt, a second synchronous observer validates
its effect owner, provider, call, request source, sequence, client request ID,
and trace-only semantics, then stores only the bounded provider request/response
IDs and receipt timestamp while the call is still started. The terminal
callback later persists completed, failed, or outcome_unknown
independently of the eventual Cowork result and refuses a settlement-carried
receipt that was not identically prewritten. A successful provider settlement
also normalizes the provider-reported input, output, cache-read, and cache-creation
token counts into the same durable row and binds their digest into the settlement
lineage. Counts are bounded non-negative integers; proxies, accessors, conflicting
aliases, and later usage-row tamper fail closed. The start row also captures the
validated provider/model and, when the built-in public-list table has a match, a
version-digested USD pricing snapshot. Successful usage settlement derives a
componentized estimatedUsd from that durable snapshot and binds its digest into
the settlement lineage. A mismatched settlement model or later pricing/cost
rewrite fails closed; unmatched models remain unpriced, while a priced local
provider keeps a real zero estimate. These are estimates, not provider-reported
charges: reportedUsd remains null. A crash after provider response
but before usage settlement therefore leaves an independently readable started
row with the receipt and an explicitly missing usage settlement, instead of
relying on a completed-result projection. This also holds for descendant provider
calls; neither the receipt nor the token counts are independently readable from
the provider. Explicit outer effect reconciliation preserves any prewritten
receipt while marking still-started rows as operator reconciled, but does not
invent provider usage or turn trace-only request identities into third-party
idempotency.
Spawned sub-agents and isolated skills inherit the already-persisted parent
tool child-effect as their workflow owner. Their internal provider/tool calls
therefore enter the same store with a verified owner chain; an orphan or
rewritten owner fails closed, and descendant unknown outcomes prevent normal
outer provider-return settlement.
For the managed publish_artifact tool, terminal settlement additionally reads
the canonical ArtifactStore index row, requires an exact match with the returned
public metadata, and rehashes the copied bytes before persisting a readback digest
on the call. Forged metadata, missing/changed stored bytes, or partial removal of
the readback schema fail closed. The readback is visible before the outer Cowork task
returns, but it proves only the store copy at settlement time: the current store
is mutable and TTL-cleanable, so immutable retention and later byte availability
remain unproven. Arbitrary result.artifacts arrays stay digest-only observations.
runtime-status --json also returns a digest-bound observability projection.
It exposes effect/result lineage, provider-return/operator-reconciled/runtime-
not-dispatched settlement counts, provider dispatch and timeout timestamps,
request-to-settlement wall time, durable-call-derived trace-only provider
request attempts and receipts (including pending/crashed calls), durable-call-
derived nested-tool attempt/settlement lineage, the independently persisted
durable-call status/digest projection plus its provider-receipt count and bounded
receipt IDs, durable-call-derived provider token totals and per-call lineage,
durable-pricing-snapshot USD estimates and their per-call lineage, the separately
labeled Cowork-result heuristic estimate, ArtifactStore index/byte readbacks for
managed publish_artifact calls, and digest-only task-result artifact/checkpoint
references. Token, cost, and artifact-readback projections keep reported, priced,
and verified records separate from pending, outcome-unknown, operator-reconciled,
and legacy calls; they never substitute the
heuristic token estimate or a guessed price for missing provider data. Receipt
projection rejects an effect/provider/call/source/request mismatch or any claim of
idempotency/independent readback, ignores conflicting outer-result receipt
arrays when durable call rows exist while exposing a disagreement gap, and
reports a gap for every valid attempt with no matching provider receipt.
Pre-durable-call states remain readable
through an explicitly counted legacy task-result fallback that adds its own gap.
The projection is intentionally
complete: false and lists every missing authority: provider-reported USD billing,
native provider idempotency, independent provider usage/receipt readback, and
checkpoint readback plus immutable/current ArtifactStore retention remain
unavailable. Pre-usage/pricing/artifact-readback-schema calls stay readable with
explicit unavailable/incomplete/legacy gaps. Managed
nested tool attempts and
terminal settlements no
longer depend on those payload projections: started calls are crash-visible,
conflicting outer-result arrays produce a disagreement gap, and pre-durable-call
states use an explicit legacy fallback. MCP calls bind the
same outer/child effect tuple into the canonical session ledger before
transport and report persisted start/settlement facts. Any workflow-bound
nested outcome-unknown result or post-boundary tool exception blocks the outer
effect for reconciliation instead of becoming an ordinary failed task. The
runtime-owned provider/tool call rows are independently readable from a
pending or crashed run, including calls directly owned by spawned sub-agents
and isolated skills. Hook/checkpoint and unmanaged artifact side effects, native
third-party idempotency, and provider-side receipt lookup remain open.
WS protocol: workflow-list / workflow-get / workflow-save / workflow-remove / workflow-run (streams workflow:started / step-start / step-complete / workflow:done).
Key files: src/gateways/ws/action-protocol.js (5 handlers), src/lib/cowork-workflow.js (CRUD + executeWorkflow), src/lib/dynamic-workflow-draft.js (model proposal + human review authority), src/lib/dynamic-workflow-runtime.js (atomic parallel durable effect protocol), packages/web-panel/src/stores/workflow.js (Pinia store + validateLocal), packages/web-panel/src/views/WorkflowEditor.vue. Governed CLI regression: 593 tests across draft/review, durable runtime, façade, DAG, WebSocket, admission, provider/tool/descendant call binding, durable provider receipt/token settlement, durable pricing-snapshot cost estimates, ArtifactStore settlement readback, and MCP ledger coverage; the original editor slice retains its 39 backend/frontend/integration/E2E tests.
Vue Flow visual canvas (drag-to-connect, branch rendering) is planned as M2.
Phase 6: AI Core (Hooks, Workflow, Memory, A2A)
chainlesschain hook <action>
Event hook management for extensibility.
chainlesschain hook list # List registered hooks
chainlesschain hook add --event PreToolUse --type sync --command "echo check"
chainlesschain hook remove <id> # Remove a hook
chainlesschain hook run PreToolUse # Execute hooks for event
chainlesschain hook stats # Hook execution statisticschainlesschain workflow <action>
DAG-based workflow orchestration engine.
chainlesschain workflow create --name "pipeline" --stages '[...]'
chainlesschain workflow list # List workflows
chainlesschain workflow run <id> # Execute workflow
chainlesschain workflow status <id> # Check workflow status
chainlesschain workflow templates # List 5 built-in templateschainlesschain hmemory <action>
Hierarchical memory system (working → short-term → long-term).
chainlesschain hmemory store "fact" --importance 0.8 # Store memory
chainlesschain hmemory recall --layer long-term # Recall memories
chainlesschain hmemory consolidate # Promote memories across layers
chainlesschain hmemory stats # Memory statisticschainlesschain a2a <action>
Agent-to-Agent protocol for multi-agent collaboration.
chainlesschain a2a register --name "agent1" --capabilities '["code"]'
chainlesschain a2a list # List registered agents
chainlesschain a2a discover --capability code # Find agents by capability
chainlesschain a2a submit <agent> "task" # Submit task to agent
chainlesschain a2a status <task-id> # Check task statusPhase 7: Security & Evolution
chainlesschain sandbox <action>
Secure sandbox execution environment.
chainlesschain sandbox create --name "test" # Create sandbox
chainlesschain sandbox list # List sandboxes
chainlesschain sandbox exec <id> "command" # Execute in sandbox
chainlesschain sandbox audit <id> # View audit log
chainlesschain sandbox destroy <id> # Destroy sandboxchainlesschain evolution <action>
Self-evolving AI capability assessment and learning.
chainlesschain evolution assess code-generation # Assess capability
chainlesschain evolution diagnose # Self-diagnosis
chainlesschain evolution learn --domain nlp # Incremental learning
chainlesschain evolution status # Evolution statuschainlesschain learning <action>
Autonomous learning loop — tracks execution trajectories, auto-synthesizes skills from successful patterns, and performs periodic self-reflection.
chainlesschain learning stats # Learning loop statistics overview
chainlesschain learning stats --json # JSON output
chainlesschain learning trajectories # Recent 20 execution trajectories
chainlesschain learning trajectories -n 50 # Specify count
chainlesschain learning trajectories --session <id> # Filter by session
chainlesschain learning trajectories --json # JSON output
chainlesschain learning reflect # Manual self-reflection trigger
chainlesschain learning reflect --json # JSON reflection report
chainlesschain learning synthesize # Scan and synthesize new skills
chainlesschain learning synthesize --json # JSON output
chainlesschain learning cleanup # Clean up trajectories older than 90 days
chainlesschain learning cleanup --days 30 # Custom retention period
chainlesschain learning cleanup --json # JSON outputCore modules (7 files in src/lib/learning/):
| Module | Description | | -------------------- | ------------------------------------------------------------------------------------ | | TrajectoryStore | Records complete execution trajectories (intent → tool chain → result → response) | | OutcomeFeedback | Auto-scoring + user feedback + correction detection (Chinese & English) | | SkillSynthesizer | Extracts reusable patterns from complex successful trajectories into SKILL.md | | SkillImprover | Three improvement triggers: error repair, user correction, better trajectory compare | | ReflectionEngine | Periodic self-review with tool stats, score trends, error-prone tool identification | | LearningHooks | REPL lifecycle integration — captures prompts, tool calls, responses, session events | | LearningTables | SQLite schema creation for trajectories, tags, and improvement logs |
Phase 8: Blockchain & Enterprise Analytics
chainlesschain economy <action>
Agent economy and micropayment system.
chainlesschain economy pay <from> <to> 100 # Agent micropayment
chainlesschain economy balance <agent> # Check balance
chainlesschain economy market list # Browse resource market
chainlesschain economy nft mint <agent> # Mint contribution NFTchainlesschain zkp <action>
Zero-Knowledge Proof engine.
chainlesschain zkp compile --name "age-proof" # Compile ZKP circuit
chainlesschain zkp prove <circuit> --witness '{}' # Generate proof
chainlesschain zkp verify <circuit> <proof> # Verify proof
chainlesschain zkp list # List circuitschainlesschain bi <action>
Business Intelligence with natural language queries.
chainlesschain bi query "show monthly revenue" # NL→SQL query
chainlesschain bi dashboard create --name "KPI" # Create dashboard
chainlesschain bi dashboard list # List dashboards
chainlesschain bi anomaly --metric sales # Z-score anomaly detectionPhase 9: Low-Code Platform
chainlesschain lowcode <action>
Visual low-code application builder.
``
