Clanka is published to npm as an ES module and has five required peer dependencies, all from the Effect ecosystem. This page covers installing everything and wiring up your TypeScript project so compilation succeeds.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Effectful-Tech/clanka/llms.txt
Use this file to discover all available pages before exploring further.
Install clanka
Install peer dependencies
Clanka requires five peer packages. All five must be on the same compatible version range. Install the exact range shown below.What each peer dependency provides
| Package | Version range | Purpose |
|---|---|---|
effect | >=4.0.0-beta.52 <4.0.1 | Core Effect runtime — fibers, layers, streams, schemas, and the full FP toolkit Clanka is built on |
@effect/ai-openai | >=4.0.0-beta.52 <4.0.1 | OpenAI-compatible language model and client layers; used by the Codex provider |
@effect/ai-openai-compat | >=4.0.0-beta.52 <4.0.1 | OpenAI-compatible shim layer; used by the Copilot provider to talk to GitHub’s API |
@effect/platform-node | >=4.0.0-beta.52 <4.0.1 | Node.js implementations of FileSystem, HttpClient, ChildProcessSpawner, and WebSocket — required by Agent.layerLocal |
@effect/sql-sqlite-node | >=4.0.0-beta.52 <4.0.1 | SQLite driver for Node.js; required by the semantic search layer to persist the vector index |
All five packages must resolve to versions within the same compatible range (
>=4.0.0-beta.52 <4.0.1). Mismatched versions will cause Effect context errors at runtime because service identity is based on the effect module’s internal symbol registry.Optional: SQLite vector dependencies for semantic search
Clanka ships optional native binaries that power the vector similarity search used by theSemanticSearch layer. These are installed automatically by your package manager on supported platforms, but they are not required if you do not use semantic search.
The supported platforms are:
- macOS arm64 (
@sqliteai/sqlite-vector-darwin-arm64) - macOS x86-64 (
@sqliteai/sqlite-vector-darwin-x86_64) - Linux arm64, glibc (
@sqliteai/sqlite-vector-linux-arm64) - Linux arm64, musl (
@sqliteai/sqlite-vector-linux-arm64-musl) - Linux x86-64, glibc (
@sqliteai/sqlite-vector-linux-x86_64) - Linux x86-64, musl (
@sqliteai/sqlite-vector-linux-x86_64-musl) - Windows x86-64 (
@sqliteai/sqlite-vector-win32-x86_64)
--ignore-optional / --no-optional to your package manager.
Configure TypeScript
Clanka is published as an ES module and uses TypeScript path-based imports (e.g.,"./Agent.ts"). Your tsconfig.json must use a module resolution strategy that supports these patterns.
Required settings
| Option | Recommended value | Why |
|---|---|---|
target | ES2022 or higher | Clanka uses top-level await, private class fields, and using declarations |
moduleResolution | bundler or node16 | Needed to resolve .ts extension imports inside the package |
verbatimModuleSyntax | true | Keeps import type and import distinct — required by Effect’s tree-shaking assumptions |
Verify the installation
Create a small smoke-test file to confirm that types resolve correctly:Next steps
Quickstart
Build and run your first Clanka agent end to end.
Copilot provider
Use GitHub Copilot as the model provider instead of Codex.
Semantic search
Set up the SQLite vector index for meaning-based code search.
Custom tools
Expose additional functions to the agent sandbox beyond the built-in set.