Skip to main content

Code visualization for non-programmers

Project description

codedocent

Screenshot_2026-02-09_13-17-06

Code visualization for non-programmers.

A docent is a guide who explains things to people who aren't experts. Codedocent does that for code.

The problem

You're staring at a codebase you didn't write — maybe thousands of files across dozens of directories — and you need to understand what it does. Reading every file isn't realistic. You need a way to visualize the code structure, get a high-level map of what's where, and drill into the parts that matter without losing context.

Codedocent parses the codebase into a navigable, visual block structure and explains each piece in plain English. It's an AI code analysis tool — use a cloud provider for speed or run locally through Ollama for full privacy. Point it at any codebase and get a structural overview you can explore interactively, understand quickly, and share as a static HTML file.

Who this is for

  • Developers onboarding onto an unfamiliar codebase — get oriented in minutes instead of days
  • Non-programmers (managers, designers, PMs) who need to understand what code does without reading it
  • Solo developers inheriting legacy code — map out the structure before making changes
  • Code reviewers who want a high-level overview before diving into details
  • Security reviewers who need a structural map of an application
  • Students learning to read and navigate real-world codebases

What you see

Nested, color-coded blocks representing directories, files, classes, and functions — the entire structure of a codebase laid out visually. Each block shows a plain English summary, a pseudocode translation, and quality warnings (green/yellow/red). Click any block to drill down; breadcrumbs navigate you back up. You can export code from any block or paste replacement code back into the source file. AI explanations come from your choice of cloud provider or local Ollama.

Install

pip install codedocent

Requires Python 3.10+. Cloud AI needs an API key set in an env var (e.g. OPENAI_API_KEY). Local AI needs Ollama running. --no-ai skips AI entirely.

Quick start

codedocent                         # setup wizard — walks you through everything
codedocent /path/to/code           # interactive mode (recommended)
codedocent /path/to/code --full    # full analysis, static HTML output
codedocent --gui                   # graphical launcher
codedocent /path/to/code --cloud openai    # use OpenAI
codedocent /path/to/code --cloud groq      # use Groq
codedocent /path/to/code --cloud custom --endpoint https://my-llm/v1/chat/completions

How it works

Parses code structure with tree-sitter, scores quality with static analysis, and sends individual blocks to a cloud AI provider or local Ollama model for plain English summaries and pseudocode. Interactive mode analyzes on click — typically 1-2 seconds per block. Full mode analyzes everything upfront into a self-contained HTML file you can share.

AI options

  • Cloud AI — send code to OpenAI, OpenRouter, Groq, or any OpenAI-compatible endpoint. Fast, no local setup. Your code is sent to that service. API keys are read from env vars (OPENAI_API_KEY, OPENROUTER_API_KEY, GROQ_API_KEY, CODEDOCENT_API_KEY for custom endpoints).
  • Local AIOllama on your machine. Code never leaves your laptop. No API keys, no accounts.
  • No AI (--no-ai) — structure and quality scores only.

The setup wizard (codedocent with no args) walks you through choosing.

Supported languages

Full AST parsing for Python and JavaScript/TypeScript (functions, classes, methods, imports). File-level detection for 23 extensions including C, C++, Rust, Go, Java, Ruby, PHP, Swift, Kotlin, Scala, HTML, CSS, and config formats.

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

codedocent-0.5.0.tar.gz (55.9 kB view details)

Uploaded Source

Built Distribution

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

codedocent-0.5.0-py3-none-any.whl (45.4 kB view details)

Uploaded Python 3

File details

Details for the file codedocent-0.5.0.tar.gz.

File metadata

  • Download URL: codedocent-0.5.0.tar.gz
  • Upload date:
  • Size: 55.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for codedocent-0.5.0.tar.gz
Algorithm Hash digest
SHA256 6494a7fbb77d5490b6ca2df2bde0eef51ebd0a08a85afb12258972f88fcd5e54
MD5 eb9048f6b33caf5be45744b4b5baf5bb
BLAKE2b-256 207de47c8dfbeedfa82bbc6a821ee48273549f9a812f8fccb3a54f7b74f173ac

See more details on using hashes here.

File details

Details for the file codedocent-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: codedocent-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 45.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for codedocent-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ef343d0db35d6a390387346f478ab03f9718b3cd4a5b62be2bab4cbe14d50440
MD5 ea4b3e153450fc13f745bd84513154d0
BLAKE2b-256 c62d540661a0baedf82d0cb43cfc93dacf83f37980fde975f1faa92bf7b37b68

See more details on using hashes here.

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