Cli
Llm CLI
Command-line interface reference for llm.do - Unified gateway for large language models (Large Language Models (LLMs))
Llm CLI
Unified gateway for large language models (Large Language Models (LLMs))
Installation
# Install globally
npm install -g do
# Or use via npx
npx do --versionQuick Start
# Basic usage
do integrations llm call /dataCommands
Main Command
do integrations llm call /dataDescription: Unified gateway for large language models (Large Language Models (LLMs))
Usage:
do llm [options]Options
Global Options
--help, -h- Show help--version, -v- Show version--verbose- Verbose output--quiet, -q- Quiet mode--json- JSON output--config <file>- Config file path
Command-Specific Options
do llm \
--option1=value1 \
--option2=value2 \
--verboseUsage Examples
Basic Example
# Simple usage
do integrations llm call /dataWith Options
# With configuration
do integrations llm call /data --verbose --jsonInteractive Mode
# Interactive prompts
do llm --interactiveBatch Operations
# Process multiple items
do llm --batch items.jsonPipeline Integration
# Use with pipes
cat data.json | do llm --stdin | jq '.'Configuration
Config File
Create .doconfig in your project:
{
"llm": {
"option1": "value1",
"option2": "value2"
}
}Environment Variables
export DO_LLM_OPTION1=value1
export DO_LLM_OPTION2=value2
do integrations llm call /dataOutput Formats
Default Output
do integrations llm call /data
# ✓ Operation completed
# Result: ...JSON Output
do integrations llm call /data --json
# {
# "success": true,
# "result": { ... }
# }Verbose Output
do integrations llm call /data --verbose
# → Starting operation...
# → Processing...
# → Completed in 1.2sScripting
Bash Scripts
#!/bin/bash
# Check if successful
if do integrations llm call /data; then
echo "Success!"
else
echo "Failed!"
exit 1
fiCI/CD Integration
# GitHub Actions
- name: Run Llm
run: |
do integrations llm call /data \
--config prod.json \
--quietError Handling
Exit Codes
0- Success1- General error2- Invalid arguments3- Timeout4- Not found
Error Messages
# Capture errors
do integrations llm call /data 2>errors.log
# Handle errors
if ! do integrations llm call /data; then
echo "Error occurred, check errors.log"
exit 1
fiDebugging
# Debug mode
DEBUG=* do integrations llm call /data
# Dry run
do integrations llm call /data --dry-run
# Verbose + timing
time do integrations llm call /data --verboseBest Practices
- Use Config Files - Store configuration in
.doconfig - Environment Variables - Use for sensitive data
- Error Handling - Check exit codes in scripts
- JSON Output - Use
--jsonfor parsing results - Verbose Mode - Use
--verbosefor debugging