claude agent identifier, and the official bounty-tasks template it becomes:
<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:claudefor Claude Code,codexfor OpenAI Codex,geminifor Gemini CLI,cursorfor Cursor,copilotfor GitHub Copilot, or any other short agent name. This determines which instructions file the CLI writes —CLAUDE.mdforclaude,GEMINI.mdforgemini,AGENTS.mdfor every other value.<template>— any supported source: an official shorthand likefullstackorbounty-tasks, agithub:owner/reporeference, a tarball URL, an SSH URL, or a local path.
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:
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:- Fetch the template source (via
giget, a raw tarball fetch, SSHgit clone, or a local directory copy). - Sanitize the copy — strip version control, build artifacts, and
.env*files; reject symlinked trees (see What gets sanitized). - Rename any agent instructions file the template ships (
CLAUDE.md,GEMINI.md,AGENTS.md) to match your--agentchoice. - Validate
edgespark.toml, create a new platform project, and write the freshproject_idinto the toml. - Pull schema, generated types, and the default
configs/auth-config.yamlfor the new project. - Read
server/src/defs/runtime.tsand emit a conditional “Next steps” list with exactly thevar set,secret set,db migrate,storage apply,auth apply, anddeploycommands that have work to do for this template.
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 historynode_modules/,dist/,build/,*.tsbuildinfo— build artifacts.env,.env.local,.env.*.local,.env.<anything>— the template author’s machine-specific values
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
- Any committed
edgespark.tomlhas itsproject_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 claudeand aGEMINI.mdbecomesCLAUDE.md.
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:
GIGET_AUTHGITHUB_TOKENGH_TOKENgh auth tokenoutput (only if theghbinary is onPATHand logged in)
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):
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 soinit can find the files it reads:
edgespark.tomlat the repo root — theproject_idline is stripped and rewritten.[server]and[web]path entries are kept.server/src/defs/runtime.ts— the source of truth for requiredVarKeyandSecretKeyvalues.server/src/defs/storage_schema.ts— optional; when present, its bucket declarations drivestorage applyemission.drizzle/— optional; when present with.sqlfiles, drivesdb migrateemission.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.
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.