> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cerca.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Client libraries

> Install the official Cerca SDKs and CLI.

Cerca ships official clients for TypeScript, Python, Go, and Ruby. The REST API is also available directly with curl, and the CLI is useful for local scripts and debugging.

All clients use the same organization-scoped API key:

```sh theme={null}
export CERCA_API_KEY="..."
```

## TypeScript

Install the JavaScript and TypeScript SDK from npm:

```sh theme={null}
npm install @cerca-dev/sdk
```

Use the package manager your project already uses:

```sh theme={null}
pnpm add @cerca-dev/sdk
yarn add @cerca-dev/sdk
bun add @cerca-dev/sdk
```

Create a client with your API key:

```ts theme={null}
import Cerca from "@cerca-dev/sdk";

const client = new Cerca({
  apiKey: process.env.CERCA_API_KEY,
});
```

## Python

Install the Python SDK from PyPI:

```sh theme={null}
pip install cerca-python
```

For projects that use uv:

```sh theme={null}
uv add cerca-python
```

Create a client with your API key:

```python theme={null}
import os
from cerca import Cerca

client = Cerca(api_key=os.environ["CERCA_API_KEY"])
```

## Go

Install the Go SDK with `go get`:

```sh theme={null}
go get github.com/matrices/cerca-go
```

Create a client with your API key:

```go theme={null}
package main

import (
	"os"

	cerca "github.com/matrices/cerca-go"
	"github.com/matrices/cerca-go/option"
)

func main() {
	client := cerca.NewClient(option.WithAPIKey(os.Getenv("CERCA_API_KEY")))
	_ = client
}
```

## Ruby

Install the Ruby SDK from RubyGems:

```sh theme={null}
gem install cerca
```

For Bundler-managed apps:

```sh theme={null}
bundle add cerca
```

Create a client with your API key:

```ruby theme={null}
require "cerca"

client = Cerca::Client.new(api_key: ENV["CERCA_API_KEY"])
```

## CLI

Install the Cerca CLI with Homebrew:

```sh theme={null}
brew install matrices/cerca/cerca
```

Then authenticate each command with the same API key environment variable:

```sh theme={null}
export CERCA_API_KEY="..."
cerca auth context
```

## Next steps

After installing a client, follow the [Quickstart](/quickstart) to verify your key, create an agent, and start a thread. The API Reference tab includes endpoint-level examples for each generated SDK.
