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
| Operation | Without --yes | With --yes |
|---|
| File write | May ask | ✅ Immediate |
| File delete | May ask | ✅ Immediate |
| Shell command | May 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 environment | Production servers |
| Batch file processing | Shared systems |
| Code generation | First-time operations |
| Documentation updates | Sensitive data operations |
| Trusted workflows | Learning/testing |
Best Practices
-
Use with version control
cd /path/to/git/repo
lsbot --yes router [...]
# Easy to review: git diff
# Easy to undo: git reset --hard
-
Start with debug mode
lsbot --yes --debug router [...]
-
Test in safe directory first
mkdir /tmp/test && cd /tmp/test
lsbot --yes router [...]
-
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
| Problem | Solution |
|---|
| AI still asks for confirmation | Check flag position (must be before subcommand) |
| Flag not recognized | Rebuild: go build -o dist/lsbot . |
| Want to cancel | Press Ctrl+C anytime |
| Review what changed | git 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