LLM-powered code documentation assistant
Project description
Docstra
Docstra is an LLM-powered tool for generating and querying codebase documentation. It ships as a CLI and also includes a small FastAPI app for browser-based workflows.
Install
Use the published CLI
uv tool install docstra
docstra --help
For one-off runs, you can also use uvx docstra --help.
Work on the repo locally
git clone https://github.com/jorgenosberg/docstra.git
cd docstra
uv sync
uv run docstra --help
The repo is pinned to Python 3.12 in .python-version. uv sync will create .venv and install the right interpreter if needed.
Configure
Docstra stores project-specific state in a .docstra/ directory at the root of the codebase you are indexing. That directory contains generated embeddings, indexes, and the local .env file used for provider credentials.
Run docstra init in the target repository to create or update that configuration:
uv run docstra init
Remember to keep .docstra/ out of version control.
Common commands
uv run docstra init
uv run docstra ingest
uv run docstra query "How does authentication work?"
uv run docstra chat
FastAPI app
Start the bundled FastAPI app from the repo with:
uv run uvicorn docstra.core.app:app --reload
The app will be available at http://127.0.0.1:8000.
Developer workflow
Use uv for the local environment and lockfile:
uv sync --locked --all-groups
uv lock --check
uv run --locked --no-sync ruff check .
uv run --locked --no-sync ruff format --check .
uv run --locked --no-sync ty check
uv audit --locked --ignore-until-fixed GHSA-rrmf-rvhw-rf47
uv run --locked --no-sync pytest
Install the Git hooks once per clone:
uv run pre-commit install
uv already defaults to the first-index resolution strategy. This repo pins that behavior explicitly in pyproject.toml so any future custom index setup still prefers the first matching index and avoids dependency-confusion fallback.
Documentation generator
The generator can build MkDocs output for another repository:
uv run docstra generate ./your-project --output ./docs --format mkdocs
cd ./docs
mkdocs serve
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 docstra-0.2.0.tar.gz.
File metadata
- Download URL: docstra-0.2.0.tar.gz
- Upload date:
- Size: 157.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
855b6058118d09e809e68a796bff6bb622387327990ff63c91b8410303eea216
|
|
| MD5 |
b4e6d83b0937e02e3bf5f8285ed9d29b
|
|
| BLAKE2b-256 |
b004cea4cac43ce5ee43c3ba26631441c71150b664c65185c4245111cc9860ec
|
File details
Details for the file docstra-0.2.0-py3-none-any.whl.
File metadata
- Download URL: docstra-0.2.0-py3-none-any.whl
- Upload date:
- Size: 189.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e491434ec57cfc139ea1dc772ea9214505313baa00e1ba781a31335ff09cc88e
|
|
| MD5 |
1a6700271ed2759e7c16aee2f46d2f21
|
|
| BLAKE2b-256 |
d74e6ebb5b4506ff1b5246748607aa5c6f6aec162f17deda57c6c7c20975576c
|