Starting a new EdgeSpark project from a template is a single command. The shape is: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.
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:
| Source type | Example |
|---|---|
| Official shorthand | -t fullstack, -t bounty-tasks, -t bounty-tasks#main |
| GitHub repo (giget syntax) | -t github:acme/starter, -t github:acme/starter/subdir, -t github:acme/starter#v1.0.0 |
| Full HTTPS URL | -t https://github.com/acme/starter |
| Raw tarball URL | -t https://example.com/template.tar.gz |
| SSH URL | -t git@github.com:acme/starter.git |
| Local directory | -t ./my-template, -t /abs/path/to/template, -t ~/templates/app |
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:
| Entry | Emitted when |
|---|---|
cd <project-name>/server && <pm> install | server/package.json exists in the template (always for standard templates) |
cd <project-name>/web && <pm> install | web/package.json exists in the template (frontend templates) |
edgespark var set <K>=<ask your user> | one line per key in the VarKey union in runtime.ts |
edgespark secret set <K> | one line per key in the SecretKey union in runtime.ts |
edgespark db migrate | drizzle/ directory exists and contains .sql files |
edgespark storage apply | server/src/defs/storage_schema.ts exists and declares at least one bucket |
edgespark auth apply | configs/auth-config.yaml exists in the new project (true after the default auth-config pull succeeds; otherwise true if the template ships a fallback yaml) |
edgespark deploy | always (final entry) |
<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
| Symptom | Likely cause | Fix |
|---|---|---|
404 on a GitHub repo that exists | Repo is private and no token was picked up | Run gh auth login, or export GITHUB_TOKEN=<pat>, or switch to the SSH form (git@github.com:owner/repo.git). |
SSH clone fails with git: command not found | git binary not on PATH | Install git, or use an HTTPS / tarball source so the CLI does not shell out. |
| Auth config warning, email/password only | Default-auth pull failed; CLI fell back to the template’s committed configs/auth-config.yaml | Re-run edgespark auth pull on the new project, then edgespark auth apply. |
| Provider buttons missing after deploy | Template’s committed yaml enabled a provider but you have not set the secrets | Follow add social login to register an OAuth app and set the credentials. |
init exits without emitting db migrate | Template has no drizzle/ directory with .sql files | Generate migrations in your new project with edgespark db generate and run edgespark db migrate. |
Template contains a symlink: … | The template fetched (or local source) has a symlinked file or directory | Fix the template tree to be standalone, or copy it to a flat directory and pass that path with -t. |
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.