CLI Commands Reference

This documentation is auto-generated from CLI help text.

Do not edit manually - run knl docs sync to update.

Overview

Knowledge Retention Library - AI-powered development assistant.

Main Command

knl

Knowledge Retention Library - AI-powered development assistant.

knl [COMMAND] [OPTIONS]

Global Options:

  • --version, -v - Show version and exit
  • --help - Show help message and exit

Run knl COMMAND --help for detailed help on any command.

Core Commands

knl init

Initialize KNL in the current repository. Sets up the .knowledge directory structure and configuration.

knl init

Options:

  • --force - Reinitialize even if already initialized
  • --format - Task ID format: jira or github
  • --project - Project identifier (JIRA project or GitHub repo)

Task Management

knl create

Create a new task (shortcut for 'knl task create').

knl create

Options:

  • task_id - Task ID (e.g., PROJ-123 or #456)
  • --title - Task title
  • --fetch - Fetch metadata from remote (default: True)

knl list

List all tasks (shortcut for 'knl task list').

knl list

Options:

  • --status - Filter by status
  • --all - Include archived tasks

knl show

Show task details (shortcut for 'knl task show').

knl show

Options:

  • task_id - Task ID to show

knl delete

Delete a task (shortcut for 'knl task delete').

knl delete

Options:

  • task_id - Task ID to delete
  • --force - Skip confirmation

knl task - Command Group

Manage development tasks

See subcommands below.

knl task create

Create a new task.

knl task create

Options:

  • task_id - Task ID (e.g., PROJ-123 or #456)
  • --title - Task title
  • --fetch - Fetch metadata from remote (default: True)

knl task delete

Delete a task.

knl task delete

Options:

  • task_id - Task ID to delete
  • --force - Skip confirmation

knl task list

List all tasks.

knl task list

Options:

  • --status - Filter by status
  • --all - Include archived tasks

knl task show

Show task details.

knl task show

Options:

  • task_id - Task ID to show

knl task update

Update task metadata.

knl task update

Options:

  • task_id - Task ID to update
  • --status - Update status
  • --title - Update title

Configuration

knl config - Command Group

Manage configuration

See subcommands below.

knl config edit

Open configuration file in editor.

knl config edit

Options:

  • --local - Edit local config

knl config get

Get a configuration value.

knl config get

Options:

  • key - Configuration key (dot notation, e.g., 'task.id_format')
  • --local - Get local config only

knl config list

List all configuration values.

knl config list

Options:

  • --local - Show local config only
  • --global - Show global config only

knl config set

Set a configuration value.

knl config set

Options:

  • key - Configuration key (dot notation)
  • value - Value to set
  • --local - Set in local config

Knowledge Management

knl crumb - Command Group

Browse and manage knowledge crumbs

See subcommands below.

knl crumb categories

List all available categories.

knl crumb categories

Options:

  • --describe - Show category descriptions

knl crumb find

Find crumbs by searching content and metadata.

knl crumb find

Options:

  • query - Search query
  • --in - Search in: title, description, tags, content
  • --case-sensitive - Case-sensitive search

knl crumb info

Display metadata about a crumb.

knl crumb info

Options:

  • crumb_path - Crumb path
  • --json - Output as JSON

knl crumb list

List all available crumbs with optional filtering.

knl crumb list

Options:

  • --category - Filter by category
  • --tag - Filter by tag (can specify multiple)
  • --difficulty - Filter by difficulty
  • --sort - Sort by: title, created, updated, difficulty, category (default: category)
  • --format - Output format: table, compact, json (default: table)

knl crumb show

Show the full content of a crumb.

knl crumb show

Options:

  • crumb_path - Crumb path (e.g., devops/github-pages-setup)
  • --line-numbers - Show line numbers
  • --raw - Show raw markdown without rendering

knl crumb tags

List all available tags.

knl crumb tags

Options:

  • --sort - Sort by: name, count (default: name)
  • --filter - Filter tags containing text

Documentation

knl docs - Command Group

Documentation checking and synchronization

See subcommands below.

knl docs check

Check documentation coverage for CLI commands.

knl docs check

Options:

  • --verbose - Show detailed information
  • --json - Output results as JSON

knl docs dump

Dump CLI help information as JSON.

knl docs dump

Options:

  • --output - Output file (default: stdout)

knl docs sync

Extract CLI help and sync to documentation.

knl docs sync

Options:

  • --verify-only - Check sync without updating files
  • --output - Output file (default: docs/cli/commands.md)

knl docs update

AI-assisted documentation updates based on code changes. Analyzes code changes for a task and suggests documentation updates. Uses MCP server for AI-powered analysis and presents changes for approval. Examples: # Analyze task changes and suggest updates knl docs update gh-1 # Analyze all changes since last release knl docs update gh-1 --scope release # Auto-approve all suggested changes knl docs update gh-1 --auto-approve # Preview changes without applying knl docs update gh-1 --dry-run

knl docs update

Options:

  • task_id - Task ID to analyze
  • --scope - Analysis scope (default: task)
  • --auto-approve - Auto-approve all changes without review
  • --dry-run - Show proposed changes without applying them