Skip to main content
Starting a new EdgeSpark project from a template is a single command. The shape is:
Filled in with a real project directory name, the claude agent identifier, and the official bounty-tasks template it becomes:
Three things to substitute:
  • <project-name> — the directory to create the project in. Must start with a letter or number, and contain only letters, numbers, hyphens, and underscores.
  • <agent> — your own agent identifier: claude for Claude Code, codex for OpenAI Codex, gemini for Gemini CLI, cursor for Cursor, copilot for GitHub Copilot, or any other short agent name. This determines which instructions file the CLI writes — CLAUDE.md for claude, GEMINI.md for gemini, AGENTS.md for every other value.
  • <template> — any supported source: an official shorthand like fullstack or bounty-tasks, a github:owner/repo reference, a tarball URL, an SSH URL, or a local path.
Under the hood the CLI fetches the template, strips anything environment-specific, creates a new platform project, pulls the project’s schema, generated types, and default email/password auth config, inspects server/src/defs/runtime.ts for required vars and secrets, and prints a short next-steps list tailored to that template. Running edgespark init <project-name> --agent <agent> without --template is unchanged — you still get the built-in greenfield scaffold.

Prompt your agent for the full flow

EdgeSpark’s CLI is agent-native, and the whole flow — install, login, init --template, vars, secrets, apply, deploy — is designed to run end to end in one agent session. The only two places the agent pauses for you are edgespark login (browser OAuth) and edgespark secret set (secure browser URL for secret values). Paste this prompt into Claude Code, OpenAI Codex, Gemini CLI, Cursor, GitHub Copilot, or any other AI coding agent. The agent fills in the agent name itself — you only need to pick a project name and a template:
Before pasting, change my-app to your project directory name and bounty-tasks to another template source if you want — another official shorthand like fullstack, a GitHub reference like github:acme/starter, a tarball URL, an SSH URL, or a local directory path. If the template has no required vars or secrets, step 5 collapses — no var set or secret set commands are emitted, and the agent goes straight from install to the remaining apply commands and deploy.

What the command does

Every template run executes the same six steps:
  1. Fetch the template source (via giget, a raw tarball fetch, SSH git clone, or a local directory copy).
  2. Sanitize the copy — strip version control, build artifacts, and .env* files; reject symlinked trees (see What gets sanitized).
  3. Rename any agent instructions file the template ships (CLAUDE.md, GEMINI.md, AGENTS.md) to match your --agent choice.
  4. Validate edgespark.toml, create a new platform project, and write the fresh project_id into the toml.
  5. Pull schema, generated types, and the default configs/auth-config.yaml for the new project.
  6. Read server/src/defs/runtime.ts and emit a conditional “Next steps” list with exactly the var set, secret set, db migrate, storage apply, auth apply, and deploy commands that have work to do for this template.
The command always exits promptly. The agent orchestrates the emitted commands in separate bash calls — init does not run them inline and never invokes deploy for you.

Supported template sources

Pass the source to -t (or --template). The first pattern that matches wins: Official shorthands resolve to github:edgesparkhq/official-templates/<name>. The catalog is a single repo with one subdirectory per template — see edgesparkhq/official-templates for what is currently shipped (today: fullstack and bounty-tasks). Community templates are any git repo — point -t at the URL. Full examples:

What gets sanitized

After fetching, the CLI cleans the directory before doing anything else: Removed:
  • .git/ — template author’s history
  • node_modules/, dist/, build/, *.tsbuildinfo — build artifacts
  • .env, .env.local, .env.*.local, .env.<anything> — the template author’s machine-specific values
Kept:
  • pnpm-lock.yaml, package-lock.json, yarn.lock — preserves the template author’s tested dependency tree
  • .env.example, .env.sample, .env.template — example files the template ships on purpose
Mutated:
  • Any committed edgespark.toml has its project_id = "…" line replaced with the fresh ID returned by the platform.
  • Any agent instructions file shipped by the template (CLAUDE.md / GEMINI.md / AGENTS.md) is renamed to match --agent — pick --agent claude and a GEMINI.md becomes CLAUDE.md.
Rejected: templates containing symlinked trees fail with an error before any project is created on the platform.

Private template credentials

Credential handling differs by fetch path: GitHub paths (official shorthand, github:owner/repo, https://github.com/owner/repo, GitHub-hosted tarball URLs) read a token in this priority order. The first non-empty value wins:
  1. GIGET_AUTH
  2. GITHUB_TOKEN
  3. GH_TOKEN
  4. gh auth token output (only if the gh binary is on PATH and logged in)
Other HTTP paths (non-GitHub gitlab:, bitbucket:, self-hosted giget sources, non-GitHub tarball URLs) read only GIGET_AUTH. The CLI does not fall back to GITHUB_TOKEN / GH_TOKEN / gh auth token for non-GitHub hosts so a GitHub-scoped token never leaks to an unrelated provider. If no applicable token is set, fetch proceeds unauthenticated — fine for public repos. SSH paths (git@host:…, ssh://…) shell out to git clone --depth 1. Your existing SSH configuration (~/.ssh/config, ssh-agent, keys) is used transparently. No token plumbing, no credentials flow through the CLI. This path requires the git binary on PATH. Private repos on GitHub return 404 for both “does not exist” and “no access”. If fetch fails with no credential configured, the CLI prints an actionable hint suggesting gh auth login, a GITHUB_TOKEN export, or an SSH URL.

The next-steps list

After scaffolding, init conditionally emits commands you still need to run. An entry only appears if it has work to do for this specific template: <pm> is auto-detected from the template (npm / pnpm / yarn / bun). Each var set and secret set line is emitted per key with hint text the agent should follow — var set carries “request <K> from your user, then run this command”, and secret set carries “run this yourself and share only the returned URL with your user”. Example output for a template with two vars, one secret, migrations, and no storage (server/ + web/ layout, pnpm detected):
edgespark secret set opens a secure EdgeSpark browser URL for the human owner to paste the secret value. Secret values never pass through terminal output, agent context, or third-party LLM APIs such as Anthropic, Google, or OpenAI.
deploy is never run automatically — it remains a deliberate step. If any of the emitted apply commands fails, the scaffold is preserved on disk so retrying the exact command works.

Template layout expectations

Templates must follow the standard EdgeSpark project layout so init can find the files it reads:
  • edgespark.toml at the repo root — the project_id line is stripped and rewritten. [server] and [web] path entries are kept.
  • server/src/defs/runtime.ts — the source of truth for required VarKey and SecretKey values.
  • server/src/defs/storage_schema.ts — optional; when present, its bucket declarations drive storage apply emission.
  • drizzle/ — optional; when present with .sql files, drives db migrate emission.
  • configs/auth-config.yaml — optional. The committed yaml is kept only as a fallback if the platform’s default-auth pull fails; otherwise it is overwritten with email/password defaults.
Templates may also ship a server/dev/seed.ts for local development. See develop locally for how seed data is used.

Troubleshooting

For platform-wide naming and quota limits, see platform limits.

See also

Development workflow

The day-to-day loop for schema, storage, vars, secrets, and deploys after init.

Project structure

What server/, web/, configs/, and server/src/defs/ look like in every EdgeSpark project.
Last modified on April 30, 2026