Add Claude Code & Cursor IDE context files with one-command install#183
Open
kamran-rapidfireAI wants to merge 3 commits intomainfrom
Open
Add Claude Code & Cursor IDE context files with one-command install#183kamran-rapidfireAI wants to merge 3 commits intomainfrom
kamran-rapidfireAI wants to merge 3 commits intomainfrom
Conversation
…ntext Co-authored-by: Cursor <cursoragent@cursor.com>
…ignore and README Co-authored-by: Cursor <cursoragent@cursor.com>
…s, signatures Co-authored-by: Cursor <cursoragent@cursor.com>
david-rfai
reviewed
Feb 22, 2026
Collaborator
david-rfai
left a comment
There was a problem hiding this comment.
See comment about doing this automatically rather than as a separate command.
Collaborator
There was a problem hiding this comment.
Is there a reason we do not auto sense the IDE and do this automatically on start or init?
Collaborator
Author
There was a problem hiding this comment.
@david-rfai Good idea. If the user has several projects on their computer, which one to choose? Also we need to ask their permission (Yes/No in the command line). I'm open to ideas.
Collaborator
There was a problem hiding this comment.
Why not just detect the environment as cursor/vscode you can tell you are in the environment. See run_jupyter function in cli.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why This Matters for Our Users
RapidFire AI has a rich API surface —
Experiment,RFGridSearch,RFRandomSearch,RFModelConfig,RFLoraConfig,RFLangChainRagSpec, and dozens of config knobs across fit and evals workflows. Our users are increasingly building their experiments inside AI-assisted IDEs (Claude Code, Cursor), but the AI has no idea how to use our package correctly. It hallucinates wrong parameter names, usesmode="eval"instead ofmode="evals", passes embedding instances instead of classes, and misses critical patterns likeexperiment.end().This PR solves that by shipping IDE context files that teach Claude Code and Cursor the full RapidFire AI API, patterns, and common mistakes — installable in one command.
What Changes
New:
ide-context/directoryThree context files that customers copy into their project:
CLAUDE.md— Lean overview loaded at the start of every Claude Code session (~75 lines). Covers environment setup, server lifecycle, core mental model, and canonical code patterns for both fit and evals workflows..claude/rules/rapidfireai-api.md— Full API reference Claude can pull on demand. Every class signature, every user-function contract, IC Ops semantics, troubleshooting commands..cursor/rules/rapidfireai.mdc— Auto-applied Cursor rule for.pyand.ipynbfiles. Complete examples for SFT and RAG, common mistakes table, LoRA knob guidance.Plus install scripts (
install.sh,install.ps1) and aREADME.mdexplaining what gets installed.New:
rapidfireai install-ide-contextCLI commandZero-friction install — customers already have the CLI from
pip install rapidfireai:cd /path/to/my-project rapidfireai install-ide-contextCopies
CLAUDE.md,.claude/rules/, and.cursor/rules/into the current directory. Follows the same pattern ascopy_tutorial_notebooks(). The command prints the target directory before copying so users know exactly where files land.Fallback one-liners for users who don't have the CLI yet:
Modified files
pyproject.toml— Bundleside-context/as package data so the CLI command works afterpip install.gitignore— Adds negation rules soide-context/.cursor/is tracked (the root.cursor/remains ignored)README.md— New "AI-Assisted Development" section with install instructionscli.py—install_ide_context()function +install-ide-contextcommand + help textUser Impact
rapidfireaicode on first tryrapidfireai install-ide-contextin README + CLI helpAccuracy
All context files were audited against the actual source code. Fixes applied for:
mode="evals"(not"eval")InteractiveControllerimport path (rapidfireai.fit.utils, notrapidfireai.utils)experiment_pathparameter name (notexperiments_path)run_fitfirst param isparam_config(notconfig_group)RFRandomSearchconstructor (noseedparam — seed goes torun_fit/run_evals)run_evalssignature (num_actorsdefaults toNone, includesgpus_per_actor/cpus_per_actor)Test Plan
rapidfireai install-ide-contextfrom a fresh project directory — verifyCLAUDE.md,.claude/rules/rapidfireai-api.md, and.cursor/rules/rapidfireai.mdcare created.mdcrule auto-applies when editing a.pyfileCLAUDE.mdis loaded and.claude/rules/rapidfireai-api.mdis referenceablepip install .bundleside-context/in the wheel (check site-packages)curlandirmfallback scripts from a clean directoryNote
Low Risk
Primarily adds documentation/static assets and a new optional CLI command that copies files; minimal impact on core runtime behavior.
Overview
Adds an
ide-context/bundle (Claude Code + Cursor rules, API reference, and install scripts) and ships it as package data so it’s available afterpip install.Introduces a new CLI command,
rapidfireai install-ide-context, which copiesCLAUDE.md,.claude/rules/rapidfireai-api.md, and.cursor/rules/rapidfireai.mdcinto the current working directory, with help text and basic error handling.Updates
.gitignoreto allow trackingide-context/.cursor/, and extendsREADME.mdwith installation instructions and curl/PowerShell fallbacks.Written by Cursor Bugbot for commit ef24ed7. This will update automatically on new commits. Configure here.