Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions flash/cli/init.mdx
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Line 41)

Added --no-rules flag and AI coding agent files section based on PR #341. The flash init command now generates agent context files by default, with opt-out via --no-rules or per-file <!-- FLASH:DISABLE --> markers.

Source: runpod/flash#341

Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ The command creates the following project structure:
<Tree.File name="pyproject.toml" />
<Tree.File name="requirements.txt" />
<Tree.File name="README.md" />
<Tree.File name="AGENTS.md" />
<Tree.File name="CLAUDE.md" />
</Tree.Folder>
</Tree>

Expand All @@ -62,6 +64,40 @@ The command creates the following project structure:
- **cpu_worker.py**: CPU queue-based endpoint. Contains an `@Endpoint` function that runs on CPU-only instances. Provides `/run` or `/runsync` routes 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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected the AI agent files section based on the final merged state of PR #341. The merged PR creates only AGENTS.md and CLAUDE.md (symlink) — the original suggestion documented features (.cursorrules, .github/copilot-instructions.md, .flash/context.md, flash rules command, --no-rules flag, marker system) that were removed before merge.

Source: runpod/flash#341

| 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 |

Flash writes these files only when they don't already exist. If you have your own `AGENTS.md` or `CLAUDE.md`, Flash leaves them alone.

<Tip>

**Tools using other conventions:** GitHub Copilot reads `.github/copilot-instructions.md` and Cursor (legacy) reads `.cursorrules`. If you use those, symlink or copy `AGENTS.md`:

```bash
ln -s ../AGENTS.md .github/copilot-instructions.md
ln -s AGENTS.md .cursorrules
```

</Tip>

### Add agent files to existing projects

If you've already run `flash init`, add the agent files with:

```bash
python -c "from runpod_flash.rules import install_agent_files; from pathlib import Path; install_agent_files(Path.cwd())"
```

### Opt out

Delete `AGENTS.md`. Flash won't re-create it.

## Next steps

After initialization:
Expand Down
10 changes: 3 additions & 7 deletions flash/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,11 @@ source .venv/bin/activate
uv pip install runpod-flash
```

### Optional: Install coding agent integration
<Tip>

If you're using an AI coding agent like Claude Code, Cline, or Cursor, you can install the Flash skill package to give your agent detailed context about the Flash SDK:
When you create a project with `flash init`, Flash generates `AGENTS.md` (and `CLAUDE.md` as a symlink) with CLI-first rules for AI coding assistants. These files tell AI tools like Claude Code, Cursor, and Codex to use Flash commands instead of raw Runpod API calls. See [`flash init`](/flash/cli/init) for details.

```bash
npx skills add runpod/skills
```

This enables your coding agent to provide more accurate Flash code suggestions and troubleshooting help.
</Tip>

## Step 2: Authenticate with Runpod

Expand Down
Loading