Command-line interface for Smeldr instances. Manage content and tokens from a terminal or CI/CD pipeline.
Zero third-party dependencies — requires only Go 1.26 or later.
go install smeldr.dev/cli/cmd/smeldr-cli@latestOr build from source:
git clone https://github.com/Smeldr/cli
cd cli
go build -o smeldr-cli ./cmd/smeldr-cliThe binary was renamed forge-cli → smeldr-cli in v0.14.0. Update any scripts
that invoke forge-cli to use smeldr-cli. The install path changed to
go install smeldr.dev/cli/cmd/smeldr-cli@latest.
Legacy FORGE_* env vars and .forge-cli.env were read as fallbacks during a
deprecation window; that window has closed — set the SMELDR_* names directly.
Set environment variables or create a .smeldr-cli.env file in your working
directory (values already set in the environment take precedence):
SMELDR_URL=https://mysite.com
SMELDR_TOKEN=my-bearer-token
SMELDR_MCP_URL=https://mysite.com/mcp/messageSMELDR_MCP_URL defaults to {SMELDR_URL}/mcp/message if not set. It is only
required for MCP-based commands (token, block, nav, redirect, social, etc.).
.smeldr-cli.env holds a bearer token: keep it out of version control (add it
to your .gitignore) and readable only by you (chmod 600 .smeldr-cli.env).
On Unix the CLI warns when the file is readable by others.
smeldr-cli init writes the file for a new instance. Give it the bootstrap
token from the server's startup log in the environment or on stdin, not as an
argument (an argument stays in shell history and the process list):
SMELDR_BOOTSTRAP_TOKEN=... smeldr-cli init --url https://mysite.com
smeldr-cli init --url https://mysite.com --bootstrap-token-stdin < bootstrap.txt--bootstrap-token <token> still works but is deprecated and warns. init
writes the file with mode 600, also over an existing file with --force.
A secret from its variable or from stdin may have white space around it (a
blank last line, a tab copied from the log): the cli trims it, the same for
every secret it reads. Whatever the cli reads on stdin, and a file it reads with
--from, --set or --filter @file, may also start with a UTF-8 byte order
mark, which Windows PowerShell 5.1 adds when its console is at code page 65001
or when Set-Content -Encoding utf8 writes a file: the cli drops it. A file
read with --from (or - for stdin) has its CRLF and lone CR line endings read
as LF, so a file written on Windows parses like any other and no \r reaches
the server.
init creates a ratifier. The token it writes is yours, the person
founding this server: class human, with the admin and approver
roles, both granted with the reason "founder of the organization". It
can ratify Decisions. --no-approver grants admin only. If a global
approver already exists, init grants admin only and says so. On a server
without governance it grants nothing (the token's role is enough there). It
then checks that the new token can act as admin.
Flags may come before or after a command's arguments: smeldr-cli posts update my-post --from post.md and smeldr-cli posts update --from post.md my-post
are the same. An unknown flag, a missing argument or one argument too many is
refused with exit 1 and a message naming it, never ignored; -h prints the
usage and exits 0. After -- every argument is an argument, even one that
starts with -.
These commands take the URL path prefix of a compiled module as the first
argument (e.g. posts, pages). A leading slash (smeldr-cli /posts list)
always means a prefix, also when the prefix is the name of a command. In Git
Bash on Windows, set MSYS_NO_PATHCONV=1 for that form, since Git Bash turns
/posts into a Windows path before the cli sees it. For a
runtime-defined type, see Runtime-defined types.
smeldr-cli posts create --from post.md--from reads a YAML-subset frontmatter file. Omit --from to read from stdin.
Frontmatter format:
---
Title: My Post
Body: Hello world
Tags: [go, smeldr]
---
Optional body text appended to Body if Body is blank in the header.
smeldr-cli posts update my-post --from updated.mdGETs the existing item and overlays only the fields present in the file. Fields absent from the file are preserved unchanged.
smeldr-cli posts publish my-post
smeldr-cli posts unpublish my-post
smeldr-cli posts archive my-postsmeldr-cli posts delete my-postsmeldr-cli posts list # aligned table (columns: SLUG, STATUS, CREATEDAT, UPDATEDAT)
smeldr-cli posts list --status draft
smeldr-cli posts list --status published
smeldr-cli posts list --json # raw JSON
smeldr-cli posts list --fields slug,title,status # custom columns (case-insensitive)smeldr-cli posts get my-postA runtime-defined type's public route (its url_prefix) answers list and
get too, with its published items only. After a 404 or 405 the cli prints
the server's answer, then a line pointing at smeldr-cli content <type>.
Items of a type defined with content-type define are reached by the type's
name, over the server's /_content/<type> routes, in any state the token may
read:
smeldr-cli content recipe list [--status draft] [--json] [--fields slug,title]
smeldr-cli content recipe get pasta # a slug or an ID
smeldr-cli content recipe create --from recipe.md
smeldr-cli content recipe update pasta --from changes.md # only the fields in the file
smeldr-cli content recipe publish pasta # also unpublish, archiveThe front matter holds the fields; the text below it goes to body when the
file does not set it. The server makes the slug from the field whose role is
title (item when the type has none), so define one to name items by slug. There is no delete: the server has no delete route for
runtime items, so archive them. A type whose name is a verb (list, get, ...)
is reached with smeldr-cli content --type <name> <verb>.
smeldr-cli content <verb> with a verb right after content is still the
prefix form and reaches a module served at /content.
Token commands require SMELDR_MCP_URL and an Admin-role token in SMELDR_TOKEN.
smeldr-cli token create ci-deploy author 30Arguments: <name> <role> <ttl-days>. Roles: guest, author, editor,
admin. TTL is an integer number of days (e.g. 30 for 30 days). Prints
the plaintext token once — copy it immediately.
Optional --class agent|job|human classifies the token's actor so
provenance records that kind for what it does (D105), for example
smeldr-cli token create core-implementer editor 90 --class agent. It never
grants or changes a permission, you attest it (a token may be human only if every use of it is the direct result of one authenticated request by that person (an interactive session, or a personal token a service uses only inside that person's own request); a token that software uses on its own initiative is never human), and an issued token cannot be classified afterwards: issue
a new one and revoke the old. Without it the token is unclassified and records
unclassified. Needs smeldr.dev/mcp v1.48.0 on the server.
Optional --identity <IDN> mints the token for an existing identity (D165): it
joins it, takes its class and acts with its grants, so a rotation keeps the
history (mint, then revoke the old token). Needs a server with core T1014.
Optional --reason <text> says why the token is minted. It is stored with the
act and shown by token list. It is free text that people read: never put a
token value or other secret in it.
smeldr-cli token listsmeldr-cli token revoke <id>Revocation is permanent and takes effect immediately. Optional
--reason <text> says why, stored with the act and shown by token list.
Governance role grants over MCP (grant_role, revoke_grant, list_grants; Admin role required; v0.23.0):
smeldr-cli grant <token-id> <role> [--scope type:id ...] [--anchor <address|slug|id>] [--expires-in-days N] [--reason <text>] [--rev <n>]
smeldr-cli grant revoke <grant-id> [--reason <text>] [--rev <n>]
smeldr-cli grant list [<token-id>]<token-id> is the token's JWT user id (token_id from token create), not the fingerprint token list shows. --scope may repeat (static scope patterns type:id or type:*); --anchor is the anchor item of a dynamic scope, by its address (--anchor ARE1), slug or id; core resolves it and stores the id from v1.193.2 (an older server stores it as given, so give the id there). --reason is stored with the act and shown by grant list: free text that people read, never a token value or other secret. Flags may come before or after the arguments; a missing argument is an error before any request. --expires-in-days N makes the grant time-boxed: when it expires it stops authorizing, with no revoke needed, and grant list still shows it with its ExpiresAt.
Runtime-defined content types over MCP (define_content_type, redefine_content_type, get_content_type_schema; v0.24.0):
smeldr-cli content-type define --type <name> --fields <file.json> [--url-prefix /p] [--label L]
smeldr-cli content-type redefine --type <name> --fields <file.json> [--label L] [--reason R]
smeldr-cli content-type get <name>--fields is a JSON file holding the full field list: an array of {name, type, required, format, role, description} objects. A redefinition takes effect at once, for later writes. It may change the label, a field's role, format and description, make a required field optional and add optional fields; it refuses removing a field, changing its type, making it required, a new required field and any URL prefix change. define and redefine need the define-type operation (Admin by default); get needs Author. Arguments are checked before any request. --reason is stored with the change: free text that people read, never a secret.
smeldr-cli statusCalls GET /_health and prints the JSON response. Exits non-zero if the
server is unreachable.
smeldr-cli logs [--level LEVEL] [--limit N] [--since RFC3339] [--json]Calls GET /_logs directly (not via MCP) and prints a table of captured log
entries. Requires Admin role. The server must call app.CaptureLogs() (core
v1.36.0+).
Flags:
--level <LEVEL>— minimum level inclusive (e.g.warn,error)--limit <N>— most recent N entries--since <RFC3339>— entries strictly after this timestamp--json— print raw JSON envelope{capacity, count, dropped, entries}
Default output is a table with columns: TIMESTAMP, LEVEL, SEQ, MESSAGE. Entries are newest-first. A footer is printed when the ring buffer overflowed and entries were dropped.
Since /_logs does not go through MCP, it works even when the MCP server is
the component that is failing.
Requires a running smeldr.dev/social v0.8.0+ instance wired to the Smeldr MCP server.
smeldr-cli social post create --credential <id> --body "..." [--platform mastodon|linkedin|x] [--at <RFC3339>]
smeldr-cli social post queue --credential <id> --body "..." [--platform mastodon|linkedin|x]
smeldr-cli social post list [--status draft|queued|scheduled|published|failed|archived] [--json] [--fields <a,b,c>]
# aligned table by default (columns: ID, PLATFORM, STATUS, SCHEDULED_AT)
smeldr-cli social post get <slug>
smeldr-cli social post publish <slug>
smeldr-cli social post archive <slug>
smeldr-cli social post delete <slug>post create without --at creates a draft. --at schedules for a specific time.
post queue is shorthand for post create with status: queued — the post is published at the next available slot in the credential's PublicationSchedule.
smeldr-cli social credential create --platform mastodon|linkedin|x [--instance-url <url>]
smeldr-cli social credential list
smeldr-cli social credential get <id>
smeldr-cli social credential delete <id>credential create prints the OAuth authorisation URL. Open it in a browser to connect the account.
--instance-url is only accepted for platform mastodon. Providing it for x is a fatal error.
Configures the OAuth 2.0 app credentials for a platform (client ID, client secret, redirect URL).
Requires Admin role. Credentials are stored encrypted server-side and never echoed back.
Give the client secret in SMELDR_SOCIAL_CLIENT_SECRET or on stdin with
--client-secret-stdin, so it stays out of shell history and the process list.
--client-secret <secret> still works but is deprecated and warns.
SMELDR_SOCIAL_CLIENT_SECRET=... smeldr-cli social platform configure \
--platform mastodon|linkedin|x \
--client-id <id> \
--redirect-url <url> \
[--instance-url <url>] # mastodon only \
[--success-url <url>]smeldr-cli social schedule create --credential <id> --slot "<weekday> HH:MM IANA/TZ" [--slot ...]
smeldr-cli social schedule show --credential <id>
smeldr-cli social schedule pause --credential <id>
smeldr-cli social schedule resume --credential <id>
smeldr-cli social schedule delete --credential <id>Slot format: "<weekday> <HH:MM> <IANA timezone>" — e.g. "monday 09:00 Europe/Copenhagen".
Multiple --slot flags define multiple firing times per week.
Each credential may have at most one schedule.
The block group manages the block system (T32) over MCP, mirroring the block MCP
tools. Blocks are addressed by ID (no slug).
# Nodes (Author role)
smeldr-cli block node create --type hero --field Headline="Welcome" --field Subtext="Intro"
smeldr-cli block node create --type content_block --fields '{"Title":"Hi","Body":"**bold**"}'
smeldr-cli block node update <id> --field Title="New title"
smeldr-cli block node get <id>
smeldr-cli block node list --type hero --status published # aligned table
smeldr-cli block node list --json # raw JSON
smeldr-cli block node publish <id>
smeldr-cli block node archive <id>
# Composition (Editor role)
smeldr-cli block section add <page_id> <block_id>
smeldr-cli block section reorder <page_id> <id1,id2,id3>
smeldr-cli block section remove <page_id> <block_id>
smeldr-cli block item add <collection_id> <block_id>
smeldr-cli block item reorder <collection_id> <id1,id2>
smeldr-cli block item remove <collection_id> <block_id>Field keys are case-sensitive — use PascalCase (Title, Body, Headline) to
match the block templates. --field K=V preserves the key's case exactly; use
--fields '<json>' for typed or nested values (e.g. a Link object). block node list prints a table by default; add --json for raw output.
The nav group manages the navigation tree over MCP. Requires Editor role and
a server configured with DB nav mode (app.Nav(...)).
# List navigation items (aligned table)
smeldr-cli nav list
# List as raw JSON
smeldr-cli nav list --json
# Create a navigation item
smeldr-cli nav create --label "Learn" --path /learn [--parent-id <id>] [--module <module>] [--hidden] [--ghost] [--sort-order <n>]
# Update a navigation item (absent flags preserve stored values)
smeldr-cli nav update <id> [--label <text>] [--path <path>] [--parent-id <id>] [--module <module>] [--hidden] [--ghost] [--sort-order <n>]
# Delete a navigation item and all its descendants
smeldr-cli nav delete <id>nav list prints a table with columns: ID, LABEL, PATH, PARENT, HIDDEN, GHOST,
SORT. Use --json for the full raw response including the module field.
nav create requires --label. All other flags are optional. --hidden and
--ghost are boolean switches (no value). --sort-order takes an integer
(lower = earlier within the same parent level).
Writes (create, update, delete) require the server to be in DB nav mode;
nav list works in any nav mode. If writes are attempted against a non-DB
instance the server returns an error that smeldr-cli surfaces directly.
A governance write names the version of the record you read, so a change made since is never overwritten unseen: transition on a Decision, Amendment, Organization, Domain, Area or CoverageRule (ratify included), decision sources --set/--clear, grant and grant revoke, check answer, premise confirm and relation withdraw.
--rev <n>is the rev you read, and is sent as given. A script or an agent always passes it.- Without
--rev, on a terminal, smeldr-cli reads the record, shows what it is about to act on (address, title, status, rev; the body too for a ratify or supersede), and asksProceed with rev <n>? [y/N]. What you confirm is the version you saw. Anything butywrites nothing. - Without
--revand without a terminal, the write is refused before anything is sent. smeldr-cli never reads and writes on your behalf. - On Windows, smeldr-cli asks in PowerShell, Windows Terminal and Git Bash (its own window too, with ConPTY, the default in current Git for Windows). In a terminal that is not a console (an older Git Bash window without ConPTY) it cannot ask and refuses: pass
--rev, use Windows Terminal or PowerShell, or prefix it withwinpty. premise confirm <condition>andrelation withdrawalways need--rev: the rev of the resting Decision (get_decision), or of the relation (relation list).grantandgrant revokename the rev of the holder's identity,identity_revingrant list <token-id>. A holder that is not an identity yet names none.- On a conflict (the record changed since you read it) smeldr-cli prints the server's message and exits 1; it never retries. For a stale ratify it also prints the Decision as it is now: read it, and ratify again only if it still holds.
- Warnings in a result (
rev_missingand others) are printed to stderr.
Moves an item — dynamic content or a compiled type (e.g. Decision, Task,
Signal) — to a new state via its registered StateFlow, over MCP
(transition_item). Role is enforced by the target transition's own gate,
not by smeldr-cli.
smeldr-cli transition <type_name> <slug> --to <state> [--reason <text>] [--rev <n>]
# Ratifying a Decision
smeldr-cli transition Decision <slug> --to ratifiedtype_name is dynamic (snake_case, e.g. posts) or compiled (e.g.
Decision). --reason is only required if the target transition itself
requires one — omit it otherwise. smeldr-cli transition is a thin CLI
wrapper: the server performs the same flow validation it always does.
Check the standing status of an item (dynamic content or a compiled type, e.g. Decision, Task) over MCP (get_item_standing). An item with standing but no stored row returns none; a type with no standing configured returns no standing for this type.
smeldr-cli standing <type_name> <slug> [--json]
# Check standing for a Decision
smeldr-cli standing Decision my-decisionNote: <type> get and <type> list do not display standing. The REST item is the module's own struct, and adding the field would change core's REST output. Use standing or the MCP get tools to access standing directly.
Find records across every type you may read over MCP (search, smeldr.dev/mcp v1.65.0 or later): plain, case-insensitive text, filtered by type, state and place. Records you may not read never appear and never count.
smeldr-cli search [<text>] [--type t]... [--state s]... [--place p|none] [--limit n] [--offset n] [--json]
# Proposed Decisions with no Domain or Area (the import inbox)
smeldr-cli search --type Decision --state proposed --place noneAsk which Decisions apply to the files you change, and keep coverage rules true (core's coverage rules, D142; decisions_for_paths and check_coverage over MCP). Paths come as arguments or one per line with --stdin.
# Which Decisions apply to this branch's changes (Author; at most 3000 paths)
git diff --name-only main | smeldr-cli decisions-for-paths --repo acme/app --stdin [--no-organization] [--json]
# Count what each coverage rule matches; a rule that matches nothing opens a condition (Editor)
git ls-files | smeldr-cli coverage check --repo acme/app --stdin [--json]smeldr-cli hook pre-edit (core T1207) is a Claude Code PreToolUse hook. Before the agent's first edit of a file in a session, it shows the agent the Decisions in force for that file. Put it in the project's .claude/settings.json:
{"hooks": {"PreToolUse": [{"matcher": "Edit|Write|MultiEdit|NotebookEdit",
"hooks": [{"type": "command", "command": "smeldr-cli hook pre-edit --repo acme/app", "timeout": 30}]}]}}For each Edit, Write, MultiEdit or NotebookEdit call, the hook asks decisions_for_paths about the file, with the path relative to the project. The project is --root, or else $CLAUDE_PROJECT_DIR, or else the session's directory, or else the hook's own working directory. A relative one is taken from the working directory. If no root can be found, the edit is denied. Only a file outside the project is let through without a lookup; a file the hook cannot place is never let through. What happens next:
- The file is in an Area. The first edit of it in the session is denied. The reason lists the Areas and the Decisions in force there, with each Decision's text: the first 600 characters, for the first 10 Decisions (read with
get_decision). So the agent has read them without tools of its own. A text that could not be read, or one not read before--timeoutran out, is marked as such on its line, so a title is never taken for the whole rule. The reason tells the agent to make the same edit again if its change keeps to them, and to stop and ask if it would go against one. The same edit again is allowed. A new Area or Decision on the file denies once more. The reason lists only what the hook's token may read, and says so: a place the token may not read is left out, with its Decisions. - No Area is named for the file to this token. The edit is allowed, and the agent is told so. An Area the token may not read is left out, so a narrow token sees less.
- No answer. This covers no config, the server not answering within
--timeout(default 10s, the budget of the whole run, below the 30 s the settings give the hook), a refusal, and an answer the hook does not know the shape of (from a newer server, for example). An answer with no Area and no Decision counts as "no Area" only when it lists the file as uncovered. Any other such answer is one the hook cannot read. The edit is denied with the reason (--on-error deny, the default). To edit anyway, change the command to--on-error allow: the edit is then let through with a warning to the agent.
What this guarantees, and what not. Claude Code enforces the hook, not the agent. An edit with Claude Code's edit tools to a file an Area covers is held back until the agent has been shown the Decisions in force for that file in this session. The hook does not check that the change follows them, and it does not see files written through the shell (the Bash tool). An agent that already called decisions_for_paths itself still gets one deny per file, because the hook cannot see that call. A subagent's edits go through the hook too, with the session's own ID, so what the session has been shown counts for its subagents. That is what Claude Code 2.1.245 sent in our test.
The token. The hook reads SMELDR_URL and SMELDR_TOKEN, or .smeldr-cli.env in the project, which init writes. Keep that file out of version control. The token needs the Author role and read on the places that matter. The agent's own editor token from Getting started is enough. The hook always exits 0 with a decision, because Claude Code lets an edit through on any other exit code except 2. What it has shown is kept per session under the user cache directory (SMELDR_HOOK_STATE_DIR overrides it) and removed after 7 days.
Ask the agent to plan with it too. A passage for the project's CLAUDE.md:
Before you change a file, ask Smeldr which Decisions apply to it
(`decisions_for_paths` with this repository and the paths). Read the
Decisions in force, and say in your plan how the change keeps to them. If a
change would go against one, stop and ask instead of editing.The passage is a rule the agent is told to follow. The hook is the part Claude Code enforces.
Ask who approves a place you can read (core T911, D147; approvers_of over MCP, Author):
smeldr-cli approvers ARE3 [--json]Ask who administers the instance (core T944, D154; administrators over MCP): token name and class only, for any token, also one with no grant yet:
smeldr-cli administrators [--json]What the detectors found (core T953; list_findings over MCP), filtered by what you may read:
smeldr-cli findings [--detector standing-drift] [--type Decision] [--limit 50] [--json]What rests on an item, and what it rests on (core T919, D150; get_rest_counts and list_rest_counts over MCP): live for one item, or as the last sweep stored them for several. A Decision still holds although its premise is not in force (D149; confirm_premise, ratify over its place):
smeldr-cli rests Decision D12 [--json]
smeldr-cli rests --stored Decision:D12 Decision:D13 [--json]
smeldr-cli premise confirm D12 D7 --reason "the draft is what we follow"
smeldr-cli premise confirm S3170 --reason "the draft is what we follow" --rev 6 # by the condition, when you may not read the premise; --rev is the Decision'sA Decision's pinned external sources (core T914, D148; get_decision and update_decision over MCP). Each is a file at a full commit SHA with a role; set them while the Decision is proposed (a ratified one is locked: supersede it to re-pin):
smeldr-cli decision sources D148 [--json]
smeldr-cli decision sources D148 --set sources.json # or --set - for stdin, or --clearReplacing a Decision, or taking one out of force (core T1187, D189; supersede_decision, retire_decision, repair_superseded over MCP). Each act is one write; without --rev the cli shows the Decision with its rev and asks first. Use these, not transition --to superseded, which is deprecated when no replacement is recorded:
smeldr-cli decision supersede D186 --by D188 --reason "D188 states it more clearly"
smeldr-cli decision supersede D186 --new --from replacement.md --reason "..." # title, scope and sources (optional), the basis as body
smeldr-cli decision retire D172 --reason "a throwaway"
smeldr-cli decision repair D186 --by D188 --reason "..." # or --retire: one superseded with no replacement recordedThe pull request check (core T918; check_change, record_merge, record_close, answer_change_check, get_change_check, list_change_checks over MCP). change, merge and close are for the host's adapter or an operator; answer counts when you hold approve-change over the Area:
git diff --name-only main | smeldr-cli check change --repo acme/app --number 7 --head <sha> --stdin
smeldr-cli check merge --repo acme/app --number 7 --head <sha> --merge <sha>
smeldr-cli check close --repo acme/app --number 7 --head <sha> # closed without a merge
smeldr-cli check answer CHK3 ARE1 --approve # or --not-approved --reason "why"
smeldr-cli check show CHK3
smeldr-cli check list --repo acme/app --number 7 # or --area ARE1, --decision D7check close records a pull request closed without a merge: its Check's open requests are withdrawn, and a later check change for it makes it open again. Flags may come before or after the arguments (check answer --approve CHK3 ARE1 reads the same). An unknown flag or a stray argument is refused, never ignored; after -- every argument is a path.
Give every record without an address its address (D110) over MCP (migrate_addresses). Without --apply it is a dry run: the server runs the whole migration and rolls it back, so the report shows exactly what an apply would do and nothing is written. The report is printed to stdout as JSON and a one-line summary to stderr; --report also writes the report to a file.
smeldr-cli migrate-addresses [--apply] [--report <path>]
# Read what would change, then apply after a backup
smeldr-cli migrate-addresses --report dry.json
smeldr-cli migrate-addresses --apply --report apply.jsonApplying is a governance act: dry run first, back up the database, and keep the report with the deploy record. Needs the Admin role and smeldr.dev/mcp v1.60.0 or later on the server.
Show one item's history, newest first, over MCP (get_item_provenance):
smeldr-cli history <type_name> <slug> [--limit n] [--offset n] [--view members|gated]
# The last 20 changes of a Decision, with who made each
smeldr-cli history Decision my-decision --limit 20Prints JSON: each entry has its time (UTC, second resolution), verb, from and to state, gated, and by view the actor. The default view (members) carries actor_kind (job, agent, human or unclassified), actor_id, surface and reason on every entry; --view gated carries them only on a gated transition. You can only narrow your view. Rows written before core v1.121.0 say human for an actor with no classification and mean unclassified, never a verified person. Requires Editor role, smeldr.dev/mcp v1.49.0 or later on the server, and provenance enabled there (an error says so when it is not). Relation events are not part of this read.
A token's or a grant's history works the same way (needs smeldr.dev/mcp v1.53.0 or later on the server): smeldr-cli history Token <fingerprint-id> (the id token list shows) or smeldr-cli history RoleGrant <grant-id>. It shows when it was minted or granted and revoked, by whom and why, also after a grant is gone, and needs the same access as token list.
Show what is reachable from one item in the relation graph, over MCP (get_reachability):
smeldr-cli reachability <type_name> <id> [--kind k] [--direction incoming|outgoing|both] [--depth n] [--max-items n] [--limit n] [--offset n]
# Everything within three hops of a post
smeldr-cli reachability post my-post --depth 3Prints JSON: items (each with its depth, type, id and the edge class and confidence of the edge that reached it), ring_sizes, total, count and cut. Live edges only. direction is the walk's own incoming, outgoing or both (default both). The walk is bounded: --max-items (default 500, at most 2000) caps how many items it returns; when the cap stops it, cut is {depth, dropped} and the deeper rings are absent, never shown as empty. --limit (default 100, at most 500) and --offset page the items. Graph structure only. Requires Author role and smeldr.dev/mcp v1.50.0 or later on the server.
Page through every relation on the instance, over MCP (list_relations):
smeldr-cli relation list [--kind K] [--source-type T] [--target-type T] [--include-ended] [--as-of RFC3339] [--limit N] [--offset N] [--all] [--json]
# The whole live graph, as one moment
smeldr-cli relation list --all --limit 500Prints a table (id, kind, source, target, edge class, end cause), or JSON with --json: edges, total, count, limit, offset and as_of. Ordered by created_at, then id. The first page fixes as_of; --all pages on with it until the total, so the edges describe the graph at that one moment. Live edges only unless --include-ended. Source and target ids are the items' raw ID, as the list tools return them. Requires Author role and smeldr.dev/mcp v1.58.0 or later on the server.
Your event subscriptions (D116), over MCP. Requires Author role and smeldr.dev/mcp v1.64.0 or later on the server, on an instance that keeps subscriptions (smeldr.dev/core v1.162.0).
smeldr-cli subscription list [--owner <user-id>]
smeldr-cli subscription get N12
smeldr-cli subscription create --name "core tasks" --filter '{"types":["Task"],"fields":{"band":["core"]}}'
smeldr-cli subscription create --name "from a file" --filter @filter.json --include-own
smeldr-cli subscription update N12 --name renamed --include-own=false
smeldr-cli subscription pause N12
smeldr-cli subscription resume N12
smeldr-cli subscription delete N12--filter is a JSON object (types, events, event_names, from_states, to_states, items, related_to, fields, signal_kinds, addressed_to_me, sent_by_me); the server refuses an unknown key. The three default subscriptions are listed and can be paused, not deleted. --owner names another token and needs administer.
Assert a relation, over MCP (assert_relation):
smeldr-cli relation assert D4 grounded_in D2
smeldr-cli relation assert Decision:money-in-cents contradicts D9 --json
smeldr-cli decision place D4 --area ARE1 # or --domain DOM1, --organization ORG1Source and target are Type:ident or a core address (D4, ARE1, DOM2), whose prefix names the type; the server resolves the ident (address, slug or ID). The relation is asserted; an observed relation is not made here. Asserting a live relation of a governance kind again needs --rev, the rev from relation list. decision place asserts belongs_to_area, belongs_to_domain or belongs_to_organization from the Decision to the place: a Decision is placed before it is ratified. Prints one line naming the relation and its rev, or the server's JSON with --json. Requires Author role.
Read Signals, and answer or withdraw an open request (D115):
smeldr-cli signal list # what is addressed to you
smeldr-cli signal list --receiver core --state open --limit 20
smeldr-cli signal get S42 [--json]
smeldr-cli signal answer S42 --text "Use the second option" [--ref Task:T7]
smeldr-cli signal withdraw S42 --reason "No longer needed"signal list without --receiver and --sender lists the Signals addressed to you: those whose receiver is your user ID, an operation you hold (such as ratify) or a receiver your subscriptions name (your band). So you list the conditions you can act on without knowing those words. It needs smeldr.dev/mcp with list_signals addressed_to_me; against an older server the cli says to name a --receiver. --state defaults to what awaits action (open and pending), newest first. signal get prints the type, state, receiver, subject, message and, for an answered request, the answer. A Signal about a record you cannot read is not listed.
Print the event stream, one JSON line per event:
smeldr-cli watch --subscription N12
smeldr-cli watch --channel core,architect [--include-own]
smeldr-cli watch --subscription N12 --after <event-id>- Each event is printed to stdout as it arrives, so the command works as a monitor. Heartbeats are not printed;
caught_upandskippedlines go to stderr. - A dropped or cleanly closed connection (a server restart) is reconnected with
?after=<last event id>, with a backoff of 1 s doubling to 30 s that resets once a connection is up. An event delivered twice is printed once (the last 1,024 IDs are kept). - Without
--after,--subscriptionresumes from the subscription's saved cursor. - 400, 401, 403 and 404 end the command with exit 1 and the server's message. Ctrl-C stops it.
Requires Author role; --subscription needs smeldr.dev/core v1.162.0 or later on the server.
See CHANGELOG.md.
MIT — see LICENSE.