JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 36
  • Score
    100M100P100Q64307F
  • License MIT

CLI for EdgeBase — create, develop, and deploy EdgeBase projects

Package Exports

  • @edge-base/cli
  • @edge-base/cli/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@edge-base/cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@edge-base/cli

Command-line workflow for EdgeBase
Scaffold projects, run local development, deploy to Cloudflare, and operate your EdgeBase stack from one CLI

npm  Docs  MIT License

Quickstart · CLI Overview · CLI Workflows · CLI Reference


@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.

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-interactive in automation
  • stay inside the supported EdgeBase project structure

Installation

For new projects, the best starting point is:

npm create edgebase@latest my-app

That scaffold installs the local CLI into the generated project for you.

If you want the CLI globally:

npm install -g @edge-base/cli

After that, you can run:

edgebase --help

Quick Start

Start a new project

npm create edgebase@latest my-app
cd my-app
npm run dev

Inside an EdgeBase project, the local CLI is available through:

npx edgebase dev

Deploy to Cloudflare

cp .env.release.example .env.release
npx edgebase deploy

Generate types

npx edgebase typegen

What 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

Most teams do not need a global install.

A good default flow is:

  1. scaffold with npm create edgebase@latest
  2. keep the CLI local to the generated project
  3. run commands with npm run ... or npx 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 edgebase

That 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

License

MIT