Auto-Approval Quick Reference (--yes)

Enable Auto-Approval

# Long form
lsbot --yes router --provider deepseek --api-key sk-xxx

# Short form
lsbot -y router --provider deepseek --api-key sk-xxx

# With debug
lsbot --yes --debug router --provider deepseek --api-key sk-xxx

What It Does

OperationWithout --yesWith --yes
File writeMay ask✅ Immediate
File deleteMay ask✅ Immediate
Shell commandMay ask✅ Immediate
Dangerous ops❌ Blocked❌ Blocked
Read operations✅ Allowed✅ Allowed

Behavior Examples

File Operations

# Without --yes
User: Save this to config.yaml
AI: Should I save the file? (asking...)
User: Yes
AI: ✅ Saved

# With --yes
User: Save this to config.yaml
AI: ✅ Saved config.yaml (247 bytes)

Batch Operations

# Without --yes
User: Rename all .txt to .md
AI: Found 15 files. Proceed? (asking...)
User: Yes
AI: ✅ Renamed 15 files

# With --yes
User: Rename all .txt to .md
AI: ✅ Renamed 15 files (.txt → .md)

Safety Features (Always Active)

Even with --yes, these are still blocked:

  • rm -rf /
  • mkfs, dd if=/dev/zero
  • System-breaking commands
  • Critical file deletions

When to Use

✅ Good Use Cases❌ Avoid Using
Development environmentProduction servers
Batch file processingShared systems
Code generationFirst-time operations
Documentation updatesSensitive data operations
Trusted workflowsLearning/testing

Best Practices

  1. Use with version control

    cd /path/to/git/repo
    lsbot --yes router [...]
    # Easy to review: git diff
    # Easy to undo: git reset --hard
    
  2. Start with debug mode

    lsbot --yes --debug router [...]
    
  3. Test in safe directory first

    mkdir /tmp/test && cd /tmp/test
    lsbot --yes router [...]
    
  4. Review changes regularly

    git log --oneline --name-only
    git diff HEAD~5
    

Flag Position (Important!)

# ✅ Correct - before subcommand
lsbot --yes router --provider deepseek --api-key sk-xxx

# ❌ Wrong - after subcommand
lsbot gateway --yes --provider deepseek --api-key sk-xxx

Verify It's Working

# Enable verbose logging
lsbot --yes --log verbose router [...]

# Look for this in output:
## 🚀 AUTO-APPROVAL MODE ENABLED

Combine with Other Flags

# Auto-approval + Debug + Verbose
lsbot --yes --debug --log verbose router [...]

# Auto-approval + Custom debug directory
lsbot -y --debug-dir /tmp/debug router [...]

# All flags combined
lsbot -y --debug --log very-verbose --debug-dir ~/debug router \
  --provider qwen --model qwen-plus --api-key sk-xxx

Aliases for Convenience

# Add to ~/.bashrc or ~/.zshrc
alias lingti='lsbot --yes'
alias lingti-debug='lsbot --yes --debug --log verbose'

# Usage
lingti router --provider deepseek --api-key sk-xxx
lingti-debug router --provider deepseek --api-key sk-xxx

Troubleshooting

ProblemSolution
AI still asks for confirmationCheck flag position (must be before subcommand)
Flag not recognizedRebuild: go build -o dist/lsbot .
Want to cancelPress Ctrl+C anytime
Review what changedgit diff or git log

Quick Decision Guide

Should I use --yes?

Are you in a git repository? ────────────────┐
                                             │
                                        Yes  │  No
                                             ↓    ↓
Do you trust the operation? ───────────┐    ❌ DON'T USE
                                       │
                                  Yes  │  No
                                       ↓    ↓
Is it production data? ─────────┐     ✅  USE
                                │
                           Yes  │  No
                                ↓    ↓
                               ❌   ✅

Real-World Examples

Documentation Sync

lsbot --yes router --provider qwen --api-key sk-xxx
User: Sync README_EN.md with README.md
AI: ✅ README_EN.md updated (43 lines changed)

Code Refactoring

lsbot --yes router --provider deepseek --api-key sk-xxx
User: Rename all functions from snake_case to camelCase
AI: ✅ Refactored 28 functions across 7 files

Batch File Cleanup

lsbot --yes router --provider claude --api-key sk-xxx
User: Delete all .log files older than 7 days
AI: ✅ Deleted 142 log files (saved 3.2 GB)

Related Commands

# Show all global flags
lsbot --help

# Show router-specific flags
lsbot gateway --help

# Check version
lsbot version

See Also