@edge-base/cli
v0.2.6
Published
CLI for EdgeBase — create, develop, and deploy EdgeBase projects
Readme
@edge-base/cli is the command surface for the full EdgeBase project lifecycle.
Use it to:
- bootstrap a new project
- run local development with hot reload
- deploy and destroy project-scoped Cloudflare resources
- generate types, migrations, backups, and exports
- manage secrets, keys, plugins, and admin operations
Beta: the CLI is already usable, but some commands and flags may still evolve before general availability.
Documentation Map
- Quickstart
Start a new EdgeBase project with
npm create edgebase@latest - CLI Overview Understand what the CLI owns across local development, deploy, data workflows, and tooling
- CLI Workflows Task-focused guides for common flows
- CLI Reference Full command inventory, aliases, and environment variables
For AI Coding Assistants
This package ships with an llms.txt file for AI-assisted CLI usage.
For the canonical runtime-routing rules across the whole platform, start with Use EdgeBase With AI and then read this package's llms.txt for CLI-specific command behavior.
You can find it:
- after install:
node_modules/@edge-base/cli/llms.txt - in the repository: llms.txt
Use it when you want an agent to:
- pick the right command for a workflow
- avoid guessing package-manager entrypoints
- prefer
--json --non-interactivein automation - stay inside the supported EdgeBase project structure
Installation
For new projects, the best starting point is:
npm create edgebase@latest my-appThat scaffold installs the local CLI into the generated project for you.
If you want the CLI globally:
npm install -g @edge-base/cliAfter that, you can run:
edgebase --helpQuick Start
Start a new project
npm create edgebase@latest my-app
cd my-app
npm run devInside an EdgeBase project, the local CLI is available through:
npx edgebase devDeploy to Cloudflare
cp .env.release.example .env.release
npx edgebase deployGenerate types
npx edgebase typegenWhat The CLI Covers
| Area | Commands | What it covers |
| --- | --- | --- |
| Project lifecycle | init, dev, deploy, destroy, logs, upgrade | Bootstrap, local runtime, deploy, cleanup, logging, and package upgrades |
| Data workflow | migration, migrate, seed, backup, export, typegen, neon | Schema changes, provider migrations, fixture data, backups, exports, generated types, Neon setup |
| Security and admin | secret, keys, admin | Secrets, Service Key/JWT rotation, and admin recovery flows |
| Plugins and tooling | plugins, create-plugin, docker, webhook-test, completion, describe, telemetry, realtime | Plugin scaffolding, plugin maintenance, Docker support, completions, machine-readable command descriptions, telemetry, and Cloudflare Realtime setup |
Recommended Usage Pattern
Most teams do not need a global install.
A good default flow is:
- scaffold with
npm create edgebase@latest - keep the CLI local to the generated project
- run commands with
npm run ...ornpx edgebase ...
If you are adding EdgeBase to an existing frontend repo, a clean default is to scaffold into a dedicated subdirectory:
cd your-frontend-project
npm create edgebase@latest edgebaseThat keeps the frontend app and the EdgeBase project close together without mixing them into the same root by accident.
Automation And CI
When another tool, agent, or CI job is driving the CLI, prefer:
edgebase --json --non-interactive <command>This makes the CLI return structured responses instead of hanging on prompts.
Useful companion commands:
edgebase --json describe
edgebase --json describe --command "deploy"
edgebase --json describe --command "backup restore"Read more: CLI Reference
Common Environment Variables
| Variable | Used by |
| --- | --- |
| EDGEBASE_URL | Remote commands such as migrate, backup, export, admin, plugins cleanup, and destroy |
| EDGEBASE_SERVICE_KEY | Remote admin commands and Service Key authenticated flows |
| CLOUDFLARE_API_TOKEN | Non-interactive deploy/destroy flows |
| CLOUDFLARE_ACCOUNT_ID | Account-scoped Cloudflare operations |
| NEON_API_KEY | edgebase neon setup in non-interactive environments |
Related Packages
create-edgebaseFirst-run project bootstrap package@edge-base/webBrowser SDK for app code@edge-base/adminTrusted server-side SDK for admin tasks
License
MIT
