Quick Start
This guide gets you from zero to a published version in five minutes, assuming you already have a developer token (dev_...). If you don't have one yet, see Don't have a token yet? at the bottom.
1. Install the CLI
npm install -g packdog2. Log in
packdog login dev_<your-token>
packdog whoamiToken is stored at ~/.config/packdog/config.json and works from any directory.
3. Find your package and initialise it
packdog list
# → shooter-game be027d3c-747d-4080-a854-d9f12aa32a2f
# → quiz-pack 9f3a1b2c-...
# In the directory of the package you'll work on:
packdog init --id=be027d3c-747d-4080-a854-d9f12aa32a2fThis writes a packdog.json with the package id. The CLI reads this file from the current directory on every command.
4. Build and upload
Build your package to dist/ with whatever toolchain you use (Vite, esbuild, Rollup, plain tsc — Packdog doesn't care). The only requirement is that dist/ contains an index.js entry point.
npm run build # produces dist/index.js (project-specific)
packdog upload # uploads dist/ as a new version, auto-publishes to stageOutput:
Uploaded: abc-123-def
Files: 3, Size: 45.2 KB
Published to stage: abc-123-def5. Test and promote
Test the version on the stage channel. When you're ready, promote to stable:
packdog publish # latest version → stableIf something goes wrong:
packdog rollback --channel=stableThat's the loop. upload → test on stage → publish to stable → rollback if needed.
Loading a package in the browser
The customer-side load uses your customer API key (blk_...):
const { index, baseUri } = await fetch(
'https://api.packdog.dev/v1/packages/PACKAGE_ID/channels/stable',
{ headers: { 'Authorization': 'Bearer blk_yourkey' } }
).then(r => r.json());
const mod = await import(index);
mod.mount(document.getElementById('root'), { baseUri });index is the URL to load. baseUri is what the loaded module uses internally to fetch its own assets. The customer key lives in browser JS by design — it's scoped to read-only loads of packages you've been granted access to.
Don't have a token yet?
Packdog is currently invitation-only. You need:
- A customer API key (
blk_...) to load packages from the browser. - A developer token (
dev_...) to upload and publish from the CLI.
Both are issued by the Packdog operator out-of-band. Email post@jetbit.no and we'll set up your customer account, grant access to the packages you need, and create developer tokens for anyone who'll be uploading.
Next steps
- API reference for the full surface
- CLI reference for every command and flag
- Examples for real-world workflows
- Architecture if you want to understand how it works under the hood