Technical
My Cursor Setup for Full-Stack TypeScript Projects
Cursor is the first IDE I have switched to in a decade. The reason is simple: for full-stack TypeScript projects, the inline agent saves me hours a week. But a fresh Cursor install is not the configuration I use. Here is how I tune it for Next.js and FastAPI work.
The Rules File
Cursor reads a .cursorrules file at the project root. Mine looks roughly like this:
- Use TypeScript strict mode, no `any` types.
- Next.js App Router conventions. Server Components by default.
- Tailwind utility classes, no custom CSS files.
- Functional React components with hooks.
- Match existing file layout before introducing new patterns.Five lines. Every generation inherits that style. I stop seeing class components, stop seeing any, stop seeing random CSS modules appear in my repo.
Cmd-K vs Cmd-L
Cmd-K edits inline. I highlight a function, press Cmd-K, say 'extract the validation logic into its own function,' and the diff appears in place. Great for surgical changes.
Cmd-L opens the chat. I use chat when I need to reason across files or ask questions. For example: 'Why is the subscriber list re-rendering on every keystroke?' The agent reads the relevant files and explains the issue.
The Index Is Everything
Cursor indexes your whole repo. If the index is stale, the agent gives stale answers. I re-run indexing whenever I rename folders or pull large diffs. It takes 30 seconds and saves me from confused responses.
What I Turn Off
I turn off auto-imports in Copilot-style completion. They insert wrong imports more often than right ones in a monorepo with multiple package.json files. I accept slightly slower typing for zero broken import lines.
My Daily Loop
A typical session looks like:
- Read the ticket. Open the relevant files.
- Cmd-L: 'Where is subscriber creation handled today?'
- Agent gives me a map of the flow.
- I identify the change point.
- Cmd-K in place: 'Add optional locale field with default en-US.'
- Review diff. Accept. Run tests.
That loop is five minutes for a small change. Without Cursor, the same change is fifteen minutes of grep and scroll.
Multi-Repo Discipline
I work across a backend and a frontend repo in parallel. Cursor's workspace feature lets me open both in the same window so the index includes everything. When I ask a cross-repo question like 'does the frontend send locale in the signup payload?' the agent can answer by reading both codebases at once.
Keeping Models Fresh
Cursor lets you pin a specific model per workspace. I pin the latest Claude for my main codebases and check the release notes monthly. A better model is a free upgrade to every edit I make, so I do not want to miss one.
See the Cursor documentation for the full feature set and keep your .cursorrules file committed so the whole team gets the same behavior.
RELATED READING
The Consulting Shift I Am Making In Year Two
After a year of writing and building, my consulting practice is changing shape. Shorter engagements. Sharper outcomes.
ReadThe Frontend Shift: Shipping Less JavaScript In Year Two
A year ago I reached for Next.js for everything. This year I often reach for nothing.
ReadThe Serverless Lesson I Would Write On A Sticky Note
After a year of shipping serverless projects, one rule explains most of the wins and all of the losses.
Read