This page is generated from packages/cli/src/commands/* after pnpm build.
Run pnpm cli:docs to update it, or pnpm cli:docs:check to verify it is current.
| Name | Description |
|---|---|
-v, --version |
print the CLI version |
--json |
emit machine-readable output on stdout |
--verbose |
include stage detail and debug diagnostics |
--no-color |
disable colour |
--cwd <path> |
run against a project in another directory |
-h, --help |
display help for the command |
Create a minimal Lorepack project in a directory.
lore init [path]
| Name | Description |
|---|---|
[path] |
project directory (default: .) |
| Name | Description |
|---|---|
--force |
overwrite existing Lorepack configuration |
--dry-run |
show what would change without writing |
Preview what a build would change. Makes no changes itself.
lore plan
None.
| Name | Description |
|---|---|
--allow-large-project |
continue past the supported file count |
--exit-code |
exit 2 when there are changes, for CI gating |
Compile the project into an immutable build and activate it.
lore build
None.
| Name | Description |
|---|---|
--no-activate |
verify a candidate without moving the pointer |
--frozen |
fail if lore.lock would change |
--allow-large-project |
continue past the supported file count |
Report whether the active build still matches the sources.
lore status
None.
| Name | Description |
|---|---|
--exit-code |
exit 2 when sources are dirty, for scripting |
--allow-large-project |
continue past the supported file count |
Compare two builds. Reads build data only, never the sources.
lore diff [from] [to]
| Name | Description |
|---|---|
[from] |
build to compare from |
[to] |
build to compare to |
None.
Search the active build. Every result carries its source location.
lore search <query>
| Name | Description |
|---|---|
<query> |
what to look for |
| Name | Description |
|---|---|
--limit <count> |
results to return (default 10) |
--path <glob> |
restrict to paths matching a glob |
--type <extension> |
restrict to one file extension |
--source <artifact> |
restrict to one document, by path or artifact id |
--include-archived |
include archived and superseded sources, which are labelled |
--debug |
show why each result ranked where it did |
Show what the build contains. Subjects: warnings, exclusions, sources, build, chunks, tables, rules, builds, or a source path.
lore inspect <subject> [target]
| Name | Description |
|---|---|
<subject> |
one of warnings, exclusions, sources, build, chunks, tables, rules, builds, or a source path |
[target] |
path or build id, depending on the subject |
| Name | Description |
|---|---|
--build <id> |
inspect a build other than the active one |
Write a portable .lorepack archive of a build.
lore pack [build]
| Name | Description |
|---|---|
[build] |
build id or prefix |
| Name | Description |
|---|---|
--verify <file> |
check an existing archive instead of writing one |
--out <file> |
archive path to write |
List build history, newest first.
lore builds
None.
None.
Point this project at a build. Never recompiles.
lore activate <build>
| Name | Description |
|---|---|
<build> |
build id or unambiguous prefix |
None.
Return to the previous verified build. Never recompiles.
lore rollback [build]
| Name | Description |
|---|---|
[build] |
build id or unambiguous prefix |
| Name | Description |
|---|---|
--target <target> |
roll back a remote deployment target |
Remove old builds, keeping the active one and the previous five.
lore prune
None.
| Name | Description |
|---|---|
--keep <count> |
previous builds to keep (default 5) |
--target <target> |
plan cleanup for a remote deployment target |
--resume <receipt-id> |
continue an interrupted remote cleanup |
--yes |
apply the plan instead of only printing it |
Turn a folder into a running context runtime. Builds, serves, and connects.
lore dev [path]
| Name | Description |
|---|---|
[path] |
project directory (default: .) |
| Name | Description |
|---|---|
--port <number> |
port to listen on (default 43110) |
--host <address> |
address to bind (default 127.0.0.1) |
--yes |
accept defaults without asking (the default path asks nothing) |
--allow-large-project |
continue past the supported file count |
Project a build onto a remote target and activate it after verification.
lore deploy [target]
| Name | Description |
|---|---|
[target] |
which target to deploy to |
| Name | Description |
|---|---|
--dry-run |
show the deploy plan and change nothing remotely |
--no-build |
refuse when sources are dirty or unbuilt |
--yes |
apply without asking |
--resume <receipt-id> |
continue an interrupted deploy |
--allow-capability-loss <capability> |
accept one named capability the target cannot serve |
Prepare and inspect deployment targets.
lore target <subject> <target>
| Name | Description |
|---|---|
<subject> |
add, status, or token |
<target> |
cloudflare |
| Name | Description |
|---|---|
--dry-run |
show the setup plan and change nothing |
--yes |
apply without asking |
--rotate |
replace the current runtime bearer token |
--revoke |
remove every runtime bearer token |
--account-id <id> |
connect to an existing Cloudflare account id |
--worker <name> |
connect to an existing Worker name |
--catalog-db <name> |
connect to an existing D1 database name |
--objects-bucket <name> |
connect to an existing R2 bucket name |
Configure an AI client to read this project, and verify that it works.
lore connect [client]
| Name | Description |
|---|---|
[client] |
which client (claude-code, codex, vscode, or all) |
| Name | Description |
|---|---|
--dry-run |
show the plan and change nothing |
--yes |
apply without asking |
--scope <scope> |
project (default) or user |
--shared |
write the project file that others will be asked to trust |
--snippet |
print a configuration to paste, and change nothing |
Remove the Lorepack entry from an AI client, leaving everything else.
lore disconnect [client]
| Name | Description |
|---|---|
[client] |
which client (claude-code, codex, vscode, or all) |
| Name | Description |
|---|---|
--scope <scope> |
project (default) or user |
--shared |
the project file rather than the local one |
Check this environment and project, and say how to fix what is wrong.
lore doctor
None.
| Name | Description |
|---|---|
--ci |
exit non-zero when any check fails, for use in a pipeline |
--port <number> |
the dev port to test (default 43110) |
Show the resolved configuration, and where each value came from.
lore config <subject> [path]
| Name | Description |
|---|---|
<subject> |
show or explain |
[path] |
for explain: a dotted key, e.g. chunking.targetTokens |
| Name | Description |
|---|---|
--effective |
show every resolved value, not only what lore.yaml says |
Serve the active build to an AI client over MCP on stdio.
lore mcp
None.
| Name | Description |
|---|---|
--ensure-current |
rebuild first when the sources have changed (the default) |
--allow-stale |
serve the existing build even when sources changed |
--active-only |
skip source checks entirely, for pinned or CI use |
--project <path> |
the project to serve |
--revalidate-interval <ms> |
how often to recheck the sources while serving (default 5000, 0 every request, off never) |
Serve the active build over HTTP and MCP. Read-only, and never rebuilds.
lore serve
None.
| Name | Description |
|---|---|
--port <number> |
port to listen on (default 4321) |
--host <address> |
address to bind (default 127.0.0.1) |
--revalidate-interval <ms> |
how often to recheck the sources (default 5000, 0 every request) |
Write a bounded, cited context bundle for a task. Markdown or JSON.
lore export
None.
| Name | Description |
|---|---|
--task <text> |
what the context is for |
--profile <name> |
agent, coding, chat or deep (default chat) |
--budget <tokens> |
estimated token budget, overriding the profile |
--format <format> |
markdown or json (default markdown) |
--output <file> |
write to a file instead of stdout |
--force |
overwrite an existing output file |
--allow-unsupported-budget |
permit a budget outside the supported 4,000 to 40,000 range |