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.3.tar.gz (6.8 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.3-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pluk-0.3.3.tar.gz
  • Upload date:
  • Size: 6.8 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.3.tar.gz
Algorithm Hash digest
SHA256 97c606f1a8508d6b2652c8e63b67e1546ebbf861e5b07892892bf185bd0f350f
MD5 c3b5714775e77870383d0897c5d768c8
BLAKE2b-256 020b32a0e5ddfce68ed3a4ab00d5bd6c6b0f22f32de653546a941df0848a9d25

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pluk-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 7.0 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7a582fe3e76c6375461b3d6fe949a9edab7a4b4f5b24b5798eaee9608908d717
MD5 b69363cb11efa565aade74fea6689c17
BLAKE2b-256 2f6662e052fa420199ba14fdfa2be9fc866de147c725e4a3fc3b94fb5709675a

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