Skip to main content

Gavlix Docs

Universal documentation engine for software repositories. Scans source files, understands structure, and generates architecture documentation, workflow diagrams, API notes, and developer guidance.

1. Overview

Gavlix Docs is a universal CLI tool that works on any codebase regardless of framework or structure. It behaves like eslint, prettier, and black — detecting patterns dynamically and generating complete documentation without hardcoding assumptions about Flask, Django, React, Next.js, or any specific framework.

Problem It Solves

Understanding a new codebase is expensive. Gavlix Docs turns repository structure into clear documentation that developers, reviewers, and AI agents can consume without manually reading every file.

Supported Languages

  • Python (AST-based parsing)
  • JavaScript / TypeScript (regex-based parsing)
  • HTML / CSS
  • JSON / YAML
  • SQL (DDL parsing)
  • Markdown

2. Features

  • Auto documentation — Generates root README, module READMEs, and detailed docs
  • Architecture diagrams — Mermaid diagrams for dependency, workflow, database, and architecture
  • Database analysis — ORM detection (SQLAlchemy, Django, Tortoise, Peewee, Pony, SQLModel), table mapping, relationship detection
  • Plugin system — Auto-registration, isolation, install/remove/list
  • Incremental analysis — File hashing, change detection, cache reuse
  • Dry-run mode — Preview changes without writing files
  • Error isolation — Parse failures skip files safely, never crash
  • Strict validation — Enforces completeness before finishing
  • VS Code integration — Commands, sidebar, output panel
  • HTTP API — FastAPI server for VS Code and web dashboard integration

3. Installation

From PyPI

pip install gavlix-docs

From Source

git clone https://github.com/gavlix/gavlix-docs.git
cd gavlix-docs
pip install -e ".[dev]"

Verify Installation

gavlix-docs --version

4. Usage

Generate Documentation

gavlix-docs generate .

Generate documentation for the current directory. Creates:

  • README.md — Root system documentation
  • docs/ — Detailed documentation (architecture, database, security, deployment, API, workflows)
  • docs/adr/ — Architecture Decision Records
  • diagrams/ — Mermaid diagram source files
  • modules/<name>/README.md — Per-module documentation

Analyze Without Writing

gavlix-docs analyze .

Analyze repository structure without generating documentation files.

Validate Documentation

gavlix-docs validate .

Validate that all required documentation files and sections exist.

Watch Mode

gavlix-docs watch .

Monitor file changes and automatically update documentation.

Dry Run

gavlix-docs generate . --dry-run

Preview what files would be written without actually writing them.

Strict Mode

gavlix-docs generate . --strict

Fail if validation finds any missing documentation.

Disable Cache

gavlix-docs generate . --no-cache

Force fresh analysis without using cached results.

Start API Server

gavlix-docs serve

Start the FastAPI server for VS Code extension and web dashboard integration.

Plugin Management

gavlix-docs plugin list
gavlix-docs plugin install <name>
gavlix-docs plugin remove <name>

5. Configuration

Create a gavlix.config.yaml in your project root:

ignore:
  - node_modules
  - .git
  - dist
  - .next

entry_points:
  - app.py
  - main.ts

documentation:
  strict: true
  include_private: false

analysis:
  incremental: true

database:
  orm: auto-detect

diagrams:
  enabled: true
  format: mermaid

plugins:
  enabled: true
  directory: .gavlix/plugins

6. VS Code Extension

Installation

  1. Install the VS Code extension from the marketplace (search "Gavlix Docs")
  2. Or build from source:
cd extensions/vscode-extension
npm install
npm run compile
vsce package

Commands

Command Description
gavlix.generateDocs Generate documentation for the workspace
gavlix.analyzeProject Analyze project structure
gavlix.validateDocs Validate documentation completeness
gavlix.watchDocs Watch and auto-update documentation
gavlix.stopWatch Stop watch mode

Configuration

{
  "gavlix.useApi": false,
  "gavlix.apiUrl": "http://127.0.0.1:8000",
  "gavlix.strict": false,
  "gavlix.outputDir": "docs_output"
}

7. Plugin Development

Plugin Interface

export interface GavlixPlugin {
  name: string;
  version: string;
  analyzers?: Analyzer[];
  generators?: Generator[];
}

Python Plugin SDK

from plugins.sdk import BasePlugin, PluginMetadata

