CLI reference
The orbiter CLI scaffolds projects, manages users, exports content, and syncs media with git.
Install
npm install -g @a83/orbiter-cli
orbiter init [dir]
Scaffold a new Astro + Orbiter project.
orbiter init my-site cd my-site && npm install && npm run dev
Creates astro.config.mjs, a fresh content.pod with a default Posts collection, example Astro pages, and a GitHub Actions workflow template.
orbiter add-user
Add an admin or editor user to an existing pod.
orbiter add-user --pod ./content.pod
Interactive prompts: username, password, role (admin or editor).
orbiter export
Export all published entries to JSON or Markdown files.
# JSON (default) orbiter export --pod ./content.pod --out ./export # Markdown with frontmatter orbiter export --pod ./content.pod --out ./export --format md # Single collection orbiter export --pod ./content.pod --out ./export --collection posts
Output: ./export/{collection}/{slug}.json or .md
orbiter unpack
Extract media BLOBs from the pod to regular files. Run before git commit for platforms with ephemeral filesystems.
orbiter unpack --pod ./content.pod --media-dir ./media
After unpacking, BLOBs are removed from _media.data and a storage.mode=git flag is set in _meta. See Git sync mode.
orbiter pack
Restore media BLOBs from files back into the pod. Run at build time before astro build.
orbiter pack --pod ./content.pod --media-dir ./media
All options
| Command | Flag | Description |
|---|---|---|
init | [dir] | Target directory (default: current) |
add-user | --pod | Path to the pod file |
add-user | --username | Skip interactive prompt |
add-user | --role | admin or editor |
export | --pod | Path to the pod file |
export | --out | Output directory |
export | --format | json (default) or md |
export | --collection | Single collection to export |
unpack | --pod | Path to the pod file |
unpack | --media-dir | Output directory for media files (default: ./media) |
pack | --pod | Path to the pod file |
pack | --media-dir | Directory containing media files (default: ./media) |