Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

husk_local-0.1.0.tar.gz (29.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

husk_local-0.1.0-py3-none-any.whl (29.5 kB view details)

Uploaded Python 3

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

Hashes for husk_local-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e47f11f6e2a6d753170016215c9367b73651691f3b193e5d77bbf6f5b9cbb18a
MD5 459863b28fdfded1266b3ca48d279fc7
BLAKE2b-256 4fe1ee64deffba3a8e96ec1a26db5c7f8e6c76b025db7642d869ed1e81227797

See more details on using hashes here.

Provenance

The following attestation bundles were made for husk_local-0.1.0.tar.gz:

Publisher: publish.yml on khushalv21/HUSK

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for husk_local-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aeb0206367227b95e7fccead13be2a86a9e0553881c30daf2aea41503dd63563
MD5 1bf7f4ebae7777772710b01c97cec307
BLAKE2b-256 9edc5f9bfb2235541a5e6334576f0d4a4dd726b61074c79b1c2a5375dde4a569

See more details on using hashes here.

Provenance

The following attestation bundles were made for husk_local-0.1.0-py3-none-any.whl:

Publisher: publish.yml on khushalv21/HUSK

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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