Example
Create a new project directory:Arguments
Name of the project directory to create. Use
. to initialize in the current directory.Flags
--force, -f
Overwrite existing files if they already exist in the target directory.
What it creates
The command creates the following project structure:PROJECT_NAME
lb_worker.py
gpu_worker.py
cpu_worker.py
.env.example
.gitignore
pyproject.toml
requirements.txt
README.md
AGENTS.md
CLAUDE.md
Template contents
- lb_worker.py: load-balanced endpoint with HTTP routes. Contains
@Endpointfunctions with custom HTTP methods and paths (e.g.,POST /process,GET /health). Multiple routes can share the same endpoint. - gpu_worker.py: GPU queue-based endpoint. Contains an
@Endpointfunction that runs on GPU hardware. Provides/runor/runsyncroutes for job submission. Creates one Serverless endpoint when deployed. - cpu_worker.py: CPU queue-based endpoint. Contains an
@Endpointfunction that runs on CPU-only instances. Provides/runor/runsyncroutes for job submission. Creates one Serverless endpoint when deployed. - .env: Template for environment variables including
RUNPOD_API_KEY.
AI coding agent files
Flash generates context files that help AI coding assistants (Claude Code, Cursor, GitHub Copilot, Codex, Aider, and others) use Flash correctly. These files tell agents to use Flash CLI commands instead of raw Runpod API calls.| File | Purpose |
|---|---|
AGENTS.md | CLI-first rules for AI coding tools (Cursor, Codex, Aider, Amp, Jules, and others) |
CLAUDE.md | Symlink to AGENTS.md so Claude Code picks up the same rules |
AGENTS.md or CLAUDE.md, Flash leaves them alone.
Add agent files to existing projects
If you’ve already runflash init, add the agent files with:
Opt out
DeleteAGENTS.md. Flash won’t re-create it.
Next steps
After initialization:- Copy
.env.exampleto.env(if needed) and add yourRUNPOD_API_KEY. - Install dependencies:
pip install -r requirements.txt - Start the development server:
flash dev - Open http://localhost:8888/docs to explore the API.
- Customize the workers for your use case.
- Deploy with
flash deploywhen ready.
This command only creates local files. It doesn’t interact with Runpod or create any cloud resources. Cloud resources are created when you run
flash dev or flash deploy.Related commands
flash dev- Start the development serverflash deploy- Build and deploy to Runpod