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

# Installation

> Installing Chonkie and its various components

Chonkie follows a modular approach to dependencies, keeping the base installation lightweight while allowing you to add extra features as needed.

## Basic Installation

For basic token and sentence chunking capabilities.

### Python

<CodeGroup>
  ```bash pip theme={"system"}
  pip install chonkie
  ```

  ```bash uv theme={"system"}
  uv add chonkie
  ```
</CodeGroup>

This installs our basic chunkers, plus the Python API SDK.

To use advanced features locally, skip ahead to [Installation Options](#installation-options)

### JavaScript

Install the core package for local chunking

<CodeGroup>
  ```bash npm theme={"system"}
  npm install @chonkiejs/core
  ```

  ```bash pnpm theme={"system"}
  pnpm add @chonkiejs/core
  ```

  ```bash bun theme={"system"}
  bun add @chonkiejs/core
  ```

  ```bash yarn theme={"system"}
  yarn add @chonkiejs/core
  ```
</CodeGroup>

To use custom tokenizers, install the `@chonkiejs/token` package

<CodeGroup>
  ```bash npm theme={"system"}
  npm install @chonkiejs/token
  ```

  ```bash pnpm theme={"system"}
  pnpm add @chonkiejs/token
  ```

  ```bash bun theme={"system"}
  bun add @chonkiejs/token
  ```

  ```bash yarn theme={"system"}
  yarn add @chonkiejs/token
  ```
</CodeGroup>

To use the API, install the `@chonkiejs/cloud` package

<CodeGroup>
  ```bash npm theme={"system"}
  npm install @chonkiejs/cloud
  ```

  ```bash pnpm theme={"system"}
  pnpm add @chonkiejs/cloud
  ```

  ```bash bun theme={"system"}
  bun add @chonkiejs/cloud
  ```

  ```bash yarn theme={"system"}
  yarn add @chonkiejs/cloud
  ```
</CodeGroup>

## Installation Options

Chonkie provides several installation options to match your specific needs:

<CodeGroup>
  ```bash Python theme={"system"}
  # Basic installation (TokenChunker, SentenceChunker, RecursiveChunker)
  pip install chonkie

  # For Hugging Face Hub support
  pip install "chonkie[hub]"

  # For visualization support (e.g., rich text output)
  pip install "chonkie[viz]"

  # For the default semantic provider support (includes Model2Vec)
  pip install "chonkie[semantic]"

  # For OpenAI embeddings support
  pip install "chonkie[openai]"

  # For Cohere embeddings support
  pip install "chonkie[cohere]"

  # For Jina embeddings support
  pip install "chonkie[jina]"

  # For SentenceTransformer embeddings support (required by LateChunker)
  pip install "chonkie[st]"

  # For CodeChunker support
  pip install "chonkie[code]"

  # For NeuralChunker support (BERT-based)
  pip install "chonkie[neural]"

  # For SlumberChunker support (Genie/LLM interface)
  pip install "chonkie[genie]"

  # For Groq Genie support (fast inference)
  pip install "chonkie[groq]"

  # For Cerebras Genie support (fastest inference)
  pip install "chonkie[cerebras]"

  # For installing multiple features together
  pip install "chonkie[st, code, genie]"

  # For all features
  pip install "chonkie[all]"

  ```

  ```bash JavaScript theme={"system"}
  # Basic installation for local chunking
  npm install @chonkiejs/core

  # To use the API
  npm install @chonkiejs/cloud
  ```
</CodeGroup>

## Chunker Availability

The following table shows which chunkers are available with different installation options:

| Chunker          |                         Default                        |                       embeddings                       |                          'all'                         |                       Chonkie JS                       |                           API                          |
| ---------------- | :----------------------------------------------------: | :----------------------------------------------------: | :----------------------------------------------------: | :----------------------------------------------------: | :----------------------------------------------------: |
| TokenChunker     | <Icon icon="check" color="#005c00" iconType="solid" /> | <Icon icon="check" color="#005c00" iconType="solid" /> | <Icon icon="check" color="#005c00" iconType="solid" /> | <Icon icon="check" color="#005c00" iconType="solid" /> | <Icon icon="check" color="#005c00" iconType="solid" /> |
| FastChunker      | <Icon icon="check" color="#005c00" iconType="solid" /> | <Icon icon="check" color="#005c00" iconType="solid" /> | <Icon icon="check" color="#005c00" iconType="solid" /> | <Icon icon="check" color="#005c00" iconType="solid" /> |   <Icon icon="x" color="#ff0000" iconType="solid" />   |
| RecursiveChunker | <Icon icon="check" color="#005c00" iconType="solid" /> | <Icon icon="check" color="#005c00" iconType="solid" /> | <Icon icon="check" color="#005c00" iconType="solid" /> | <Icon icon="check" color="#005c00" iconType="solid" /> | <Icon icon="check" color="#005c00" iconType="solid" /> |
| SentenceChunker  | <Icon icon="check" color="#005c00" iconType="solid" /> | <Icon icon="check" color="#005c00" iconType="solid" /> | <Icon icon="check" color="#005c00" iconType="solid" /> | <Icon icon="check" color="#005c00" iconType="solid" /> | <Icon icon="check" color="#005c00" iconType="solid" /> |
| TableChunker     | <Icon icon="check" color="#005c00" iconType="solid" /> | <Icon icon="check" color="#005c00" iconType="solid" /> | <Icon icon="check" color="#005c00" iconType="solid" /> | <Icon icon="check" color="#005c00" iconType="solid" /> | <Icon icon="check" color="#005c00" iconType="solid" /> |
| SemanticChunker  |   <Icon icon="x" color="#ff0000" iconType="solid" />   | <Icon icon="check" color="#005c00" iconType="solid" /> | <Icon icon="check" color="#005c00" iconType="solid" /> | <Icon icon="check" color="#005c00" iconType="solid" /> | <Icon icon="check" color="#005c00" iconType="solid" /> |
| LateChunker      |   <Icon icon="x" color="#ff0000" iconType="solid" />   | <Icon icon="check" color="#005c00" iconType="solid" /> | <Icon icon="check" color="#005c00" iconType="solid" /> |   <Icon icon="x" color="#ff0000" iconType="solid" />   | <Icon icon="check" color="#005c00" iconType="solid" /> |
| CodeChunker      |   <Icon icon="x" color="#ff0000" iconType="solid" />   |   <Icon icon="x" color="#ff0000" iconType="solid" />   | <Icon icon="check" color="#005c00" iconType="solid" /> | <Icon icon="check" color="#005c00" iconType="solid" /> | <Icon icon="check" color="#005c00" iconType="solid" /> |
| NeuralChunker    |   <Icon icon="x" color="#ff0000" iconType="solid" />   | <Icon icon="check" color="#005c00" iconType="solid" /> | <Icon icon="check" color="#005c00" iconType="solid" /> |   <Icon icon="x" color="#ff0000" iconType="solid" />   | <Icon icon="check" color="#005c00" iconType="solid" /> |
| SlumberChunker   |   <Icon icon="x" color="#ff0000" iconType="solid" />   | <Icon icon="check" color="#005c00" iconType="solid" /> | <Icon icon="check" color="#005c00" iconType="solid" /> |   <Icon icon="x" color="#ff0000" iconType="solid" />   | <Icon icon="check" color="#005c00" iconType="solid" /> |

## Embeddings Availability

Different embedding providers are available with different installation options:

| Embeddings Provider           |                       Default                      |                       'model2vec'                      |                          'st'                          |                        'openai'                        |                       'semantic'                       |                          'all'                         |
| ----------------------------- | :------------------------------------------------: | :----------------------------------------------------: | :----------------------------------------------------: | :----------------------------------------------------: | :----------------------------------------------------: | :----------------------------------------------------: |
| Model2VecEmbeddings           | <Icon icon="x" color="#ff0000" iconType="solid" /> | <Icon icon="check" color="#005c00" iconType="solid" /> |   <Icon icon="x" color="#ff0000" iconType="solid" />   |   <Icon icon="x" color="#ff0000" iconType="solid" />   | <Icon icon="check" color="#005c00" iconType="solid" /> | <Icon icon="check" color="#005c00" iconType="solid" /> |
| SentenceTransformerEmbeddings | <Icon icon="x" color="#ff0000" iconType="solid" /> |   <Icon icon="x" color="#ff0000" iconType="solid" />   | <Icon icon="check" color="#005c00" iconType="solid" /> |   <Icon icon="x" color="#ff0000" iconType="solid" />   |   <Icon icon="x" color="#ff0000" iconType="solid" />   | <Icon icon="check" color="#005c00" iconType="solid" /> |
| OpenAIEmbeddings              | <Icon icon="x" color="#ff0000" iconType="solid" /> |   <Icon icon="x" color="#ff0000" iconType="solid" />   |   <Icon icon="x" color="#ff0000" iconType="solid" />   | <Icon icon="check" color="#005c00" iconType="solid" /> |   <Icon icon="x" color="#ff0000" iconType="solid" />   | <Icon icon="check" color="#005c00" iconType="solid" /> |

## Dependencies

Here's what each installation option adds:

| Installation Option | Additional Dependencies                          |
| ------------------- | ------------------------------------------------ |
| Default             | tqdm, numpy, chonkie-core, tenacity              |
| 'hub'               | + huggingface-hub, jsonschema                    |
| 'viz'               | + rich                                           |
| 'model2vec'         | + tokenizers, model2vec, numpy                   |
| 'st'                | + tokenizers, sentence-transformers, accelerate  |
| 'openai'            | + openai, tiktoken, pydantic                     |
| 'cohere'            | + tokenizers, cohere                             |
| 'jina'              | + tokenizers                                     |
| 'semantic'          | + tokenizers, model2vec                          |
| 'code'              | + tree-sitter, tree-sitter-language-pack, magika |
| 'neural'            | + transformers, torch                            |
| 'genie'             | + pydantic, google-genai                         |
| 'groq'              | + pydantic, groq                                 |
| 'cerebras'          | + pydantic, cerebras-cloud-sdk                   |
| 'litellm'           | + litellm, tiktoken, tokenizers                  |
| 'all'               | all above dependencies                           |

## Important Notes

* We provide separate `semantic` and `all` installs pre-packaged that might match other installation options breeding redundancy. This redundancy is intentional to provide users with the best experience and freedom to choose their preferred means.
* The `semantic` and `all` optional installs may change in future versions, so what you download today may not be the same for tomorrow.
* Installing either 'semantic' or 'openai' extras will enable SemanticChunker, as it can work with any embeddings provider. The difference is in which embedding providers are available for use with this chunker.

## Logging

Chonkie logs warnings and errors by default. Control logging with the `CHONKIE_LOG` environment variable:

```bash theme={"system"}
export CHONKIE_LOG=off     # Disable logging
export CHONKIE_LOG=warning # Warnings and errors (default)
export CHONKIE_LOG=info    # More verbose
export CHONKIE_LOG=debug   # Everything
```

See [Logging](/oss/utils/logging) for more details.