class MyPlugin(BasePlugin):
    def __init__(self):
        super().__init__(PluginMetadata(
            name="my-plugin",
            version="1.0.0",
            description="Custom analyzer plugin",
            capabilities=["analyzer"],
        ))

    def run(self, context):
        # Custom analysis logic
        return {"status": "ok", "result": "custom analysis"}

Install a Plugin

gavlix-docs plugin install my-plugin

8. Architecture Overview

Pipeline Flow

Scan Project → Parse All Files → Build Code Model → Build Dependency Graph
    ↓
Detect Entry Points → Infer Workflows → Analyze Database Layer
    ↓
Analyze Security Layer → Analyze Deployment Layer
    ↓
Generate Diagrams → Generate Documentation → Validate Completeness
    ↓
Write Files

Architecture Diagram

graph TB
    A[CLI / API / VS Code] --> B[GavlixOrchestrator]
    B --> C[ProjectAnalyzer]
    C --> D[ArchitectureMapper]
    D --> E[DependencyMapper]
    B --> F[DatabaseAnalyzer]
    B --> G[SecurityAnalyzer]
    B --> H[DeploymentAnalyzer]
    B --> I[WorkflowBuilder]
    B --> J[Generators]
    J --> K[ReadmeGenerator]
    J --> L[ModuleReadmeGenerator]
    J --> M[DiagramGenerator]
    J --> N[DocumentationBundle]
    B --> O[DocumentationValidator]
    O --> P[SafeWriter]
    P --> Q[Output Files]

Why This Architecture

  • Modular: Each analyzer, generator, and validator is independent
  • Scalable: Incremental analysis with file hashing and caching
  • Language-agnostic: Parsers are pluggable per file extension
  • Error-isolated: Parse failures skip files, never crash the system
  • Extensible: Plugin system with auto-registration and isolation

Key Components

Component Purpose
gavlix_docs/cli.py CLI with isolated command handlers, exit codes, error handling
gavlix_docs/orchestrator.py Coordinates the full pipeline
gavlix_docs/analyzers/ Project analysis and structure discovery
gavlix_docs/generators/ Markdown and Mermaid output generation
gavlix_docs/validators/ Output validation and completeness checks
gavlix_docs/cache/ Disk-based cache with file-level change detection
gavlix_docs/config/ Configuration loading and validation
gavlix_docs/plugins.py Plugin registry with auto-registration and isolation
gavlix_docs/api.py FastAPI server for VS Code and web integration

9. API

The FastAPI server exposes:

Method Route Description
GET /health Health check
GET /status System status with validation result
POST /analyze Analyze a project
POST /generate Generate documentation
GET /api/overview Project overview with statistics
GET /api/modules List all modules
GET /api/graph Dependency graph
GET /api/workflows Inferred workflows
GET /api/database Database schema
GET /api/security Security findings
GET /api/deployment Deployment info
GET /api/metrics System metrics

10. Testing

# Run all tests
pytest tests/

# Run with coverage
pytest tests/ --cov=gavlix_docs

# Run specific test file
pytest tests/test_cli.py

11. License

MIT License — see LICENSE.

Download files

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

Source Distribution

gavlix_docs-0.1.1.tar.gz (72.6 kB view details)

Uploaded Source

Built Distribution

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

gavlix_docs-0.1.1-py3-none-any.whl (113.4 kB view details)

Uploaded Python 3

File details

Details for the file gavlix_docs-0.1.1.tar.gz.

File metadata

  • Download URL: gavlix_docs-0.1.1.tar.gz
  • Upload date:
  • Size: 72.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.15.0b3

File hashes

Hashes for gavlix_docs-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9f7bb0694880f4bf86abc89361539c2ff67c14c0064a604834e376c999941d44
MD5 70f82660d6f916bd26b7a9718477c240
BLAKE2b-256 f028e45a4fbac1732d768eab5fbf0c2709ec85620531b67efa9c5a2b9f89b2c7

See more details on using hashes here.

File details

Details for the file gavlix_docs-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: gavlix_docs-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 113.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.15.0b3

File hashes

Hashes for gavlix_docs-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9d6d181eed3a80f9bc04dca9b47c193197becd1579c94b0d0b24908b5e3c3ba3
MD5 d54b570f319a63468c1df9eef88a7edd
BLAKE2b-256 8ce5027a9bfc6be7a047353409850c52c48b1c7ae1fc13ca3352a9e2904693d8

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