Skip to content

Latest commit

 

History

History
484 lines (325 loc) · 9.65 KB

File metadata and controls

484 lines (325 loc) · 9.65 KB

CLI reference

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.

Global options

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

lore init

Create a minimal Lorepack project in a directory.

lore init [path]

Arguments

Name Description
[path] project directory (default: .)

Flags

Name Description
--force overwrite existing Lorepack configuration
--dry-run show what would change without writing

lore plan

Preview what a build would change. Makes no changes itself.

lore plan

Arguments

None.

Flags

Name Description
--allow-large-project continue past the supported file count
--exit-code exit 2 when there are changes, for CI gating

lore build

Compile the project into an immutable build and activate it.

lore build

Arguments

None.

Flags

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

lore status

Report whether the active build still matches the sources.

lore status

Arguments

None.

Flags

Name Description
--exit-code exit 2 when sources are dirty, for scripting
--allow-large-project continue past the supported file count

lore diff

Compare two builds. Reads build data only, never the sources.

lore diff [from] [to]

Arguments

Name Description
[from] build to compare from
[to] build to compare to

Flags

None.

lore search

Search the active build. Every result carries its source location.

lore search <query>

Arguments

Name Description
<query> what to look for

Flags

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

lore inspect

Show what the build contains. Subjects: warnings, exclusions, sources, build, chunks, tables, rules, builds, or a source path.

lore inspect <subject> [target]

Arguments

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

Flags

Name Description
--build <id> inspect a build other than the active one

lore pack

Write a portable .lorepack archive of a build.

lore pack [build]

Arguments

Name Description
[build] build id or prefix

Flags

Name Description
--verify <file> check an existing archive instead of writing one
--out <file> archive path to write

lore builds

List build history, newest first.

lore builds

Arguments

None.

Flags

None.

lore activate

Point this project at a build. Never recompiles.

lore activate <build>

Arguments

Name Description
<build> build id or unambiguous prefix

Flags

None.

lore rollback

Return to the previous verified build. Never recompiles.

lore rollback [build]

Arguments

Name Description
[build] build id or unambiguous prefix

Flags

Name Description
--target <target> roll back a remote deployment target

lore prune

Remove old builds, keeping the active one and the previous five.

lore prune

Arguments

None.

Flags

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

lore dev

Turn a folder into a running context runtime. Builds, serves, and connects.

lore dev [path]

Arguments

Name Description
[path] project directory (default: .)

Flags

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

lore deploy

Project a build onto a remote target and activate it after verification.

lore deploy [target]

Arguments

Name Description
[target] which target to deploy to

Flags

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

lore target

Prepare and inspect deployment targets.

lore target <subject> <target>

Arguments

Name Description
<subject> add, status, or token
<target> cloudflare

Flags

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

lore connect

Configure an AI client to read this project, and verify that it works.

lore connect [client]

Arguments

Name Description
[client] which client (claude-code, codex, vscode, or all)

Flags

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

lore disconnect

Remove the Lorepack entry from an AI client, leaving everything else.

lore disconnect [client]

Arguments

Name Description
[client] which client (claude-code, codex, vscode, or all)

Flags

Name Description
--scope <scope> project (default) or user
--shared the project file rather than the local one

lore doctor

Check this environment and project, and say how to fix what is wrong.

lore doctor

Arguments

None.

Flags

Name Description
--ci exit non-zero when any check fails, for use in a pipeline
--port <number> the dev port to test (default 43110)

lore config

Show the resolved configuration, and where each value came from.

lore config <subject> [path]

Arguments

Name Description
<subject> show or explain
[path] for explain: a dotted key, e.g. chunking.targetTokens

Flags

Name Description
--effective show every resolved value, not only what lore.yaml says

lore mcp

Serve the active build to an AI client over MCP on stdio.

lore mcp

Arguments

None.

Flags

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)

lore serve

Serve the active build over HTTP and MCP. Read-only, and never rebuilds.

lore serve

Arguments

None.

Flags

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)

lore export

Write a bounded, cited context bundle for a task. Markdown or JSON.

lore export

Arguments

None.

Flags

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