Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.edgespark.dev/llms.txt

Use this file to discover all available pages before exploring further.

This EdgeSpark quickstart shows you how to install the CLI, create a full-stack app, and deploy it to Cloudflare’s edge. It is the fastest path if you want to evaluate EdgeSpark for Hono, D1, auth, R2, and AI coding agent workflows.
1

Install the CLI

npm install -g @edgespark/cli
Verify the installation:
edgespark --version
2

Log in

edgespark login
EdgeSpark always prints a login URL. In a normal interactive terminal, the CLI usually opens that URL in your browser automatically and waits for you to finish sign-in.If an AI coding agent or another non-TTY session runs edgespark login, the CLI prints the URL for you to open manually in your browser. After you approve the login, the next EdgeSpark CLI command completes the login and stores your credentials in ~/.edgespark/credentials.json.
3

Create a project

edgespark init my-app --agent codex
This creates a my-app/ directory and:
  • Creates the project on the platform
  • Scaffolds the current fullstack project layout
  • Pulls generated platform files such as SDK types and system schema
Files in server/src/__generated__/ are auto-generated. Do not edit them manually.
--agent is required. Use --agent claude for Claude Code, --agent gemini for Gemini CLI, --agent codex for OpenAI Codex, and the real agent name for every other AGENTS.md-based tool, such as copilot, cursor, opencode, amp, devin, aider, windsurf, cline, continue, antigravity, kiro, or your own custom agent name. See supported agents.
4

Install dependencies

EdgeSpark does not use a root workspace for the scaffold. Install dependencies in server/ and web/ separately:
cd my-app/server && npm install
cd ../web && npm install
5

Write your first route

Open server/src/index.ts. The scaffold exports a static Hono app and lets you import the runtime SDK where you need it:
server/src/index.ts
import { Hono } from "hono";
import { auth } from "edgespark/http";

const app = new Hono()
  .get("/api/public/hello", (c) => {
    return c.json({ message: "Hello from EdgeSpark" });
  })
  .get("/api/hello", (c) => {
    return c.json({
      message: `Hello ${auth.user.email}`,
    });
  });

export default app;
6

Deploy your project

edgespark deploy
EdgeSpark builds your project and deploys it. You’ll see your project URL in the output:
✓ Built
✓ Uploaded bundle
✓ Deployed

https://my-app.edgespark.app
New projects currently start with one default production environment. Deploys update that environment directly.Test your protected route. A 401 response means auth is being enforced correctly:
curl -i https://my-app.edgespark.app/api/hello
# HTTP/2 401
Staging environments are coming soon. Today, a newly created project starts with one default production environment and edgespark deploy updates that live environment directly.

What’s next

Development workflow

Learn the full repo-based loop for schema, storage, auth config, vars, secrets, and deploys.

How EdgeSpark works

Understand the platform before building more complex features.

Add a database table

Define schema in server/src/defs/ and migrate your D1 database with Drizzle.

Add file uploads

Declare buckets in server/src/defs/storage_schema.ts and sync them with the CLI.

Use secrets

Store API keys and access them from your routes.
Last modified on April 9, 2026