@beem-slide/cli
v1.2.1
Published
Scaffold beem-slide workspaces and move decks to the beem cloud (login, push, pull, publish).
Maintainers
Readme
@beem-slide/cli
Scaffold a workspace for beem-slide — a React slide framework whose authoring guides, publishing and hosting live in the beem cloud.
Usage
npx --package=@beem-slide/cli beem init my-slide
cd my-slide
pnpm install
pnpm devThis creates a workspace containing:
slides/getting-started/— a starter slide you can edit or delete.package.json— depends on@beem-slide/core(an npm alias of the public@beem-slide/enginebuild), which provides the slide viewer, the dev server and thebeem-slideCLI.beem-slide.config.ts— optional typed config (slidesDir, port).CLAUDE.md— agent guide for authoring slides.
You won't see any Vite, React, or tsconfig files in the workspace. They live inside @beem-slide/core and you never touch them.
Commands
| Command | Description |
| --- | --- |
| beem-slide init [dir] | Scaffold a new workspace in dir (defaults to current dir). |
| beem-slide init --force | Scaffold into a non-empty directory. |
| beem-slide init --name <name> | Override the generated package.json name. |
(Once installed in the workspace, @beem-slide/core provides beem-slide dev, beem-slide build, and beem-slide preview via its own bin.)
Cloud commands (beem)
The package ships a second bin, beem, for hosting decks in the beem cloud. Run it as npx --package=@beem-slide/cli beem <cmd> (or just beem <cmd> once installed).
No Node on the machine? curl -fsSL https://beem-ai.dev/install | sh (Windows: irm https://beem-ai.dev/install.ps1 | iex) installs a managed Node plus beem under ~/.beem without touching the system environment.
| Command | Description |
| --- | --- |
| beem login / logout / whoami | Device-code sign-in in a browser; credentials land in ~/.config/beem/credentials.json (0600). |
| beem push [dir] | Upload a deck directory to your cloud workspace. |
| beem pull <deckId> [dir] | Download a deck from the cloud. |
| beem publish [dir] / unpublish [dir] | Put the deck at its public link / take it offline. |
| beem doctor | Check node, package managers, network, agent clients and sign-in state; every ✗ prints the fix. |
| beem mcp install | Register the beem MCP server with agent clients on this machine (Claude Code, Claude Desktop, Codex, Cursor, Windsurf, Gemini CLI). |
| beem mcp config --json | Print the mcpServers snippet for any other MCP client. |
push maps the directory to its cloud deck in .beem/cloud.json — commit that file; it carries no machine paths or secrets.
Headless & CI
Every cloud command works without a terminal session:
- Auth: set
BEEM_TOKEN(it outranks the credentials file). Get a token by runningbeem loginon any machine and copyingtokenfrom the credentials file, then store it as a CI secret. Revoke tokens any time in the studio's account panel. --json:whoami,doctor,push,pull,publish,unpublish,logoutandmcp statusprint exactly one JSON object on stdout. On failure stdout stays empty and stderr gets{"error":{"code","message","hint"}}. (loginstays interactive by design — CI is whatBEEM_TOKENis for.)- Exit codes (stable, safe to branch on):
0success ·1error ·2not signed in ·3paid capability required ·4cloud copy moved (pull orpush --force) ·5publish build failed.
Publish on merge (GitHub Actions)
Keep the deck in git; every merge to main pushes it to the cloud and republishes the public link:
name: Publish slides
on:
push:
branches: [main]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- name: Push and publish
env:
BEEM_TOKEN: ${{ secrets.BEEM_TOKEN }}
run: |
npx --yes --package=@beem-slide/cli beem push slides/my-deck --force --json
npx --yes --package=@beem-slide/cli beem publish slides/my-deck --jsonTwo things make this loop stable:
- Run
beem pushonce from your machine first and commit.beem/cloud.json— that file is how CI updates the same deck instead of creating a new one per run. --forcemakes git the source of truth: pushes overwrite edits made in the studio (the overwritten version stays recoverable in the deck's history). Drop--forceto instead fail the job with exit code4whenever the cloud copy has diverged.
Authoring
Inside the scaffolded workspace, slides live under slides/<kebab-case-id>/index.tsx and default-export an array of Page components. Each page renders into a fixed 1920×1080 canvas; the framework handles scaling.
Register the MCP server (beem mcp install) and sign in (beem login): the authoring_guide tool then gives any agent the beem authoring knowledge base, and "make slides about X" builds to the quality bar.
