doclyft
v1.7.0
Published
CLI for DocLyft - Interactive documentation generator with hosted documentation support
Maintainers
Readme
DocLyft CLI 🚀
DocLyft CLI is an open-source, AI-powered documentation generator for your GitHub repositories. Analyze your codebase, generate comprehensive README files and full documentation suites, and push them directly to GitHub — all from your terminal.
Bring Your Own Model (BYOM) — you supply your own AI API key (OpenAI, Groq, Ollama, Azure, or any OpenAI-compatible endpoint). No subscriptions or per-generation costs imposed by the platform.
✨ Features
🤖 Bring Your Own Model (BYOM)
- Your own AI key — works with OpenAI, Groq, Together AI, Azure OpenAI, Ollama (local), and any OpenAI-compatible endpoint
- Interactive setup wizard —
doclyft ai setupguides you through key, base URL, and model selection with a live connection test - Team AI keys — team owners can configure a shared key so members don't need individual API keys
📝 AI-Powered Documentation
- Smart analysis — automatically analyze codebase structure, dependencies, and patterns
- Intelligent README generation — comprehensive, professional README files
- Multi-section docs — installation guides, API references, usage examples, and more
- Context-aware content — AI understands your project type and generates relevant documentation
🏢 Team Collaboration
- Team-aware repository access — team members access assigned repositories using only their API keys
- Owner token delegation — team repositories use the team owner's GitHub token automatically
- Role-based access — respects team permissions and repository assignments
📊 Interactive Features
- Interactive mode — full-featured interactive CLI with slash commands (
doclyft) - Repository browser — list and select from your accessible repositories
- Analysis history — view and reuse previous repository analyses
- Smart push options — interactive push with branch selection and commit customization
- Activity tracking — monitor your CLI usage and documentation generation history
🔄 Seamless Workflow
- One-command analysis:
doclyft analyze repo --repo owner/name - Instant generation:
doclyft generate readme - Direct push:
doclyft push --interactive - Branch detection: automatically detects main, master, develop, or any default branch
- Multiple export options: README, full docs, or pull request
🌐 Self-Hosted Support
- Point the CLI at your own Supabase instance via environment variables
- All help URLs adapt to your deployment automatically
📦 Installation
npm install -g doclyft🚀 Quick Start
1. Authenticate
doclyft login
# Enter your dk_prod_... API token from Settings → API Keys2. Configure your AI provider
doclyft ai setup
# Prompts for API key, base URL, model name — tests connection before saving3. Analyze a repository
doclyft analyze repo --repo owner/repository-name4. Generate documentation
doclyft generate readme # generates README.md
doclyft generate docs # generates full documentation suite5. Push to GitHub
doclyft push --interactive📋 Commands
Authentication
doclyft login # authenticate with your API token
doclyft logout # sign out and clear all credentials
doclyft status # show authentication status and configurationAI Provider
doclyft ai setup # configure API key, base URL, and model
doclyft ai status # show current AI provider configuration
doclyft ai test # test the configured AI connectionRepository Operations
doclyft repos # list your accessible repositories
doclyft analyze repo --repo <name> # analyze a specific repository
doclyft analyses # view previous analysesDocumentation Generation
doclyft generate readme # generate README.md
doclyft generate docs # generate comprehensive documentation
doclyft generate list # list available generated documentsPublishing
doclyft push # push documentation to repository
doclyft push --interactive # interactive push with options
doclyft push --branch <branch> # push to specific branch
doclyft push --export-type <type> # choose export type (readme/docs/pull-request)Hosted Documentation
doclyft hosting enable # enable hosted docs for current repo
doclyft hosting status # check hosting and deployment status
doclyft hosting deploy # manual deployment trigger
doclyft hosting config # manage auto-sync and custom domains
doclyft hosting list # list all hosted sites
doclyft hosting disable # disable hosting for current repoUtilities
doclyft interactive # start interactive mode with slash commands
doclyft history # view CLI activity history
doclyft config # manage CLI configuration
doclyft update # check for CLI updates
doclyft test # test connectivity and authentication🤖 AI Provider Setup
DocLyft works with any OpenAI-compatible API:
| Provider | Base URL | Example model |
|----------|----------|---------------|
| OpenAI | https://api.openai.com/v1 | gpt-4o-mini |
| Groq (free tier) | https://api.groq.com/openai/v1 | llama3-8b-8192 |
| Together AI | https://api.together.xyz/v1 | mistral-7b-instruct |
| Azure OpenAI | https://<resource>.openai.azure.com/... | gpt-4o |
| Ollama (local) | http://localhost:11434/v1 | llama3 |
# Run the setup wizard
doclyft ai setup
# Verify it's working
doclyft ai test🎯 Interactive Mode
doclyft interactive
# or just: doclyftAvailable slash commands:
/repos— browse repositories/analyze <repo>— quick repository analysis/generate— generate documentation/push— push to GitHub/history— view recent activities/help— show available commands/exit— exit interactive mode
🏢 Team Usage
For Team Members
- Get your API key from the DocLyft platform
- Login:
doclyft login - Browse assigned repositories:
doclyft repos - Analyze and generate — uses team owner's GitHub token automatically
- If your team owner has configured a shared AI key, no personal AI setup is needed
For Team Owners
- Invite team members through the DocLyft platform
- Assign repositories to team members
- Configure a shared team AI key: platform → Team → AI Settings
- Members can generate docs immediately
⚙️ Configuration
View current configuration
doclyft config listSet defaults
doclyft config set repo owner/repository-name
doclyft config set branch mainManual GitHub token setup (optional)
doclyft github-tokenConfiguration file location
- Windows:
%USERPROFILE%\.doclyft\config.json - macOS/Linux:
~/.doclyft/config.json
Environment variables
| Variable | Purpose |
|----------|---------|
| DOCLYFT_SUPABASE_URL | Supabase project URL for self-hosted deployments |
| DOCLYFT_SUPABASE_ANON_KEY | Supabase anon key for self-hosted deployments |
| DOCLYFT_DASHBOARD_URL | Base URL of your DocLyft web app |
| DOCLYFT_DOCS_URL | Base URL for documentation links |
Self-hosted example:
export DOCLYFT_SUPABASE_URL=https://yourproject.supabase.co
export DOCLYFT_SUPABASE_ANON_KEY=eyJhbG...
export DOCLYFT_DASHBOARD_URL=https://doclyft.mycompany.com
doclyft login🔍 Troubleshooting
AI API key not configured
doclyft ai setup # configure your key
doclyft ai test # verify connectionAuthentication problems
doclyft test-auth # test API key authentication
doclyft test # test full connectivityRepository access issues
doclyft repos # verify repository access
doclyft status # check authentication statusDocumentation generation
doclyft analyses # check previous analyses
doclyft history # view recent CLI activitiesGetting help
doclyft --help
doclyft <command> --help
doclyft ai --help
doclyft interactive🚦 Examples
Complete first-time workflow
doclyft login
doclyft ai setup
doclyft analyze repo --repo myorg/awesome-project
doclyft generate readme
doclyft push --interactiveUsing Groq (free)
doclyft ai setup
# Base URL: https://api.groq.com/openai/v1
# Model: llama3-8b-8192
# API key: get one free at https://console.groq.com
doclyft generate docsUsing Ollama locally
ollama pull llama3
doclyft ai setup
# Base URL: http://localhost:11434/v1
# Model: llama3
# API key: ollama (any non-empty string)
doclyft generate readmeTeam member workflow
doclyft login # use your team API key
doclyft repos # see assigned repos
doclyft analyze repo --repo teamorg/team-project
doclyft generate readme
doclyft push --branch develop🛠️ Requirements
- Node.js: 16.0.0 or higher
- npm: 7.0.0 or higher
- DocLyft account: on a hosted or self-hosted DocLyft instance
- AI API key: from any OpenAI-compatible provider (configured via
doclyft ai setup) - GitHub access: via DocLyft platform OAuth or manual token
📄 License
MIT License — see LICENSE for details.
🤝 Contributing
This project is open source. Contributions welcome via GitHub.
Generate better documentation with AI. Start with DocLyft CLI today! 🚀
