A local-first CLI engine for legacy codebases
Project description
Husk
Your codebase's past, present, and architecture—laid bare.
Understand legacy codebases quickly and privately with offline static analysis and local LLMs, without uploading code or fighting heavy setups.
❓ Why Husk?
Because code archaeology should be secure, local, and instant — without SaaS lock-in or platform-specific vector databases.
🚀 Key Features
- Static Analysis (Tier 1): Code complexity, git churn, hotspots rankings, dead code detection, and Mermaid dependency graph exports.
- Semantic AI (Tier 2): Hierarchical Map-Reduce documentation generator, token/budget limits, and natural language Q&A index with Git Blame annotations.
- Remote Git Scanning: Provide a Git clone link (
https://github.com/...) instead of a local directory, and Husk will automatically download and scan it temporarily. - Local Offline AI: Fully integrates with local Ollama servers (like
llama3) for offline, zero-cost semantic search and summarization.
📦 Quick Start
# Set up environment
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt && pip install -e .
# Configure LLM credentials (or select Ollama for local model)
husk init
# Scan a local folder or remote repository link
husk scan https://github.com/example/project.git --detailed
# Generate documentation suite statically or with AI
husk doc . --with-ai
# Query codebase using RAG
husk ask "how does authentication work?" https://github.com/example/project.git
🛠️ CLI Commands
husk scan [repo_path_or_url] [--detailed]: Inventory source files and code symbols.husk graph [repo_path_or_url] [--output path]: Export visual Mermaid dependency flows.husk hotspots [repo_path_or_url]: Rank files by complexity × churn risks.husk deadcode [repo_path_or_url]: List unreferenced files (in-degree = 0).husk init: Configure LLM credentials (OpenAI, Anthropic, Ollama).husk doc [repo_path_or_url] [--with-ai]: Generate structured documentation under/docs.husk ask "query" [repo_path_or_url]: Ask natural language questions with git blame context.
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 husk_local-0.1.0.tar.gz.
File metadata
- Download URL: husk_local-0.1.0.tar.gz
- Upload date:
- Size: 29.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e47f11f6e2a6d753170016215c9367b73651691f3b193e5d77bbf6f5b9cbb18a
|
|
| MD5 |
459863b28fdfded1266b3ca48d279fc7
|
|
| BLAKE2b-256 |
4fe1ee64deffba3a8e96ec1a26db5c7f8e6c76b025db7642d869ed1e81227797
|
Provenance
The following attestation bundles were made for husk_local-0.1.0.tar.gz:
Publisher:
publish.yml on khushalv21/HUSK
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
husk_local-0.1.0.tar.gz -
Subject digest:
e47f11f6e2a6d753170016215c9367b73651691f3b193e5d77bbf6f5b9cbb18a - Sigstore transparency entry: 2187825585
- Sigstore integration time:
-
Permalink:
khushalv21/HUSK@b5b423222d47a2f3a3de42dfd84cc00ae381b4c4 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/khushalv21
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b5b423222d47a2f3a3de42dfd84cc00ae381b4c4 -
Trigger Event:
release
-
Statement type:
File details
Details for the file husk_local-0.1.0-py3-none-any.whl.
File metadata
- Download URL: husk_local-0.1.0-py3-none-any.whl
- Upload date:
- Size: 29.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aeb0206367227b95e7fccead13be2a86a9e0553881c30daf2aea41503dd63563
|
|
| MD5 |
1bf7f4ebae7777772710b01c97cec307
|
|
| BLAKE2b-256 |
9edc5f9bfb2235541a5e6334576f0d4a4dd726b61074c79b1c2a5375dde4a569
|
Provenance
The following attestation bundles were made for husk_local-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on khushalv21/HUSK
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
husk_local-0.1.0-py3-none-any.whl -
Subject digest:
aeb0206367227b95e7fccead13be2a86a9e0553881c30daf2aea41503dd63563 - Sigstore transparency entry: 2187825595
- Sigstore integration time:
-
Permalink:
khushalv21/HUSK@b5b423222d47a2f3a3de42dfd84cc00ae381b4c4 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/khushalv21
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b5b423222d47a2f3a3de42dfd84cc00ae381b4c4 -
Trigger Event:
release
-
Statement type: