cocoindex-code

(โ˜… 2,667)

A super light-weight embedded code search engine CLI (AST based) that just works - improves speed and efficiency for coding agent ๐ŸŒŸ Star if you like it!

  • .dockerignore
  • .gitignore
  • .mcp.json
  • .pre-commit-config.yaml
  • CLAUDE.md
  • CODE_OF_CONDUCT.md
  • CONTRIBUTING.md
  • EMBEDDINGS.md
  • LICENSE
  • pyproject.toml
  • README.md
  • req-to-pr.zip
  • SECURITY.md
  • uv.lock

๐Ÿš€ Installation Guide

1. Get the code
git clone https://github.com/cocoindex-io/cocoindex-code

Downloads the entire project code from GitHub to your computer.

cd cocoindex-code

Moves into the project folder you just downloaded.

2. Official Install Script

Easy Recommended
Prerequisites
  • pipx Installs Python-based CLI tools into isolated environments.
  • Homebrew A package manager for macOS/Linux.
pipx install 'cocoindex-code[full]' # batteries included (local embeddings)

Installs the CLI tool into an isolated environment via pipx.

brew install python3

Installs the pre-built package via Homebrew โ€” no source build required.

pipx install cocoindex-code # first install

Installs the CLI tool into an isolated environment via pipx.

โœ… After installing, open a new terminal and run the program's version command (e.g. --version) to confirm it worked.

Pulled directly from this repo's README.

3. Docker

Easy
Prerequisites
  • Git Needed to download the project code from GitHub.
  • Docker Desktop Needed to build and run containers. Install it and keep it running in the background.
docker compose -f <(curl -L https://raw.githubusercontent.com/cocoindex-io/cocoindex-code/refs/heads/main/docker/docker-compose.yml) up -d

Runs the command against the services defined in the compose file.

PUID=$(id -u) PGID=$(id -g) docker compose -f <(curl -L https://raw.githubusercontent.com/cocoindex-io/cocoindex-code/refs/heads/main/docker/docker-compose.yml) up -d

Runs the command against the services defined in the compose file.

> COCOINDEX_CODE_IMAGE=cocoindex/cocoindex-code:full docker compose up -d

Builds and starts all defined containers (server, database, etc.) at once, in the background.

> COCOINDEX_CODE_IMAGE=ghcr.io/cocoindex-io/cocoindex-code:latest docker compose up -d

Builds and starts all defined containers (server, database, etc.) at once, in the background.

docker run -d --name cocoindex-code \

Runs the built image as an actual container.

โœ… Run docker compose ps to check the containers are Up. If the README mentions a port, open http://localhost:PORT in your browser.

Pulled directly from this repo's README.

4. Python

Easy
Prerequisites
  • Git Needed to download the project code from GitHub.
  • Python 3 On Windows, be sure to check 'Add Python to PATH' during installation.
pip install .

Installs the package published on PyPI directly โ€” no need to clone the source.

python <์‹คํ–‰ํ•  ํŒŒ์ผ๋ช…>.py # README์—์„œ ์ •ํ™•ํ•œ ์‹คํ–‰ ํŒŒ์ผ๋ช…์„ ํ™•์ธํ•˜์„ธ์š”

Runs the Python script (or module).

โœ… If it runs without errors and prints output in the terminal, it worked.
// repository documentation