delawb-cli
v0.1.5
Published
CLI for delawb - deploy gitlawb repos to IPFS in one command. Wallet auth via SIWE. Multi-agent support.
Maintainers
Readme
delawb
dl is the official CLI for delawb — deploy gitlawb repos to IPFS in one command.
Builds your project locally, pins the output to IPFS via Filebase, and serves it at a content-addressed URL. Your code never leaves your machine.
Install
Requires Node 18 or newer.
npm install -g delawb-cliPermission denied?
Global npm installs on Linux often need root. Pick one:
Option A — use sudo (quickest):
sudo npm install -g delawb-cliOption B — set a user-local npm prefix (no sudo, recommended):
mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
npm install -g delawb-cliOption C — run without installing globally:
npx delawb-cli deployQuick start
dl deployThat's it. First run walks you through:
- Wallet sign-in (browser, SIWE/EIP-4361)
- gitlawb account link (paste UCAN delegation)
- Repo picker (auto-clones if folder empty)
- Framework auto-detection
- Build + upload
Subsequent runs: just build + upload. Zero prompts.
Authentication
dl login— opens browser, signs SIWE message with your wallet, saves session.- Sessions auto-refresh (~30 days).
dl logout— clears local credentials.
Commands
| Command | Description |
|---|---|
| dl deploy | Do-everything deploy. Builds locally, uploads to IPFS, returns live URL. |
| dl init | Interactive project setup. Picks repo from your gitlawb account. --no-gitlawb skips picker. |
| dl rollback | Roll back to a previous deployment. Interactive picker. |
| dl link gitlawb | Link your gitlawb account from terminal (paste UCAN). Web flow at delawb.com/connect-gitlawb is the alternative. |
| dl env <ls\|add\|rm\|pull> | Manage env vars. Encrypted at rest. Project-wide (no per-environment scoping). |
| dl domains <ls\|add\|verify\|rm> | Manage custom domains. Auto SSL via Cloudflare for SaaS. |
| dl agent <create\|add\|revoke\|list> | Manage AI agent wallets linked to your account. |
| dl ls | List your projects. |
| dl whoami | Show current session info. |
| dl login / dl logout | Auth. |
AI agent flow
Give an AI agent its own wallet so it can deploy on your behalf — with audit trail and revoke.
# 1. Agent generates a wallet locally + authenticates
dl agent create my-bot
# prints the wallet address
# 2. You link it from your own terminal
dl agent add 0x<address> --alias my-bot
# 3. Run any command as the agent
DL_AGENT=my-bot dl deploy
# or
dl --agent my-bot deploy
# 4. Revoke any time
dl agent revoke 0x<address>The agent's private key is saved to ~/.delawb/agents/<alias>/credentials.json (mode 0600). It signs SIWE messages programmatically when its token expires — no human in the loop.
Supported frameworks
Auto-detected from package.json:
- Next.js —
output: 'export'mode only (static export). SSR is not supported. - Vite — works as-is.
- Astro — works as-is.
- SvelteKit —
@sveltejs/adapter-staticonly. Default Node adapter is not supported. - Nuxt — uses
nuxt generate(static). - Static — any
index.html-based site.
If your config will produce a server-needing build, the CLI warns before deploy.
.delawb.json schema
{
"projectId": "uuid from the dashboard",
"name": "my-app",
"framework": "Next.js | Vite | Astro | SvelteKit | Nuxt | Static | Custom",
"branch": "main",
"buildCmd": "npm run build",
"outputDir": "dist",
"gitlawb_did": "did:key:z6Mk...",
"gitlawb_repo": "my-app"
}dl init writes this automatically. You rarely need to edit by hand.
Environment variables
| Name | Default | Meaning |
|---|---|---|
| DELAWB_API_URL | https://gtqcxprrqtztgkvgmjlv.supabase.co | Backend base URL. Override for self-hosted. |
| DELAWB_FRONTEND_URL | https://delawb.com | Frontend URL for dl login browser redirect. |
| GITLAWB_NODE_URL | https://node.gitlawb.com | gitlawb node base URL. Override for self-hosted. |
| DL_AGENT | (unset) | Run command as this agent alias instead of the human owner. |
Privacy
- Your code never reaches our servers. Builds run on your machine.
- Env vars are encrypted at rest with AES-256-GCM.
- Only the build artifact (the static bundle) is uploaded to IPFS.
License
MIT
