Docjays CLI
Command-line tool for managing documentation sources in your projects while keeping them separate from your main codebase.
What is Docjays CLI?
Docjays CLI is a command-line tool that helps you manage documentation sources in your projects. Perfect for client projects where you want to maintain company standards, API docs, and architecture references without committing them to the client's repository.
- Clone & Sync - Pull documentation from Git repos, HTTP URLs, or local paths
- MCP Integration - Expose docs to Claude via Model Context Protocol
- Auto-Sync - Keep documentation up-to-date automatically
- Multi-Source - Manage multiple documentation sources
- Git-Ignored - Keeps .docjays/ out of your repository
Installation
From npm (Recommended)
Install Docjays CLI globally via npm:
# Install globally
npm install -g docjays
# Verify installation
docjays --versionOr use without installation:
npx docjays initFor Development
Install from local repository:
git clone https://github.com/techjays/ai-summit.git
cd ai-summit/packages/docjays-cli
npm install
npm run build
npm linkQuick Start
# Step 1: Login to Docjays (one-time setup)
docjays login
# Opens browser → Login with your docjays account
# Step 2: Initialize project
docjays init
# ✓ Project created + API key auto-generated
# Step 3: Link to cloud project (optional but recommended)
docjays link
# ✓ Select existing project or create new one
# Step 4: Add documentation sources
docjays add-source --name company-docs --type git --url https://github.com/myorg/docs
docjays add-source --name api-specs --type git --url https://github.com/myorg/api-specs
# Step 5: Sync documentation
docjays sync
# Step 6: Start MCP server
docjays serve
# Your docs are now available to AI assistants!Local-Only Mode: Don't need cloud features? Use docjays init --offline to work completely offline.
Commands
login
Login to your docjays account (one-time setup)
docjays loginExample:
docjays loginwhoami
Show current login status
docjays whoamiExample:
docjays whoamilogout
Remove global authentication token
docjays logoutExample:
docjays logoutinit
Initialize Docjays in your project (auto-generates API key)
docjays init [options]Options:
-n, --name <name>- Project name (default: folder name)--offline- Initialize without cloud (local-only)-y, --yes- Skip prompts and use defaults--no-gitignore- Skip updating .gitignore
Example:
docjays init --name my-projectlink
Link local .docjays to a cloud project (or create new)
docjays link [options]Options:
-p, --project <id>- Project ID to link to directly
Example:
docjays linkunlink
Disconnect from cloud project (switch to local-only mode)
docjays unlink [options]Options:
-f, --force- Skip confirmation prompt
Example:
docjays unlinkmigrate
Discover and migrate existing documentation to .docjays
docjays migrate [options]Options:
--auto- Automatically migrate all found docs without prompts--move- Move files instead of copying (default: copy)--dry- Dry run - show what would be migrated
Example:
docjays migrate --drycreate-skills
Create skills.md file for AI agent instructions
docjays create-skills [options]Options:
-o, --output <file>- Output to specific file (default: skills.md)-f, --force- Overwrite if exists-m, --merge- Append to existing file-p, --print- Print template without creating file
Example:
docjays create-skillsadd-source
Add a documentation source
docjays add-source [options]Options:
-n, --name <name>- Source name (required)-t, --type <type>- Source type: git, http, local (required)-u, --url <url>- Source URL or path (required)-b, --branch <name>- Git branch (default: main)--no-sync- Don't sync after adding
Example:
docjays add-source --name company-docs --type git --url https://github.com/myorg/docssync
Sync documentation from all sources
docjays sync [options]Options:
-s, --source <name>- Sync specific source only-f, --force- Force re-clone (delete and clone fresh)
Example:
docjays sync --source company-docsserve
Start MCP server for Claude integration
docjays serve [options]Options:
--stdio- Use stdio transport (default)-p, --port <port>- Port for HTTP transport (future)
Example:
docjays servestatus
Show Docjays status and statistics
docjays status [options]Options:
--json- Output as JSON
Example:
docjays statuslist-sources
List all configured documentation sources
docjays list-sources [options]Options:
--enabled- Show only enabled sources--disabled- Show only disabled sources--json- Output as JSON
Example:
docjays list-sources --enabledclean
Clean cache, logs, or remove entire .docjays folder
docjays clean [options]Options:
--cache- Clean cache only--logs- Clean logs only--all- Remove entire .docjays folder-f, --force- Skip confirmation prompt
Example:
docjays clean --cachewatch
Watch and auto-sync documentation at regular intervals
docjays watch [options]Options:
-i, --interval <time>- Sync interval (e.g., 1h, 30m, 5m) (default: 30m)--sync-now- Sync immediately on start
Example:
docjays watch -i 1h --sync-nowpush
Push local documentation to cloud project
docjays push [options]Options:
-n, --dry-run- Preview what would be pushed without making changes-f, --force- Push all files even if unchanged
Example:
docjays push --dry-runComing Soon
The following commands are planned for upcoming releases:
projects
plannedManage cloud projects from CLI
docjays projects list
docjays projects info
docjays projects switch <id>api-keys
plannedManage API keys for your projects
docjays api-keys list
docjays api-keys create "CI/CD"
docjays api-keys revoke <id>team
plannedView team members for your project
docjays team list
docjays team list --jsonMCP Integration
To use Docjays CLI with Claude Desktop, add this to your MCP settings:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"docjays-cli": {
"command": "docjays",
"args": ["serve", "--stdio"],
"env": {}
}
}
}After updating the config, restart Claude Desktop. Docjays will expose your local documentation to Claude via MCP.
Authentication
Global Login
Login once to connect your CLI to your docjays account:
# Login with email/password
docjays login
# Check login status
docjays whoami
# Logout
docjays logoutYour login token is stored securely in ~/.docjays/auth.json and works across all your projects.
Project API Keys
Each project gets its own API key automatically when you run docjays init:
cd my-project
docjays init
# ✓ Project created
# ✓ API Key generated: djkey_proj_abc123_xyz
# ✓ Saved to .docjays/config.jsonThe API key is used for MCP server authentication and all operations on this project.
Working with Private Repositories
For private repositories, store credentials locally:
# Add credential (e.g., GitHub token)
docjays auth add my-token --type token
# Use credential with source
docjays add-source --name private-docs \
--type git \
--url https://github.com/myorg/private-docs \
--auth my-token
# Sync
docjays syncCredentials are encrypted and stored in .docjays/config.json
Common Use Cases
Client Project Development
Keep company coding standards and API docs separate from client repositories
docjays init
docjays add-source --name company-standards --type git --url https://github.com/mycompany/standards
docjays add-source --name api-docs --type git --url https://github.com/mycompany/api-docs
docjays watch -i 1hFeature-First Development
Manage feature specifications and architecture docs
docjays init
docjays add-source --name feature-specs --type local --url ./docs/features
docjays serveMulti-Repo Documentation
Aggregate documentation from multiple repositories
docjays add-source --name frontend-docs --type git --url https://github.com/org/frontend
docjays add-source --name backend-docs --type git --url https://github.com/org/backend
docjays add-source --name api-specs --type http --url https://api.example.com/specs.json
docjays syncNext Steps
Was this page helpful?