osr-mono/packages/osr-code-bot/docs_/parameters.md
2025-01-30 00:50:58 +01:00

2.7 KiB

Command Line Parameters

This document describes all available command line parameters.

Core Parameters

Parameter Description Default Required
path Target directory . No
prompt The prompt. Supports file paths and environment variables ./prompt.md No
output Optional output path for modified files (Tool mode only) - No
dst Optional destination path for the result, will substitute ${MODEL} and ${ROUTER} in the path. Used for "completion" mode - No
model AI model to use for processing anthropic/claude-3.5-sonnet No
router Router to use: openai or openrouter openrouter No
mode Chat completion mode: "completion" (without tools) or "tools" tools No

File Selection & Tools

Parameter Description Default Required
include Glob patterns to match files for processing. Supports multiple patterns, e.g. --include=src/*.tsx,src/*.ts --include=package.json - No
disable Disable tools categories [] No
disableTools List of specific tools to disable [] No

Configuration & Profiles

Parameter Description Default Required
profile Path to profile for variables. Supports environment variables ${POLYMECH-ROOT}/profile.json No
env Environment (in profile) default No
config Path to JSON configuration file (API keys). Supports environment variables - No
preferences Path to preferences file (location, email, gender, etc). Supports environment variables ./.kbot/preferences.md No

Debugging & Logging

Parameter Description Default Required
logLevel Logging level for the application (0-4) 2 No
logs Logging directory ./.kbot No
dump Create a script - No
dry Dry run - only write out parameters without making API calls false No

Examples

# Basic usage with default parameters
kbot --prompt="What are the changes needed?"

# Specify model and router
kbot --model="gpt-4" --router="openai" --prompt="Analyze this code"

# Process specific files
kbot --include="src/*.ts" --include="package.json" --prompt="Check for security issues"

# Dry run with custom logging
kbot --dry=true --logLevel=4 --prompt="Test run"

Environment Variables

Many path-based parameters support environment variables using the ${VARIABLE} syntax:

  • ${POLYMECH-ROOT} - Root directory for Polymech
  • ${OSR-ROOT} - Root directory for OSR

Example:

kbot --profile="${POLYMECH-ROOT}/custom-profile.json"