Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
338046d
Update 03_postgres_source.md
badmonster0 Nov 12, 2025
da109ea
fix link
badmonster0 Nov 12, 2025
42b4ad4
Merge branch 'main' into doc-fix
badmonster0 Nov 12, 2025
e119cdf
Merge branch 'main' into doc-fix
badmonster0 Nov 20, 2025
97ddfff
new example
badmonster0 Nov 20, 2025
ec6ce9d
move tutorial to top bar
badmonster0 Nov 20, 2025
e9120ce
Merge branch 'main' into doc-fix
badmonster0 Nov 20, 2025
556a93d
more tutorial
badmonster0 Nov 20, 2025
803251f
Merge branch 'main' into doc-fix
badmonster0 Nov 20, 2025
2bf5d91
Update document_ai.md
badmonster0 Nov 20, 2025
bada3ef
Merge branch 'main' into doc-fix
badmonster0 Nov 20, 2025
89333ca
[example] bump baml version
badmonster0 Nov 20, 2025
23b99d7
Merge branch 'main' into doc-fix
badmonster0 Nov 20, 2025
54cd9fc
[doc] images
badmonster0 Nov 21, 2025
14f98b2
Merge branch 'main' into doc-fix
badmonster0 Nov 21, 2025
14d3555
[doc] clip example
badmonster0 Nov 21, 2025
9bdf64a
Merge branch 'main' into doc-fix
badmonster0 Nov 21, 2025
106b397
Delete example (73).png
badmonster0 Nov 21, 2025
3f93323
docs category
badmonster0 Nov 22, 2025
fff327d
Merge branch 'main' into doc-fix
badmonster0 Nov 22, 2025
dfed73f
[doc] baml
badmonster0 Nov 22, 2025
9b95653
Merge branch 'main' into doc-fix
badmonster0 Nov 22, 2025
8a894c7
image resize
badmonster0 Nov 22, 2025
4fa58ff
Merge branch 'main' into doc-fix
badmonster0 Nov 22, 2025
75876e6
Update patient_form_extraction_baml.md
badmonster0 Nov 23, 2025
d851e60
Merge branch 'main' into doc-fix
badmonster0 Nov 23, 2025
a860010
[doc] sqs example
badmonster0 Nov 23, 2025
486e005
Merge branch 'main' into doc-fix
badmonster0 Nov 23, 2025
d67e0ba
[doc] drive example
badmonster0 Nov 23, 2025
4293eb1
Merge branch 'main' into doc-fix
badmonster0 Nov 23, 2025
ed7859a
Update patient_form_extraction_baml.md
badmonster0 Nov 23, 2025
2238d1f
Merge branch 'main' into doc-fix
badmonster0 Nov 23, 2025
557ece7
Merge branch 'main' into doc-fix
badmonster0 Nov 24, 2025
7b0de44
fix format on examples
badmonster0 Nov 24, 2025
a3a1ea4
clean up readme
badmonster0 Nov 24, 2025
d07877c
use sh in all
badmonster0 Nov 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ If you're new to CocoIndex, we recommend checking out

1. Install CocoIndex Python library

```bash
```sh
pip install -U cocoindex
```

Expand Down
2 changes: 1 addition & 1 deletion dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Automatically generates CLI documentation from the CocoIndex Click commands.

**Usage:**

```bash
```sh
python dev/generate_cli_docs.py
```

