Skip to main content

Symbol lookup / search engine CLI

Project description

Pluk

Pluk is a git-commit–aware, backend-first symbol lookup and cross-reference engine with impact analysis. It helps developers explore and refactor large codebases by indexing symbol definitions and usages across one or more Git repositories.

Designed for clarity, speed, and developer ergonomics, Pluk runs as a simple CLI tool on the host, while all heavy computation (indexing, querying, storage) runs in isolated Docker containers.

Features

  • Symbol search and definition lookup
  • Git commit–aware cross-reference indexing
  • Impact analysis of symbol usage across history
  • Fully containerized backend (Postgres + Redis)
  • Pip-installable host CLI
  • Single unified Python codebase for host shim and CLI core

Installation

pip install pluk

Ensure Docker and Docker Compose are installed and running on your machine.

Usage

# Initialize and index a repository
pluk init ~/myrepo

# Search for a symbol
pluk search MyClass

# Show where a symbol is defined
pluk define my_function

# Show usage/impact of a symbol
pluk impact my_function

# Show changes to a symbol across commits
pluk diff abc123 def456 --symbol SomeClass

All commands are executed from the host. Pluk automatically starts the necessary backend services in Docker under the hood.


Data Flow

Pluk uses the host shim (pluk) to forward commands into a running container where the core CLI (plukd) executes. The plukd CLI interacts with Postgres and Redis over Docker’s internal network. Output is streamed back to the host terminal.


Architecture

  • pluk (host shim): Ensures the container stack is up and forwards CLI calls via docker compose exec.
  • plukd (real CLI): Executes commands inside the container using the indexed symbol graph.
  • Postgres: Stores the symbol graph, commits, and metadata.
  • Redis: Caches results of expensive queries like impact analysis.

Development

Project structure:

src/pluk/
├── bootstrap.py     # Host shim
├── cli.py           # Container CLI logic

Entry points (in pyproject.toml):

[project.scripts]
pluk = "pluk.bootstrap:main"
plukd = "pluk.cli:main"

Build and run:

pip install -e .
pluk init .

Tests

  • Unit tests for CLI and shim logic
  • Integration test: pluk init on toy repo
  • Requires Docker daemon running locally

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pluk-0.3.1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pluk-0.3.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file pluk-0.3.1.tar.gz.

File metadata

  • Download URL: pluk-0.3.1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for pluk-0.3.1.tar.gz
Algorithm Hash digest
SHA256 6be7a6d7deb102ac2428d1d0715938b9ac0e8f18aaf128ad7b80e69e53f1a74d
MD5 4489c377d127fea1e9d3d7022754636f
BLAKE2b-256 aeff8ac22b2856f438f73899169df4387bc6761a645d6f5529e71bf2f8a85008

See more details on using hashes here.

File details

Details for the file pluk-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: pluk-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for pluk-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a1179bc51ff30352c897e6f7f5e97766db09f17cb40c972040fe881e14bd0a67
MD5 121b2fb42b9c8c995dcc24254abfea32
BLAKE2b-256 a192ba21046402933a2cce91a93450b745c2b30a1b1ce4032282194ab154b345

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page