CLI Command Reference

This is the index. It shows the whole leed command tree, the options that apply everywhere, and where each command’s own flags are written up. Every command in the tree accepts --help, at any depth — leed site commit --help prints that command’s synopsis and options — so this page exists to answer the other question: which command, and where is it documented.

The command tree

Every group and leaf that ships. * marks the ones hidden from --help. For the live list, with every option, run leed schema --json; to find a command by what you want to do, run leed cli search "what you want to do".

leed
├── auth
│   ├── login
│   ├── logout
│   ├── status
│   ├── default
│   ├── rotate
│   └── reset
├── login                       alias of `leed auth login`
├── site
│   ├── init
│   ├── build
│   ├── validate
│   ├── commit
│   ├── push
│   ├── list
│   ├── eject
│   ├── upload              *
│   └── notify-cms          *
├── import
│   ├── openapi
│   ├── markdown
│   ├── html
│   ├── status
│   ├── apply
│   └── clean
├── page
│   ├── sync-state
│   ├── review
│   ├── get
│   ├── create
│   ├── update
│   ├── publish
│   ├── schedule
│   ├── stamp
│   └── frontmatter get | set
├── asset
│   ├── list | get | set
│   ├── export
│   └── upload
├── settings
│   ├── pagetype      list | get | create | set
│   ├── label         list | get | create | set
│   ├── autolink      list | get | create | set | delete | reorder
│   ├── searchindex   list | get | create | set
│   ├── company       get | set
│   ├── form          list | get | create | set | publish | delete
│   ├── shortcode     list | get | create | set
│   ├── user          list | get | set
│   ├── oidctrust     list | create | delete
│   ├── path          list | resolve | create | delete
│   ├── menu          list | get | set | add | remove | move | reorder | set-menu
│   ├── brokenlinks   list
│   ├── pending
│   └── publish
├── deployments
│   ├── status
│   ├── promote
│   └── retry
├── contacts
│   ├── export
│   └── import
├── mcp
│   └── add
├── schema
├── cli
│   └── search
├── self-update
├── completion              *
│   ├── install             *
│   └── uninstall           *
├── completion-server       *
└── __credential            *   git’s credential helper for the content repository

Global options

These are declared on the root program, so every command accepts them however deeply nested it is.

FlagTypeDefaultWhat it does
-v, --versionboolean—Print the CLI version and exit. The old -V is gone
--verbosebooleanfalseExactly the same as -n leed:*. Long form only
-n, --noise <string>string*:errorWhich logger channels print, as a debug-style filter
--jsonbooleanfalseEmit one machine-readable JSON document on stdout instead of formatted text
-h, --helpboolean—Print help for the command it follows

Every command that changes something also takes --dry-run, which reports what it would do and changes nothing — leed site commit, push and validate --reset, the settings, asset, page, contacts and import verbs, and leed mcp add among them. leed schema --json says, per command, whether it has one.

--json has its own page: the envelope, the fifteen error codes, the exit classes and the rules for consuming them are on machine-readable output.

Reading the logger filter

Channels are named leed:<area>:<level> — leed:app:error, leed:site:build:info, leed:auth:debug — and -n takes the same wildcard patterns the debug package uses. The default, *:error, matches every :error channel from every library that uses debug, which is why a quiet run still tells you when something breaks. --verbose is a shorthand and nothing more: it is precisely -n leed:*, every level of every Leed channel. Pass both and they combine, as leed:*,<your filter>.

Every leed:* channel writes to stderr, in both human and JSON mode. They are diagnostics, not a command’s answer, so leed site list > types.txt captures the table and none of the logging.

Eleventy’s internals are a separate matter, because Eleventy loads its own copy of debug and reads the raw DEBUG variable:

DEBUG=Eleventy* leed site build

An inherited DEBUG is merged into the CLI’s own filter rather than replacing it. And once the namespaces are registered, the CLI deletes DEBUG from the environment whenever no Eleventy channel ended up enabled — a deliberate performance workaround, because Eleventy checks that variable to decide whether to run character-set detection on every template it reads. The practical consequence is that DEBUG=* does not behave the way you would expect from other tools. Use -n for Leed channels and DEBUG=Eleventy* for Eleventy’s.

leed auth

Six subcommands managing the sessions the CLI holds — one per environment and company — plus the two GitLab tokens your site checkout depends on. None of them needs a site directory except rotate and reset, which are scoped to one site.

CommandPurposeNeeds a site directory?Detail
leed auth loginSign in via the browser device flow, or send a magic linkNoleed auth
leed auth logoutSign out of one company’s session, or all of an environment’s with --all-companiesNoleed auth
leed auth statusReport every stored session, and the site’s GitLab tokensNo, but reports more inside oneleed auth
leed auth defaultShow or set the company used outside a site directoryNoleed auth
leed auth rotateReissue this site’s GitLab tokens, keeping your CMS sessionYesleed auth
leed auth resetReissue the tokens and revoke your CMS sessionYesleed auth

What the session actually is, where it lives and how it stays alive is the subject of CLI authentication.

leed login

leed login

A top-level alias for leed auth login, with identical flags and identical behavior. It reports its own name — login, not auth.login — in its --json document, so a consumer can match the command line it actually ran.

leed site

Run these from your site folder — the one holding leed.config.json — or from raw-content/. The CLI searches those two levels and no further.

CommandPurposeHidden?Detail
leed site initClone the site repository and install the project toolingNoleed site init
leed site buildBuild the site, optionally serving and watching itNoleed site build
leed site validateCheck every modified file against the repository rulesNoleed site validate, commit and push
leed site commitStage everything and commit through the gate chainNoleed site validate, commit and push
leed site pushRebase, push, and notify the CMSNoleed site validate, commit and push
leed site listList the CMS page types of one kindNoOpenAPI commands
leed site ejectList the Leed templates you can take ownership of, or take oneNoleed site eject
leed site uploadUpload a built worker version and report the build resultYesThis page, below
leed site notify-cmsPost a committed change set to the CMSYesleed site validate, commit and push

leed site generate, leed site import and leed site create-page-type are gone: importing content is the leed import group below, and a page type is created with leed settings pagetype create.

leed site itself declares three hidden options — -l, --location, -c, --customer and --ci — which exist so a CI build can point the CLI at a checkout without a leed.config.json. They read BUILD_SITE_LOCATION, BUILD_CUSTOMER and CI respectively, and are documented alongside every other variable the CLI reads on leed.config.json, files and environment.

leed schema

leed schema --json
leed schema site.list --json
leed cli search "publish a form"

The CLI describing itself, in stages. leed schema is the index — every command in one line with whether it mutates, is idempotent, reaches the network and has a --dry-run, plus the shared options, envelope, error codes and exit codes described once. leed schema <group> narrows the index to one group, and leed schema <command> returns one command’s document: its arguments, its options, the JSON Schema of its result and the next steps it can name. A name is accepted dotted (site.list) or as an argv path (site list), and --command still works as an alias. It is built from the live command tree of the binary running it, so it cannot describe a version other than the one you have.

leed cli search is the way in when you do not know the name: it matches your own words against every command’s name, description, options and positional arguments, so page id finds the commands that take a page id. Both are documented under discovering the CLI.

leed import

Content into the CMS, from whichever source it is in: stage a set for review, build it, then upload it. Run from your site folder.

CommandPurpose
leed import openapi <spec>Stage a page set from an OpenAPI spec
leed import markdown <dir>Stage a page set from a directory of markdown files; nested directories become nested navigation folders
leed import html <dir>Convert a directory of HTML files to markdown in place, then stage it
leed import statusReport what is staged, and what the CMS’s pre-write pass makes of it
leed import applyUpload the reviewed set into the CMS
leed import cleanDiscard a staged set, removing exactly what staging wrote

Every verb takes --page-type-id. The workflow and its guards are on importing an OpenAPI spec, and the flags on OpenAPI commands.

leed page

Page content from the command line. Every verb takes --env and --company.

CommandPurpose
leed page sync-state --page-type-id <id>Every CMS-managed page in a page type: path, status, source id, who last changed it, and what it references
leed page get <pageId>Print a page’s markdown body; with --json, its metadata and the block anchors update --block takes
leed page review <pageId>A page’s comment threads and pending suggestions, per block
leed page createCreate a page from a piped or named markdown document
leed page update <pageId>Replace the whole body, or one block with --block <dataId> under compare-and-swap; --suggest lands it as a tracked suggestion
leed page publish <pageId>Schedule a page to publish now
leed page schedule <pageId> --at <instant>Schedule a page to publish at an ISO 8601 instant
leed page stamp <pageId...> --source-id <sha>Mark pages current by setting their source id, without touching the body
leed page frontmatter get / setRead or replace a page’s custom frontmatter

create and update take --source-id <sha> to record the commit the content was checked against in the same write. If the CMS takes the body but not the tag, the result is a partial success that names the leed page stamp to run.

leed asset

