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:

bash
# Install globally
npm install -g docjays

# Verify installation
docjays --version

Or use without installation:

bash
npx docjays init

For Development

Install from local repository:

bash
git clone https://github.com/techjays/ai-summit.git
cd ai-summit/packages/docjays-cli
npm install
npm run build
npm link

Quick Start

bash
# 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 login

Example:

docjays login

whoami

Show current login status

docjays whoami

Example:

docjays whoami

logout

Remove global authentication token

docjays logout

Example:

docjays logout

init

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-project

link

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 link

unlink

Disconnect from cloud project (switch to local-only mode)

docjays unlink [options]

Options:

  • -f, --force - Skip confirmation prompt

Example:

docjays unlink

migrate

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 --dry

create-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-skills

add-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/docs

sync

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-docs

serve

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 serve

status

Show Docjays status and statistics

docjays status [options]

Options:

  • --json - Output as JSON

Example:

docjays status

list-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 --enabled

clean

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 --cache

watch

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-now

push

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-run

Coming Soon

The following commands are planned for upcoming releases:

projects

planned

Manage cloud projects from CLI

bash
docjays projects list
docjays projects info
docjays projects switch <id>

api-keys

planned

Manage API keys for your projects

bash
docjays api-keys list
docjays api-keys create "CI/CD"
docjays api-keys revoke <id>

team

planned

View team members for your project

bash
docjays team list
docjays team list --json

MCP 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

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:

bash
# Login with email/password
docjays login

# Check login status
docjays whoami

# Logout
docjays logout

Your 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:

bash
cd my-project
docjays init
# ✓ Project created
# ✓ API Key generated: djkey_proj_abc123_xyz
# ✓ Saved to .docjays/config.json

The API key is used for MCP server authentication and all operations on this project.

Working with Private Repositories

For private repositories, store credentials locally:

bash
# 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 sync

Credentials 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

bash
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 1h

Feature-First Development

Manage feature specifications and architecture docs

bash
docjays init
docjays add-source --name feature-specs --type local --url ./docs/features
docjays serve

Multi-Repo Documentation

Aggregate documentation from multiple repositories

bash
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 sync

Next Steps

Was this page helpful?