Skip to content
Français

CLI commands

Build images, check your environment and inspect recovery data from the terminal.

OptionCommandsEffect
-h, --helpAllPrints the usage and options, then exits.
--jsondoctor, recoveryWrites the report as JSON on stdout.
-y, --yesinitAccepts the defaults without prompting.
--applyrestore, prunePerforms the change; without it, only preview.
Exit codeMeaning
0Success. doctor warnings and skipped checks still exit 0.
1A check failed, a report is incomplete, or the command failed (message on stderr).
130Interrupted with Ctrl+C, or an init prompt was cancelled.
143Stopped with SIGTERM.

Check the host tools and selected sandbox provider. Add --image to check a local agent image in a temporary container as well.

outpost doctor [--sandbox-provider NAME] [--agent NAME] [--image NAME] [--json]
FlagDefaultValues and effect
--sandbox-providerdockerdocker, podman, local, vercel, daytona.
--agentcodexcodex, claude, antigravity, copilot, kimi.
--imageNoneAlso checks this local image in a temporary container. Docker and Podman only.
--jsonOffJSON report.

It exits 1 when a check fails. Diagnostics explains the report.

Build the agent image from the recipe in the chosen directory. Select Docker or Podman and give the result the image name used by your scripts.

outpost image build [--directory PATH] [--engine docker|podman] [--file PATH] [--image NAME] [--uid N] [--gid N]
FlagDefaultValues and effect
--directoryCurrent directoryBuild context holding the recipe.
--enginedockerdocker, podman.
--fileDockerfile (Docker), Containerfile (Podman)Recipe path, relative to --directory.
--imageoutpost:<directory name>Image tag.
--uid, --gidYour user and group IDs (1000 on Windows)IDs of the agent user inside the image.

The engine’s output streams to the terminal, then the command prints build: <image>. A build stops after 30 minutes.

Remove the local agent image when you no longer need it. Use the engine and image name from the build you want to remove.

outpost image remove [--directory PATH] [--engine docker|podman] [--image NAME]

--directory, --engine and --image take the same defaults as image build. The command prints remove: <image>.

Inspect the workspaces, retained transfers and recorded activity under a repository’s .outpost. This command reads the inventory without changing it.

outpost recovery inspect [--repository PATH] [--max-entries N] [--git] [--locks] [--resources] [--json]
FlagDefaultValues and effect
--repositoryCheckout of the current directoryRepository whose .outpost is listed.
--max-entries100000Stops the inventory after this many entries.
--gitOffAdds each workspace’s branch, HEAD and dirty state.
--locksOffAdds local lock PIDs and ownership.
--resourcesOffAdds recorded sandbox activity.
--jsonOffJSON report.

It changes nothing. It exits 1 when the inventory is partial.

Verify a retained transfer before restoring it. You can compare checksums and test whether its patches apply in a temporary clone.

outpost recovery verify --directory TRANSFER [--checksums [--max-bytes N]] [--restorability --repository PATH] [--json]
FlagDefaultValues and effect
--directoryRequiredRetained transfer directory.
--checksumsOffCompares the files with the transfer’s checksum manifest.
--max-bytes1 GiBBytes checked by --checksums, which it requires.
--restorabilityOffApplies the transfer’s patches in a temporary clone of --repository.
--repositoryNoneCheckout used by --restorability; they go together.
--jsonOffJSON report.

It changes no files. It exits 1 when a check fails or is incomplete.

Restore the saved host state or incoming sandbox changes into a new directory. Preview the plan first, then add --apply when you are ready to create the copy.

outpost recovery restore --directory TRANSFER --repository PATH --destination NEW_PATH --side previous|incoming [--max-bytes N] [--apply] [--json]
FlagDefaultValues and effect
--directoryRequiredRetained transfer directory.
--repositoryRequiredCheckout the transfer belongs to.
--destinationRequiredNew directory outside the repository; it must not exist.
--sideRequiredprevious (host state before synchronization) or incoming (sandbox changes).
--max-bytes1 GiBLargest retained payload accepted.
--applyOffCreates the destination; without it, prints the plan.
--jsonOffJSON plan or result.

The restored copy is a detached checkout. The transfer stays in place; review the copy before integrating it.

Preview the removals selected by your JSON retention policy. Add --apply to delete those entries after reviewing the plan.

outpost recovery prune --policy FILE [--repository PATH] [--apply] [--json]
FlagDefaultValues and effect
--policyRequiredJSON policy file, up to 64 KiB (format).
--repositoryCheckout of the current directoryRepository whose .outpost is pruned.
--applyOffDeletes the candidates; without it, a dry run.
--jsonOffJSON plan and result.

It exits 1 when the inventory is incomplete, the projected size exceeds the policy’s limit, or --apply had to keep a candidate. Branches and recovery artifacts are always kept.

This command generates an example project and, with Docker or Podman, prepares its image. The recommended installation path uses it to build the image; you then write your own TypeScript scripts.

outpost init [--yes] [--directory PATH] [--repository PATH] [--agent NAME] [--sandbox-provider NAME] [options]

In a terminal, init prompts for the agent, sandbox provider, package manager and authentication you did not pass. Without a terminal, pass --yes or both --agent and --sandbox-provider.

init writes run.ts, brief.md, .env.example, .gitignore, the image recipe and, when none exists, package.json (optional project generation). It stops before writing if one of these files exists, except .gitignore, which it extends.

It then prints the sign-in steps for the chosen authentication and the command to run, such as node run.ts.

npx outpost init --yes --directory .outpost-image --image outpost:dev
FlagDefaultValues and effect
--directoryCurrent directoryWhere the project is written.
--repository.Git checkout the workflow edits, relative to --directory.
--agentcodexcodex, claude, antigravity, copilot, kimi.
--sandbox-providerdockerdocker, podman, local, vercel, daytona.
--authenticationaccount (usage with --base-url)account, usage; account-token for claude and copilot.
--modelThe CLI’s defaultModel name. Required for Kimi usage and for --base-url.
--base-urlNoneCustom Codex Responses endpoint. Requires --model and usage.
--api-key-envOPENAI_API_KEYKey variable for --base-url.
--managerpackageManager field, lockfile, or npmnpm, pnpm, yarn, bun.
--installOffInstalls @elie-laloum/outpost and the provider SDK as dev dependencies.
--build, --no-buildBuild for docker and podmanBuilds the image once the files are written.
--imageoutpost:<directory name>Image tag built and used by run.ts (Docker and Podman).