Back to Cline

Cline SDK Examples

sdk/apps/examples/README.md

3.83.02.3 KB
Original Source

Cline SDK Examples

Learn how to build with the Cline SDK through working examples, ordered from simple to complex.

Getting started

All examples live in this directory. Each is a standalone project with its own package.json and README. To run any example:

bash
cd apps/examples/<example-name>
bun install
bun run build:sdk
export CLINE_API_KEY="cline_..."
bun dev

Requires Node.js 22+.

Examples

Beginner

ExampleDescriptionConcepts
quickstartSend one prompt, stream the response. ~15 lines of code.Agent, subscribe, run()
cli-agentInteractive terminal chat with a shell tool.createTool, multi-turn run()/continue(), streaming

Intermediate

ExampleDescriptionConcepts
code-review-botAI code reviewer that reads git diffs and produces structured comments.Multiple tools, completesRun lifecycle, systemPrompt, zod schemas
multi-agentWeb app that fans out to three specialist agents in parallel, streams results via SSE, then synthesizes a unified answer.Concurrent agents, Promise.all, per-agent subscribe(), SSE streaming, agent composition

Advanced

ExampleDescriptionConcepts
desktop-appFull Tauri + Next.js desktop app for running and inspecting chat sessions.Sidecar runtime, websocket transport, session persistence
menubarmacOS menu bar app with Tauri.Native app integration, compact UI
vscodeVS Code extension with chat panel.Extension API, webview, workspace context

SDK packages

When building your own app, install the public SDK package:

bash
npm add @cline/sdk

@cline/sdk re-exports everything from @cline/core. You only need @cline/agents or @cline/llms if you want lower-level control over the agent runtime or model gateway directly.

Learn more