Skip to main content

Symbol lookup / search engine CLI

Project description

Pluk

Git-commit–aware symbol lookup & impact analysis engine

Pluk gives developers “go-to-definition”, “find-all-references”, and “blast-radius” impact queries across one or more Git repositories. Heavy lifting (indexing, querying, storage) runs in isolated Docker containers; a lightweight host CLI bootstraps and delegates commands.


Key Features

  • symbol search (pluk search) and definition lookup (pluk define)
  • Impact analysis (pluk impact) to trace downstream dependents via recursive CTEs & caching
  • Commit-aware indexing: evolves symbol graph across Git history (pluk diff)
  • Zero-friction install: pip install pluk + Docker & Compose
  • Containerized backend: PostgreSQL for the graph, Redis for cache
  • Single Python codebase: host shim (pluk.bootstrap) + container CLI (pluk.cli)

Quickstart

  1. Install

    pip install pluk
    

    Ensure Docker & Docker Compose are installed and your user can run docker.

  2. Bootstrap & index

    pluk init /path/to/your/repo
    

    Sets up containers and indexes the repo.

  3. Run queries

    pluk search MyClass         # search definitions & refs
    pluk define my_function      # show definition location
    pluk impact computeFoo        # trace downstream dependents
    pluk diff abc123 def456        # symbol changes between commits
    
  4. Manage services

    pluk start    # launch FastAPI server + worker
    pluk cleanup   # teardown Docker Compose stack
    

All commands run on the host; Pluk manages Docker Compose under ~/.pluk/docker-compose.yml by default.


Data Flow

Pluk’s host shim (pluk) writes a Compose file and delegates commands into the container CLI (plukd). Inside the container, plukd interacts with Postgres and Redis; results stream back to your terminal.


Architecture

[Host CLI: pluk] ── docker-compose ──▶ [Container: plukd]
                                    │
                                    ├─▶ Postgres (symbol graph)
                                    └─▶ Redis (cache)
  • pluk (host shim)

    • Writes and manages docker-compose.yml under ~/.pluk/
    • Forwards user commands into the container via docker compose exec
  • plukd (container CLI)

    • Implements init, search, define, impact, diff, start, cleanup
    • Parses repos, builds AST index, executes queries with SQL & Python
  • Postgres stores commits, symbol definitions, and reference links

  • Redis caches expensive recursive queries for sub-second responses


Development

# Clone & install in editable mode
git clone https://github.com/Jorstors/pluk.git
cd pluk
pip install -e .
  • Project layout (src/pluk):

    • bootstrap.py — host shim entrypoint (pluk)
    • cli.py — container CLI (plukd)
  • Entry points in pyproject.toml:

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

Testing

  • Unit tests for argument parsing and shim logic (pytest)
  • Integration tests invoking pluk init on a sample repo
pytest tests/

Note: Docker daemon must be running locally.


🔖 Versioning

We use bumpver for semantic versioning:

bumpver patch   # 0.1.0 → 0.1.1
bumpver minor    # 0.1.1 → 0.2.0
bumpver major     # 0.2.0 → 1.0.0

📄 License

Distributed under the MIT License. See LICENSE for details.

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.4.tar.gz (9.9 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.4-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pluk-0.3.4.tar.gz
  • Upload date:
  • Size: 9.9 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.4.tar.gz
Algorithm Hash digest
SHA256 6e542627e57a18eb3504a9913a745caa80702045b08b2956b7f0619abe6fcb5c
MD5 554cf6e08969252f9d680849520aced0
BLAKE2b-256 364853a425e8c30cede13c0d2b4bbd0cfbc8bf004930cd39d1f3d9381c56296f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pluk-0.3.4-py3-none-any.whl
  • Upload date:
  • Size: 8.4 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 41f5810f0882800a430b5b4bf887142d0139c5cb10794e2d75b22221147a0331
MD5 66bb708460faf72f91101647c48476d5
BLAKE2b-256 d7eb1aa410d71d5195177f880a9f62669742e1eaf7a2a0e738322a207af883b4

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