CommandPurpose
leed asset uploadUpload a local file, or a prepared folder, to the asset manager. Deduplicates, and returns a ready-to-paste Leed Markdown reference. --alt and --alt-from keep your own alt text. Must run inside a site folder
leed asset list, get, setFind, inspect and retag existing assets
leed asset exportDownload originals into a folder, resumably

leed settings

CMS settings, one noun at a time: pagetype, label, autolink, searchindex, company, form, shortcode, user, oidctrust, path, menu and brokenlinks, each with the verbs shown in the tree above. Ids are positional — leed settings searchindex get <searchIndexId> — and field flags are generated from the setting’s own schema. Changes are staged until published: leed settings pending lists what is unpublished and leed settings publish [ids] | --all publishes it, one unit at a time, exiting non-zero if any unit failed. A user’s role can only be changed by an Administrator, with leed settings user set --role, and oidctrust create needs --yes.

leed deployments, leed contacts and leed mcp

CommandPurpose
leed deployments statusThe recent preview and public deployments, and whether the preview can be promoted
leed deployments promotePromote the preview site to public. Asks first
leed deployments retryRe-run the build for a failed deployment. Does not ask: it publishes nothing new
leed contacts export <file>Export contacts to CSV or JSON, with --format
leed contacts import <file>Create or update contacts in bulk from CSV or JSON
leed mcp add --cms --docsWrite the Leed MCP servers into the site’s .mcp.json

Maintenance commands

leed self-update

Checks the registry for a newer release and installs it, bypassing the 24-hour throttle the automatic check obeys. With nothing to do it prints “Already up-to-date, no updates required.”; otherwise it prints “Update complete!” once bun install -g has finished. The automatic update path — which installs rather than merely notifying, and how to suppress it in a script — is described under installing the Leed CLI.

leed completion install
leed completion uninstall

Shell tab completion for bash, zsh and fish, detected from SHELL. The candidate list is generated from the live command tree, so it never goes stale as commands and flags change. Install prints “Shell completion installed. Restart your terminal to activate.” Both commands are hidden from --help and both are fully supported.

Commands you will not run yourself

leed site upload and leed site notify-cms exist for the build pipeline. upload uploads a built worker version and reports the build result back to the CMS; notify-cms posts a committed change set to POST /api/site/pushed, and is what leed site push calls in-process at the end of a successful push. upload also works locally if you have a reason to run it. Both retry the CMS call with exponential backoff on timeouts and transport errors, and both exit with the CLI’s shared exit classes — including upload’s non-zero exit with ok: true when the worker was uploaded but the callback was not delivered. See CLI troubleshooting and exit codes for the full table.

completion-server is invoked by the shell hook that leed completion install writes, on every Tab press. It is outside the --json envelope contract: its stdout is the shell’s candidate list, in a format the shell defines, whatever --json or LEED_JSON say. __credential is the other one — git runs it as the credential helper for your content repository, and it answers git, not a person.

Quick reference

Every command that appears in --help, in one place.

CommandPurpose
leed loginSign in (shorthand for leed auth login)
leed auth loginSign in via the browser device flow
leed auth login --email you@example.comSend a magic-link sign-in email
leed auth logoutSign out of one company’s session
leed auth statusSession and GitLab token health
leed auth defaultShow or set the default company
leed auth rotateReissue this site’s GitLab tokens
leed auth resetReissue the tokens and revoke your CMS session
leed site initOne-time site setup on this machine
leed site buildBuild the site locally
leed site build --serveBuild, serve on localhost:8080 and rebuild on change
leed site validateCheck your changes are allowed to be committed
leed site validate --resetRestore every file you were not allowed to change
leed site commit -m "..."Commit through the gate chain; stages files for you
leed site pushRebase, push, and trigger your preview site’s rebuild
leed site listList the CMS page types of one kind
leed site ejectList ejectable Leed templates, or take ownership of one
leed import openapi / markdown / htmlStage a page set for review
leed import applyUpload a reviewed page set into the CMS
leed page get / update / stampRead, edit or mark current one page
leed asset uploadUpload a local file and get its Markdown reference
leed settings pending / publishList and publish unpublished settings changes
leed deployments statusPreview and public deployment state
leed schemaDescribe the CLI: commands, options and result schemas
leed cli searchFind a command by task
leed self-updateUpdate the CLI now, past the 24-hour throttle
leed completion installInstall shell tab completion
leed completion uninstallRemove shell tab completion

Workflow context for these commands is in local development and validate, commit and push; if a command has failed and you are here looking for the message, start at CLI troubleshooting and exit codes.

ESC