gitmyhub

cookbook

TypeScript ★ 3.9k updated 2d ago

Cursor Cookbook is a collection of five ready-to-run TypeScript examples showing how to control the Cursor AI code editor's built-in agent from your own scripts, web apps, and automated workflows.

TypeScriptNode.jsCursor SDKsetup: easycomplexity 3/5

Cursor Cookbook is a collection of small, ready-to-run examples for building software on top of Cursor, the AI-powered code editor. The examples are organized around the Cursor SDK, which is a TypeScript library that lets developers control Cursor's built-in coding agent from their own applications, scripts, and automated workflows.

The SDK allows you to start an agent, send it a prompt, and receive a stream of responses as the agent works through a task. You can run agents locally against files on your machine or in the cloud, and the SDK gives you control over things like which AI model to use, how to cancel a running job, and how to manage the conversation history.

The cookbook includes five example projects that show different ways to use the SDK. The quickstart is a minimal Node.js script that creates an agent, sends one prompt, and prints the response. The app-builder is a web interface for spinning up agents that scaffold new projects in an isolated cloud environment. The agent-kanban is a visual board for tracking multiple cloud agents, grouped by status or repository. The coding-agent-cli lets you start Cursor agents directly from a terminal prompt. The DAG task runner breaks a larger task into a dependency graph, runs each piece with a separate agent in parallel, and displays live status updates in Cursor's canvas view.

To use any of the examples, you need a Cursor API key, which you can generate from the Cursor integrations dashboard. Once the key is set as an environment variable, each example can be run with standard Node.js commands. The full SDK documentation is available on the Cursor website.

Where it fits