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 Docker containers; a lightweight host shim (pluk) boots the stack and delegates commands into a thin CLI container (plukd) that talks to an internal API.
Key Features
- Symbol search (
pluk search) and definition lookup (pluk define) - Impact analysis (
pluk impact) to trace downstream dependents - Commit-aware indexing (
pluk diff) across Git history - Containerized backend: PostgreSQL (graph) + Redis (broker/cache)
- Strict lifecycle:
pluk startis required before any commands - Host controls:
pluk statusto check,pluk cleanupto stop services
Quickstart
- Install
pip install pluk
- Start services (required)
pluk start
This creates/updates ~/.pluk/docker-compose.yml, pulls latest images, and brings up: postgres, redis, api (FastAPI), worker (Celery), and cli (idle exec target). The API stays internal to the Docker network.
- Index and query
pluk init /path/to/repo # index a git repository (API→Redis→Celery→Postgres)
pluk search MyClass # symbol search; lists refs (API→Postgres, uses cache)
pluk define my_function # define a symbol; prints definition + file:line@commit
pluk impact computeFoo # blast-radius; downstream dependents (cached; recomputed on demand)
pluk diff abc123 def456 # show differences for a symbol (between commits)
- Check / stop (host-side)
pluk status # tells you if services are running
pluk cleanup # stops services (containers stay; fast restart)
If you want a full teardown (remove containers/network), use:
docker compose -f ~/.pluk/docker-compose.yml down
Data Flow
How it works
- Host shim (
pluk) writes the Compose file, pulls images, and runsdocker compose up. - CLI container (
plukd) is the exec target; it calls the API athttp://api:8000. - API (FastAPI) serves read endpoints (
/search,/define,/impact,/diff) and enqueues write jobs (/reindex) to Redis. - Worker (Celery) consumes jobs from Redis, clones/pulls repos into a volume (
/var/pluk/repos), parses deltas, and writes to Postgres. - Reads never block on indexing; write progress can be polled via job status endpoints (planned).
Architecture (current)
- Single image, multiple roles: Compose selects per-service
commandapi→uvicorn pluk.api:app --host 0.0.0.0 --port 8000worker→celery -A pluk.worker worker -l infocli→sleep infinity(keeps container up fordocker compose exec)
- Internal networking: API is not exposed to the host; CLI calls it over Docker DNS (
PLUK_API_URL=http://api:8000). - Config:
PLUK_DATABASE_URL,PLUK_REDIS_URLinjected via Compose; worker usesPLUK_REPOS_DIR=/var/pluk/repos. - Images: by default the shim uses
jorstors/pluk:latest,postgres:16-alpine, andredis-alpine
Development
- Project layout (
src/pluk):shim.py— host shim entrypoint (pluk)cli.py— container CLI (plukd)api.py— FastAPI app (internal API)worker.py— Celery app & tasks
- Entry points (
pyproject.toml):
[project.scripts]
pluk = "pluk.shim:main"
plukd = "pluk.cli:main"
Testing
pytest
Docker must be running; services must be started via pluk start for integration tests.
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pluk-0.3.7.tar.gz.
File metadata
- Download URL: pluk-0.3.7.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b46330e0a8af2495cd05329251a519da5893ad187d0ec3504880362df37f8133
|
|
| MD5 |
1e7de895734516a49010702a76d6184f
|
|
| BLAKE2b-256 |
d15dbc86e91d373981a475c1e77eff2502205bf8a183edabef5038b1efe9e0bb
|
File details
Details for the file pluk-0.3.7-py3-none-any.whl.
File metadata
- Download URL: pluk-0.3.7-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dcbe7b351d105c53613a87a70777e1d415136cbc195e0753f52bc6f1753a7d87
|
|
| MD5 |
63d55b43f9a26cce83a74e60531c0e76
|
|
| BLAKE2b-256 |
48dc381a83d1df102961a5a111cbb069715fdad7d0a833def10cafaf6625bcac
|