@blinkdotnew/cli
v0.7.6
Published
Blink CLI — full-stack cloud infrastructure from your terminal. Deploy, database, auth, storage, backend, domains, and more.
Readme
Blink CLI
The command-line interface for Blink — full-stack cloud infrastructure from your terminal.
Create projects, deploy frontends, manage databases, configure auth, set up custom domains, and more. Designed for developers and AI coding agents alike.
npx @blinkdotnew/cli --helpInstall
npm install -g @blinkdotnew/cliRequires Node.js 22+.
Quick Start
# Authenticate
blink login --interactive
# Create and link a project
blink init --name "my-app"
# Deploy
npm run build && blink deploy ./dist --prod
# Done — your app is liveWhat You Can Do
| Command | Description |
|---------|-------------|
| blink init | Create a new project and link it to the current directory |
| blink deploy ./dist --prod | Deploy your built app to production |
| blink db query "SELECT * FROM users" | Run SQL against your project's database |
| blink env set STRIPE_KEY sk_live_xxx | Set environment variables (secrets) |
| blink backend deploy | Deploy a Hono backend to Cloudflare Workers |
| blink auth-config set --provider google --enabled true | Configure authentication providers |
| blink domains add myapp.com | Connect a custom domain |
| blink hosting activate | Activate production hosting |
| blink storage upload ./photo.jpg | Upload files to project storage |
| blink ai image "a logo for my app" | Generate images, text, video, speech |
Full Command Reference
Project Management
blink init # Create project + link to current dir
blink init --name "My App" # Create with custom name
blink link # Link existing project (interactive picker)
blink link proj_xxx # Link to specific project
blink project list # List all projects
blink project create "My App" # Create without linking
blink project delete proj_xxx --yes # Delete a project
blink status # Show current context (project + auth)Deploy
blink deploy ./dist --prod # Deploy to production
blink deploy ./dist # Preview deployment
blink deployments # List past deployments
blink rollback # Rollback to previous versionDatabase
Each project gets its own SQLite database powered by libSQL.
blink db query "SELECT * FROM users LIMIT 10"
blink db exec schema.sql # Run a SQL file
blink db list # Show all tables
blink db list users # Show rows in a tableEnvironment Variables
blink env list # List all env vars
blink env set DATABASE_URL postgres://...
blink env delete OLD_KEY
blink env push .env # Bulk import from .env file
blink env pull > .env.local # Export to fileBackend (Cloudflare Workers)
Deploy a Hono server to Cloudflare Workers for Platforms — each project gets its own isolated V8 worker.
blink backend deploy # Deploy backend/ folder
blink backend deploy ./server # Deploy from custom directory
blink backend status # Check deployment status
blink backend logs # View request logs
blink backend delete --yes # Remove backendAuth Configuration
blink auth-config get # Show current auth config
blink auth-config set --provider google --enabled true
blink auth-config set --mode managed
blink auth-config byoc-set --provider google --client-id X --client-secret Y
blink auth-config byoc-remove --provider googleCustom Domains
blink domains list # List project domains
blink domains add myapp.com # Add a custom domain
blink domains verify <domain_id> # Verify DNS configuration
blink domains remove <domain_id> --yes # Remove a domain
blink domains search "myapp" # Search available domains
blink domains purchase myapp.com --yes # Purchase a domain
blink domains connect myapp.com # Connect purchased domain to project
blink domains my # List your purchased domainsHosting
blink hosting status # Check hosting state + URLs
blink hosting activate # Activate production hosting
blink hosting deactivate --yes # Deactivate hosting
blink hosting reactivate # Reactivate after deactivationStorage
blink storage upload ./photo.jpg
blink storage list
blink storage url images/photo.jpg # Get CDN URL
blink storage download images/photo.jpg ./local.jpg
blink storage delete images/old.jpgAI
blink ai text "Summarize this: ..."
blink ai image "a futuristic city at sunset"
blink ai video "ocean waves" --duration 10s
blink ai speech "Hello world" --voice nova --output hello.mp3
blink ai transcribe ./meeting.mp3Security & CORS
blink security get # Show per-module auth policy
blink security set --module db --require-auth true
blink cors get # Show allowed origins
blink cors set --origins https://example.com https://app.example.comWorkspace Management
blink workspace list # List workspaces
blink workspace create "My Team" # Create a workspace
blink workspace switch wsp_xxx # Switch active workspace
blink workspace members wsp_xxx # List members
blink workspace invite [email protected] wsp_xxx --role adminVersions
blink versions list # List saved snapshots
blink versions save --message "v1.0" # Save a snapshot
blink versions restore ver_xxx --yes # Restore to a snapshotBilling
blink credits # Check credit usage
blink usage # Usage breakdown
blink usage --period month # Monthly summaryAuthentication
Get your workspace API key from blink.new/settings?tab=api-keys (starts with blnk_ak_).
# Opens the API keys page in your browser, then prompts for the key
blink login
blink login --interactive
# Or set the env var directly (CI/agents)
export BLINK_API_KEY=blnk_ak_...Auth is resolved in this order:
--tokenflag — per-command overrideBLINK_API_KEYenv var — for CI/CD and coding agents- Config file — saved by
blink login --interactiveat~/.config/blink/config.toml
Project Context
Commands that operate on a project resolve it in this order:
- Positional argument —
blink db query proj_xxx "SELECT 1" BLINK_ACTIVE_PROJECTenv var —eval $(blink use proj_xxx --export).blink/project.json— created byblink linkorblink init
Machine-Readable Output
Every command supports --json for scripting and AI agent integration:
blink deploy ./dist --prod --json | jq '.url'
blink db query "SELECT email FROM users" --json | jq '.[].email'
blink env list --json | jq '.[].key'For Coding Agents
The Blink CLI is designed to work seamlessly with AI coding agents like Cursor, Claude Code, and Codex:
- Non-interactive by default — all inputs are flags, no menus or prompts
--jsonmode — structured output for every command--yesflag — skip confirmations for automation- Actionable errors — every error message includes the exact command to fix it
- Layered help —
blink --helpfor overview,blink backend --helpfor a group,blink backend deploy --helpfor full details
Links
- Blink — Build full-stack apps with AI
- Documentation
- SDK
License
MIT
