Wiki's for nerds, by nerds
Project description
Salt Docs CLI
Wiki's for nerds, by nerds
How it works
flowchart TD
subgraph Sources["Input Sources"]
GH[GitHub Repository]
Local[Local Directory]
end
subgraph Pipeline["Processing Pipeline"]
Crawl[Crawl Files<br/>Extract code structure]
Analyze[Analyze Structure<br/>Parse modules & classes]
Identify[Identify Abstractions<br/>LLM-powered analysis]
Generate[Generate Documentation<br/>Create markdown content]
end
subgraph Output["Documentation"]
Docs[Markdown Files<br/>Organized wiki structure]
end
subgraph MCP["MCP Server"]
Server[MCP Server<br/>Exposes docs as tools]
Tools["Tools:<br/>• list_docs<br/>• doc_id<br/>• get_docs"]
end
subgraph Consumers["AI Assistants"]
Cursor[Cursor]
Claude[Claude Desktop]
Continue[Continue.dev]
end
Sources --> Crawl
Crawl --> Analyze
Analyze --> Identify
Identify --> Generate
Generate --> Docs
Docs --> Server
Server --> Tools
Tools --> Cursor
Tools --> Claude
Tools --> Continue
style Sources fill:#e1f5ff
style Pipeline fill:#fff4e1
style Output fill:#e8f5e9
style MCP fill:#f3e5f5
style Consumers fill:#fce4ec
Installation
Option 1: Install from PyPI
pip install salt-docs
Option 2: Install from source
git clone https://github.com/itsjustmithun/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 directorylanguage: Default language for generated docsmax_abstractions: Default number of abstractions to identifymax_file_size: Maximum file size in bytesuse_cache: Enable/disable LLM response cachinginclude_patterns: Default file patterns to includeexclude_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
MCP Server Setup
Salt Docs includes an MCP (Model Context Protocol) server that exposes your generated documentation to AI assistants in IDEs like Cursor, Continue.dev, and Claude Desktop.
MCP Tools Available
The MCP server provides three tools:
list_docs- List all available documentation filesdoc_id- Get the ID/path for a specific documentation resourceget_docs- Fetch the full content of a documentation file
Setup Instructions
Cursor
-
Open or create your MCP configuration file:
- macOS/Linux:
~/.cursor/mcp.json - Windows:
%APPDATA%\Cursor\mcp.json
- macOS/Linux:
-
Add the salt-docs server configuration:
{
"mcpServers": {
"salt-docs": {
"command": "salt-docs",
"args": ["mcp"]
}
}
}
-
Restart Cursor to load the MCP server.
-
The AI assistant in Cursor can now access your documentation using tools like:
- "What documentation do we have?"
- "Get me the documentation for 'SALT project"
- "Read the README documentation"
Claude Desktop
-
Open or create your Claude configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
- macOS:
-
Add the salt-docs server configuration:
{
"mcpServers": {
"salt-docs": {
"command": "salt-docs",
"args": ["mcp"]
}
}
}
- Restart Claude Desktop to load the MCP server.
Troubleshooting
- Command not found: Make sure
salt-docsis in your PATH. You can verify by runningsalt-docs --versionin your terminal. - Server not starting: Ensure you've run
salt-docs initand have generated at least one documentation project. - No docs found: The MCP server discovers docs from your configured
output_dir. Runsalt-docs config showto check your output directory.
Testing the MCP Server
You can test the MCP server directly:
salt-docs mcp
This will start the server in stdio mode (for MCP clients). To test locally, you can use the test scripts in the tests/ directory.
CLI Options
Required
--repoor--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)
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 salt_docs-0.1.7.tar.gz.
File metadata
- Download URL: salt_docs-0.1.7.tar.gz
- Upload date:
- Size: 54.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11ecc9c8240befd9c7de1686250ca6a6eb877989646db2091de5fd10521ef1d2
|
|
| MD5 |
b7015951aed23af605547a6f9e6ba756
|
|
| BLAKE2b-256 |
8baead4099fe20a584261eee9529846c74db261bf694958e91765de249c27bed
|
File details
Details for the file salt_docs-0.1.7-py3-none-any.whl.
File metadata
- Download URL: salt_docs-0.1.7-py3-none-any.whl
- Upload date:
- Size: 52.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd9ca552e9e6ee0c62e160ff40507e22f1500514d10723c761914ea6130e440c
|
|
| MD5 |
f61f42e31d57555af1f59d37c2949406
|
|
| BLAKE2b-256 |
59ee3b8b27787184cbf9019fe529b6783eb117124d6f063e08348cb7aaf7a60d
|