@planreview/cli
v0.8.2
Published
Publish and update HTML plans on planreview.dev
Readme
@planreview/cli
Publish and update HTML plans on planreview.dev. Each upload gets a stable latest link plus an immutable permalink per version.
Requirements
Bun ≥ 1.3.9 is a runtime dependency. The CLI executes on Bun, not Node — installing with npm or pnpm works, but running planreview requires bun on your PATH.
Install
Run it directly:
bunx @planreview/cli upload ./plan.htmlOr install globally for the planreview command:
bun add -g @planreview/cliUsage
planreview login # authorize in a browser (PKCE)
planreview upload ./plan.html # publish, or update this file's existing plan
planreview upload ./plan.html --new # publish as a fresh plan
planreview upload ./plan.html --static # publish without running scripts
planreview upload ./plan.html --fonts all # embed all Google Fonts subsets
planreview whoami # check the saved credentials
planreview delete ./plan.html # move the mapped plan to trash (alias: trash)
planreview delete --plan PLAN_ID # move a plan to trash by ID
planreview logout # revoke the ticket and clear credentialsupload remembers which plan a file belongs to: the same path updates the same plan, --plan PLAN_ID targets one explicitly, and --new creates a fresh identity. Executable inline scripts and event handlers request interactive serving automatically; pass --static to publish without running them. Use --json on any command for machine-readable output.
delete moves a plan to trash; trash is an alias with identical behavior. Pass a mapped HTML path or use --plan PLAN_ID to target a plan explicitly. Shared links return 410 Gone immediately, but the local path mapping is retained and the plan can be restored from planreview.dev until its purge deadline. This command does not permanently delete plans.
Google Fonts stylesheet links and @import rules are embedded automatically at upload time. The default --fonts auto mode includes only font subsets needed by the document's rendered characters. Use --fonts all when an interactive plan generates text at runtime, or --fonts off to disable the transformation.
Outbound links must open in a new tab: the server accepts empty and fragment href values unchanged, but every other <a> or <area> needs exactly target="_blank"; explicit URL schemes are limited to http: and https:. Relative and protocol-relative links are allowed with that target. As a convenience, the CLI adds the target to every <a> or <area> link the server checks that omits it, including relative links. It never overwrites an explicit target, and the server revalidates the uploaded bytes authoritatively. Font embedding and link fixes happen in memory; the source HTML file is never changed.
login always prints the approval URL, so it also works from remote terminals (use --no-open to skip launching a browser).
Environment
| Variable | Purpose |
| -------------------- | --------------------------------------------------- |
| PLANREVIEW_TOKEN | Opaque token override; disk credentials are ignored |
| PLANREVIEW_API_URL | API base URL override |
| PLANREVIEW_HOME | State directory (default: ~/.planreview) |
State files are written atomically with owner-only permissions.
License
MIT
