Skip to main content

Intelligent codebase analysis and documentation generation tool

Project description

Salt Docs CLI

AI-powered tool that analyzes codebases and generates beginner-friendly documentation.

How it works

flowchart LR
    A[Codebase] --> B[Crawl Files]
    B --> C[Analyze Structure]
    C --> D[Identify Abstractions]
    D --> E[Generate Tutorials]
    E --> F[Markdown Docs]

Installation

Option 1: Install from PyPI

pip install salt-docs

Option 2: Install from source

git clone https://github.com/your-org/salt-docs-cli.git
cd salt-docs-cli
pip install -e .

Quick Start

1. Initial Setup

Run the setup wizard to configure your API keys and preferences:

salt-docs init

This will:

  • Prompt for your Gemini API key
  • Optionally ask for GitHub token (for private repos)
  • Set default output location (~/Documents/Salt Docs)
  • Configure other preferences

2. Generate Documentation

Analyze GitHub repository

salt-docs --repo https://github.com/username/repo

Analyze local directory

salt-docs --dir /path/to/your/codebase

With custom options

salt-docs --repo https://github.com/username/repo --output /custom/path --language spanish --max-abstractions 15

Configuration

Salt Docs stores configuration in ~/Documents/Salt Docs/.salt/config.json and uses your system's keyring for secure API key storage.

Configuration Options

  • output_dir: Default output directory
  • language: Default language for generated docs
  • max_abstractions: Default number of abstractions to identify
  • max_file_size: Maximum file size in bytes
  • use_cache: Enable/disable LLM response caching
  • include_patterns: Default file patterns to include
  • exclude_patterns: Default file patterns to exclude

Managing Configuration

View Current Configuration

salt-docs config show

Update API Keys

# Update Gemini API key (interactive)
salt-docs config update-gemini-key

# Update Gemini API key directly
salt-docs config update-gemini-key "your-api-key-here"

# Update GitHub token (interactive)
salt-docs config update-github-token

# Update GitHub token directly
salt-docs config update-github-token "your-token-here"

Update Other Settings

# Change default language
salt-docs config set language spanish

# Change max abstractions
salt-docs config set max_abstractions 15

# Disable caching
salt-docs config set use_cache false

# Update output directory
salt-docs config set output_dir /custom/path

CLI Options

Required

  • --repo or --dir - GitHub repo URL or local directory path

Optional

  • -n, --name - Project name (derived from repo/directory if omitted)
  • -t, --token - GitHub personal access token
  • -o, --output - Output directory (overrides config default)
  • -i, --include - File patterns to include (e.g., ".py", ".js")
  • -e, --exclude - File patterns to exclude (e.g., "tests/", "docs/")
  • -s, --max-size - Maximum file size in bytes (default: 100KB)
  • --language - Language for generated docs (default: "english")
  • --no-cache - Disable LLM response caching
  • --max-abstractions - Maximum number of abstractions to identify (default: 10)

Migration from Old Version

If you were using the old python main.py approach:

  1. Install the new CLI: pip install -e .
  2. Run setup: salt-docs init
  3. Use the new commands: salt-docs --repo <url>

The old approach is no longer supported - please use the new CLI commands.

Development

Setup for Development

git clone https://github.com/your-org/salt-docs-cli.git
cd salt-docs-cli
pip install -e .
salt-docs init

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

salt_docs-0.1.3.tar.gz (37.0 kB view details)

Uploaded Source

Built Distribution

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

salt_docs-0.1.3-py3-none-any.whl (40.5 kB view details)

Uploaded Python 3

File details

Details for the file salt_docs-0.1.3.tar.gz.

File metadata

  • Download URL: salt_docs-0.1.3.tar.gz
  • Upload date:
  • Size: 37.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for salt_docs-0.1.3.tar.gz
Algorithm Hash digest
SHA256 058560392fbc392e25810c272f0447d65cadc9dcfdcd0c335e79fcf093ae53d1
MD5 97a111b15205edb2a07f17cd0a154144
BLAKE2b-256 b883eaf3816d39b2d522cd30ccd9d724ca9bc98729691a94b7efbe41088b9a51

See more details on using hashes here.

File details

Details for the file salt_docs-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: salt_docs-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 40.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for salt_docs-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 74494d63d33d2090330064d6bb74639790fb00a49ed63e0d377754f238cb36e0
MD5 fa8e9035ad1ae0e11c542f91fbe0d91c
BLAKE2b-256 6af1cf8b8ee329c5e3c6c3782c0929be7a05748b9bf86595a6859aaa24216b78

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