Code wiki platform with AST graph analysis, GraphRAG, SQLite/PostgreSQL storage, and LiteLLM.
Project description
CodeWiki
简体中文 | Usage Guide | Changelog
CodeWiki is a single-user code intelligence platform for AST-based repository analysis, GraphRAG retrieval, source-grounded wiki generation, and LiteLLM-powered Q&A.
Screenshots
Highlights
- Analyze Python, TypeScript/TSX, JavaScript/JSX, Java, Go, Rust, C, C++, and C#.
- Build deterministic code graphs for imports, definitions, calls, routes, inheritance, source references, and configuration usage.
- Generate DeepWiki-style catalogs and pages with source citations, diagrams, translations, incremental updates, and browser-side exports.
- Ask GraphRAG-grounded questions through the Web UI, CLI, HTTP API, or MCP server.
- Use SQLite by default, or PostgreSQL with full-text search and optional pgvector vector search.
Quick Start
Install from PyPI:
pip install codewiki
codewiki serve
Open http://127.0.0.1:8000, register a repository, run analysis, then generate a
wiki or ask questions.
Run with Docker Compose:
docker compose up --build
The packaged Python app includes the built frontend. A source checkout is only needed for development or Docker-based local runs.
Common Commands
codewiki repos add . --name my-repo
codewiki analyze .
codewiki graphrag build . --embeddings
codewiki wiki catalog .
codewiki wiki pages .
codewiki ask --repo my-repo "How does the main workflow fit together?"
codewiki mcp
Most repository arguments accept an id, id prefix, registered name, path, or Git URL.
Use --json for machine-readable output.
Configuration
CodeWiki defaults to SQLite:
CODEWIKI_DATABASE_URL=sqlite+aiosqlite:///./data/codewiki.sqlite3
PostgreSQL is also supported:
CODEWIKI_DATABASE_URL=postgresql+psycopg://codewiki:codewiki@localhost:5432/codewiki
Configure LLM profiles with codewiki config or .env:
codewiki config
codewiki config --set CODEWIKI_LLM__DEFAULT__MODEL=openai/gpt-4.1
codewiki config --profile qa --model openai/gpt-4.1 --api-key "$OPENAI_API_KEY"
Documentation
- Usage Guide: installation, Docker, database setup, wiki workflow, LLM profiles, CLI, MCP, HTTP API, and supported languages.
- Design Notes: architecture and feature design.
- PostgreSQL Compatibility Design: storage compatibility, PostgreSQL FTS, and pgvector design.
- Benchmarking Guide and Benchmark Report: benchmark workflow and current results.
- Changelog: release history.
Development
make install
make start
make lint
make typecheck
make test
make build
Default local URLs:
- Backend:
http://127.0.0.1:8000 - Frontend:
http://127.0.0.1:5173
Python Typing
Python type checking uses mypy with a gradual configuration in pyproject.toml.
New public service, repository, API helper, and CLI helper functions should include
explicit parameter and return types. Prefer dataclasses, Pydantic models, TypedDict,
or Protocol over broad dict[str, Any] when data crosses module boundaries. Keep
Any near integration edges such as LLM JSON payloads, SQLAlchemy JSON columns, and
third-party parser output.
License
MIT
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
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 codewiki-0.5.1.tar.gz.
File metadata
- Download URL: codewiki-0.5.1.tar.gz
- Upload date:
- Size: 1.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08c4cae95792f7cb5302bbeded3da236e811b2aab229fde6dcc8a5c014cf8bd6
|
|
| MD5 |
d4af4e7af31125db07e63e34f59e9f5d
|
|
| BLAKE2b-256 |
3025339c8cc6270a175ffc8a2c1b6404ef6e8af3d89c034b9e716e6708686d33
|
Provenance
The following attestation bundles were made for codewiki-0.5.1.tar.gz:
Publisher:
publish-pypi.yml on PorunC/CodeWiki
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codewiki-0.5.1.tar.gz -
Subject digest:
08c4cae95792f7cb5302bbeded3da236e811b2aab229fde6dcc8a5c014cf8bd6 - Sigstore transparency entry: 1633105846
- Sigstore integration time:
-
Permalink:
PorunC/CodeWiki@733f676c994fe63de112afbbedebba84bb31e8cb -
Branch / Tag:
refs/tags/v0.5.1 - Owner: https://github.com/PorunC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@733f676c994fe63de112afbbedebba84bb31e8cb -
Trigger Event:
push
-
Statement type:
File details
Details for the file codewiki-0.5.1-py3-none-any.whl.
File metadata
- Download URL: codewiki-0.5.1-py3-none-any.whl
- Upload date:
- Size: 1.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bdaf83cf37ab86b0de2a1562f68ab921d900e5159b21f5860e4de32ea5f71827
|
|
| MD5 |
c1f8d6e4e18942d65959b4d00de24be1
|
|
| BLAKE2b-256 |
47eb6c1cbecde5b8af2598c7457e98eddd98bd9060e5e20ea15cb0e6cc4081df
|
Provenance
The following attestation bundles were made for codewiki-0.5.1-py3-none-any.whl:
Publisher:
publish-pypi.yml on PorunC/CodeWiki
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codewiki-0.5.1-py3-none-any.whl -
Subject digest:
bdaf83cf37ab86b0de2a1562f68ab921d900e5159b21f5860e4de32ea5f71827 - Sigstore transparency entry: 1633105863
- Sigstore integration time:
-
Permalink:
PorunC/CodeWiki@733f676c994fe63de112afbbedebba84bb31e8cb -
Branch / Tag:
refs/tags/v0.5.1 - Owner: https://github.com/PorunC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@733f676c994fe63de112afbbedebba84bb31e8cb -
Trigger Event:
push
-
Statement type: