# @clinebot/core

> Cline Core SDK for Node Runtime

Latest version **0.0.38** (published 2026-05-05) · 0 weekly downloads

## Install

```sh
npm install @clinebot/core
pnpm add @clinebot/core
yarn add @clinebot/core
bun add @clinebot/core
```

## Health

**Score 55/100 (C)** — status: active.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.0.38 |
| Published | 2026-05-05 |
| First published | 2026-03-18 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=22 |
| Dependencies | 21 |
| Unpacked size | 2.3 MB |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | johnsimbot, saoudcline, beatrix-cline, barreirot, maxpaulus, arakhan |

## Links

- npm: https://www.npmjs.com/package/@clinebot/core
- Repository: https://github.com/cline/sdk-wip
- npm.io page: https://npm.io/package/@clinebot/core

## Dependencies (21)

- [ws](https://npm.io/package/ws.md) ^8.20.0
- [zod](https://npm.io/package/zod.md) ^4.3.6
- [jiti](https://npm.io/package/jiti.md) ^1.21.7
- [yaml](https://npm.io/package/yaml.md) ^2.8.2
- [nanoid](https://npm.io/package/nanoid.md) ^5.1.7
- [simple-git](https://npm.io/package/simple-git.md) ^3.32.3
- [@clinebot/llms](https://npm.io/package/@clinebot/llms.md) 0.0.38
- [node-machine-id](https://npm.io/package/node-machine-id.md) ^1.1.12
- [@clinebot/agents](https://npm.io/package/@clinebot/agents.md) 0.0.38
- [@clinebot/shared](https://npm.io/package/@clinebot/shared.md) 0.0.38
- [@opentelemetry/api](https://npm.io/package/@opentelemetry/api.md) ^1.9.0
- [@opentelemetry/api-logs](https://npm.io/package/@opentelemetry/api-logs.md) ^0.214.0
- [@opentelemetry/sdk-logs](https://npm.io/package/@opentelemetry/sdk-logs.md) ^0.214.0
- [@opentelemetry/resources](https://npm.io/package/@opentelemetry/resources.md) ^2.6.1
- [@opentelemetry/sdk-metrics](https://npm.io/package/@opentelemetry/sdk-metrics.md) ^2.6.1
- [@opentelemetry/sdk-trace-base](https://npm.io/package/@opentelemetry/sdk-trace-base.md) ^2.6.1
- [@opentelemetry/sdk-trace-node](https://npm.io/package/@opentelemetry/sdk-trace-node.md) ^2.6.1
- [@opentelemetry/semantic-conventions](https://npm.io/package/@opentelemetry/semantic-conventions.md) ^1.40.0
- [@opentelemetry/exporter-logs-otlp-http](https://npm.io/package/@opentelemetry/exporter-logs-otlp-http.md) ^0.214.0
- [@opentelemetry/exporter-trace-otlp-http](https://npm.io/package/@opentelemetry/exporter-trace-otlp-http.md) ^0.214.0
- [@opentelemetry/exporter-metrics-otlp-http](https://npm.io/package/@opentelemetry/exporter-metrics-otlp-http.md) ^0.214.0

## Recent versions

- 0.0.38 (latest) — 2026-05-05
- 0.0.38-nightly.1778038008 (nightly) — 2026-05-06
- 0.0.37-nightly.1777950585 — 2026-05-05
- 0.0.37-nightly.1777940884 — 2026-05-05
- 0.0.37-nightly.1777939956 — 2026-05-05
- 0.0.37 — 2026-04-28
- 0.0.36 — 2026-04-22
- 0.0.35 — 2026-04-21
- 0.0.34 — 2026-04-14
- 0.0.33 — 2026-04-12
- 0.0.32 — 2026-04-11
- 0.0.30 — 2026-04-11
- 0.0.29 — 2026-04-10
- 0.0.28 — 2026-04-03
- 0.0.27 — 2026-04-03
- … 22 more at https://npm.io/package/@clinebot/core/versions

## README

# [experimental] @clinebot/core

`@clinebot/core` is the stateful orchestration layer of the Cline SDK. It
connects the agent runtime, provider settings, storage, default tools, and
session lifecycle into a host-ready runtime.

## What You Get

- session lifecycle and orchestration primitives
- provider settings and account services
- default runtime tools and MCP integration
- storage-backed session and team state helpers
- host-facing Node helpers through `@clinebot/core`

## Installation

```bash
npm install @clinebot/core
```

## Entry Points

- `@clinebot/core`: core contracts, shared utilities, and Node/server helpers for building hosts and runtimes

## Typical Usage

Most host apps should start with `@clinebot/core`.

```ts
import { ClineCore } from "@clinebot/core";

const cline = await ClineCore.create({});

const result = await cline.start({
	config: {
		providerId: "anthropic",
		modelId: "claude-sonnet-4-6",
		apiKey: process.env.ANTHROPIC_API_KEY ?? "",
		cwd: process.cwd(),
		mode: "act",
		enableTools: true,
		enableSpawnAgent: false,
		enableAgentTeams: false,
		systemPrompt: "You are a concise assistant.",
	},
	prompt: "Summarize this project.",
	interactive: false,
});

console.log(result.result?.text);
await cline.dispose();
```

## Session Bootstrap

`ClineCore.create(...)` also accepts `prepare(input)`.

Use it when a host needs to prepare workspace-scoped runtime state before each
session starts, then apply watcher/extensions/telemetry inputs through
explicit `localRuntime` bootstrap fields without widening the shared host
contract.

## Main APIs

### Runtime and Sessions

Use `@clinebot/core` for host-facing runtime assembly:

- `ClineCore.create(...)`
- `createRuntimeHost(...)`
- `LocalRuntimeHost`
- `HubRuntimeHost` and `RemoteRuntimeHost`
- `DefaultRuntimeBuilder`

`ClineCore` is the app-facing session API. The lower-level `RuntimeHost`
boundary uses runtime-primitive names such as `startSession` and `runTurn` so
transport adapters stay distinct from product methods like `start` and `send`.
Service-style operations such as pending prompt edits, accumulated usage lookup,
and active-session model switching are exposed through `ClineCore` when the
selected transport supports them rather than being part of the minimal host
primitive vocabulary.

### Default Tools

`@clinebot/core` owns the built-in host tools and executors:

- `createBuiltinTools(...)`
- `createDefaultTools(...)`
- `createDefaultExecutors(...)`

### Storage and Settings

The package also exports storage and settings helpers such as:

- `ProviderSettingsManager`
- `SqliteTeamStore`
- SQLite-backed local session stores and artifacts through `@clinebot/core`

## Related Packages

- `@clinebot/agents`: stateless agent loop and tool primitives
- `@clinebot/llms`: provider/model configuration and handlers

## More Examples

- Repo examples: [apps/examples/cline-sdk](https://github.com/cline/cline/tree/main/apps/examples/cline-sdk)
- Workspace overview: [README.md](https://github.com/cline/cline/blob/main/README.md)
- API and architecture references: [DOC.md](https://github.com/cline/cline/blob/main/DOC.md), [ARCHITECTURE.md](https://github.com/cline/cline/blob/main/ARCHITECTURE.md)

---
_Source: https://npm.io/package/@clinebot/core · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