Expand Down
12 changes: 6 additions & 6 deletions docs/docs/ai/llm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ cocoindex.functions.EmbedText(

* [Download](https://ollama.com/download) and install Ollama.
* Pull your favorite LLM models by the `ollama pull` command, e.g.
```bash
```sh
ollama pull llama3.2
```
You can find the [list of models](https://ollama.com/library) supported by Ollama.
Expand All @@ -146,7 +146,7 @@ cocoindex.LlmSpec(

For text embedding with Ollama, you'll need to pull an embedding model first:

```bash
```sh
ollama pull nomic-embed-text
```

Expand Down Expand Up @@ -330,7 +330,7 @@ To use the LiteLLM API, you need to set the environment variable `LITELLM_API_KE

#### 1. Install LiteLLM Proxy

```bash
```sh
pip install 'litellm[proxy]'
```

Expand Down Expand Up @@ -367,7 +367,7 @@ You need to set the environment variable `GROQ_API_KEY` to your Groq API key.

#### 3. Run LiteLLM Proxy

```bash
```sh
litellm --config config.yml
```

Expand Down Expand Up @@ -415,13 +415,13 @@ You can find the full list of models supported by OpenRouter [here](https://open

Install vLLM:

```bash
```sh
pip install vllm
```

Run vLLM Server

```bash
```sh
vllm serve deepseek-ai/deepseek-coder-1.3b-instruct
```

Expand Down
14 changes: 7 additions & 7 deletions docs/docs/core/cli-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Modes of operation:

**Usage:**

```bash
```sh
cocoindex drop [OPTIONS] [APP_TARGET] [FLOW_NAME]...
```

Expand Down Expand Up @@ -45,7 +45,7 @@ flow.

**Usage:**

```bash
```sh
cocoindex evaluate [OPTIONS] APP_FLOW_SPECIFIER
```

Expand All @@ -72,7 +72,7 @@ the backend.

**Usage:**

```bash
```sh
cocoindex ls [OPTIONS] [APP_TARGET]
```

Expand All @@ -95,7 +95,7 @@ It will allow tools like CocoInsight to access the server.

**Usage:**

```bash
```sh
cocoindex server [OPTIONS] APP_TARGET
```

Expand Down Expand Up @@ -128,7 +128,7 @@ storage and target (to export to).

**Usage:**

```bash
```sh
cocoindex setup [OPTIONS] APP_TARGET
```

Expand Down Expand Up @@ -160,7 +160,7 @@ flow.

**Usage:**

```bash
```sh
cocoindex show [OPTIONS] APP_FLOW_SPECIFIER
```

Expand All @@ -184,7 +184,7 @@ or `module:FlowName`. If `:FlowName` is omitted, updates all flows.

**Usage:**

```bash
```sh
cocoindex update [OPTIONS] APP_FLOW_SPECIFIER
```

Expand Down
8 changes: 4 additions & 4 deletions docs/docs/examples/examples/00_codebase_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The flow is composed of the following steps:
- Install Postgres, follow [installation guide](https://cocoindex.io/docs/getting_started/installation#-install-postgres).
- Install CocoIndex

```bash
```sh
pip install -U cocoindex
```

Expand Down Expand Up @@ -206,7 +206,7 @@ if __name__ == "__main__":

- Install dependencies

```bash
```sh
pip install -e .
```

Expand Down Expand Up @@ -234,8 +234,8 @@ The returned results - each entry contains score (Cosine Similarity), filename,
To get a better understanding of the indexing flow, you can use CocoInsight to help the development step by step.
To spin up, it is super easy.

```
cocoindex server main.py -ci
```sh
cocoindex server -ci main
```

Follow the url from the terminal - `https://cocoindex.io/cocoinsight` to access the CocoInsight.
Expand Down
1 change: 0 additions & 1 deletion docs/docs/examples/examples/02_academic_papers_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,6 @@ If you need assist with writing the query, please feel free to reach out to us a

You can walk through the project step by step in [CocoInsight](https://www.youtube.com/watch?v=MMrpUfUcZPk) to see exactly how each field is constructed and what happens behind the scenes.


```sh
cocoindex server -ci main
```
Expand Down
12 changes: 6 additions & 6 deletions docs/docs/examples/examples/03_postgres_source.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,25 +182,25 @@ For example, the following image shows the lineage of the `embedding` field, you

1. Set up dependencies:

```bash
```sh
pip install -e .
```

2. Create the source table with sample data:

```bash
```sh
psql "postgres://cocoindex:cocoindex@localhost/cocoindex" -f ./prepare_source_data.sql
```

3. Setup tables and update the index:

```bash
```sh
cocoindex update main
```

4. Run CocoInsight:

```bash
```sh
cocoindex server -ci main
```

Expand All @@ -210,8 +210,8 @@ For example, the following image shows the lineage of the `embedding` field, you

For continuous updating when the source changes, add `-L`:

```bash
cocoindex server -ci -L main
```sh
cocoindex update -L main
```

Check [live updates](https://cocoindex.io/docs/tutorials/live_updates) for more details.
Expand Down
8 changes: 4 additions & 4 deletions docs/docs/examples/examples/custom_targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ output_html.export(

## Run the example

```bash
```sh
pip install -e .
cocoindex update main
```
Expand All @@ -198,9 +198,9 @@ You can add, modify, or remove files in the `data/` directory — CocoIndex will

For **real-time updates**, run in live mode:

```bash
cocoindex update -L main.py
```
```sh
cocoindex update -L main
```

This keeps your knowledge graph continuously synchronized with your document source — perfect for fast-changing environments like internal wikis or technical documentation.

Expand Down
12 changes: 6 additions & 6 deletions docs/docs/examples/examples/image_search_clip.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ You can check the frontend code [here](https://github.com/cocoindex-io/cocoindex

## Time to have fun!
- Create a collection in Qdrant
```bash
```sh
curl -X PUT 'http://localhost:6333/collections/image_search' \
-H 'Content-Type: application/json' \
-d '{
Expand All @@ -279,18 +279,18 @@ You can check the frontend code [here](https://github.com/cocoindex-io/cocoindex
```

- Setup indexing flow
```bash
cocoindex setup main.py
```sh
cocoindex setup main
```
It is setup with a live updater, so you can add new files to the folder and it will be indexed within a minute.

- Run backend
```bash
```sh
uvicorn main:app --reload --host 0.0.0.0 --port 8000
```

- Run frontend
```bash
```sh
cd frontend
npm install
npm run dev
Expand All @@ -306,7 +306,7 @@ Wait a minute for the new image to be processed and indexed.

![Search](/img/examples/image_search_clip/search3.png)

If you want to monitor the indexing progress, you can view it in CocoInsight `cocoindex server -ci main `.
If you want to monitor the indexing progress, you can view it in CocoInsight `cocoindex server -ci main`.

![Index Status In CocoInsight](/img/examples/image_search_clip/index-status.png)

Expand Down
5 changes: 3 additions & 2 deletions docs/docs/examples/examples/manual_extraction.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,14 +225,15 @@ modules_index.export(

## Query and test your index
Run the following command to setup and update the index.

```sh
cocoindex update -L main.py
cocoindex update -L main
```
You'll see the index updates state in the terminal

After the index is built, you have a table with the name `modules_info`. You can query it at any time, e.g., start a Postgres shell:

```bash
```sh
psql postgres://cocoindex:cocoindex@localhost/cocoindex
```

Expand Down
1 change: 0 additions & 1 deletion docs/docs/examples/examples/multi_format_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ search_results = client.query_points(

You can walk through the project step by step in [CocoInsight](https://www.youtube.com/watch?v=MMrpUfUcZPk) to see exactly how each field is constructed and what happens behind the scenes.


```sh
cocoindex server -ci main
```
Expand Down
10 changes: 5 additions & 5 deletions docs/docs/examples/examples/patient_form_extraction.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ patients_index.export(

### Install dependencies

```bash
```sh
pip install -e .
```

Expand All @@ -240,7 +240,7 @@ patients_index.export(

After the index is built, you have a table with the name `patients_info`. You can query it at any time, e.g., start a Postgres shell:

```bash
```sh
psql postgres://cocoindex:cocoindex@localhost/cocoindex
```

Expand All @@ -258,7 +258,7 @@ For mission-critical use cases, it is important to evaluate the quality of the e

1. Dump the extracted data to YAML files.

```bash
```sh
python3 main.py cocoindex evaluate
```

Expand All @@ -269,7 +269,7 @@ For mission-critical use cases, it is important to evaluate the quality of the e

You can run the following command to see the diff:

```bash
```sh
diff -r data/eval_PatientIntakeExtraction_golden data/eval_PatientIntakeExtraction_output
```

Expand All @@ -290,7 +290,7 @@ We could troubleshoot in two steps:

I also use CocoInsight to help me troubleshoot.

```bash
```sh
cocoindex server -ci main
```

Expand Down
8 changes: 4 additions & 4 deletions docs/docs/examples/examples/patient_form_extraction_baml.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,23 +287,23 @@ Exports the index to Postgres as the `patients` table, with automatic updates an

**Generate BAML client code** (required step, in case you didn’t do it earlier. )

```bash
```sh
baml generate
```

This generates the `baml_client/` directory with Python code to call your BAML functions.

Update the index:

```bash
```sh
cocoindex update main
```

**CocoInsight**

I used CocoInsight (Free beta now) to troubleshoot the index generation and understand the data lineage of the pipeline. It just connects to your local CocoIndex server, with zero pipeline data retention.
I used CocoInsight (Free beta now) to troubleshoot the index generation and understand the data lineage of the pipeline. It just connects to your local CocoIndex server, with zero pipeline data retention.

```bash
```sh
cocoindex server -ci main
```

Expand Down
Loading