Skip to content

Commit 39cc379

Browse files
authored
Merge pull request #44 from sakamotopaya/feature/cli-usage-examples
feat: implement CLI usage examples system (#19)
2 parents 42641a8 + d50e3ae commit 39cc379

File tree

10 files changed

+2841
-0
lines changed

10 files changed

+2841
-0
lines changed

examples/README.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# CLI Usage Examples
2+
3+
This directory contains practical examples to help you learn and use the CLI utility effectively.
4+
5+
## 📚 Categories
6+
7+
### 🚀 Basic
8+
9+
Simple commands and fundamental concepts for getting started.
10+
11+
- [Getting Started](basic/getting-started.md) - Your first commands
12+
- [Help System](basic/help-system.md) - Finding help and documentation
13+
- [Output Formats](basic/output-formats.md) - Different output formats and their uses
14+
15+
### 🔄 Workflows
16+
17+
Multi-step development workflows and automation patterns.
18+
19+
- [Web Development](workflows/web-development.md) - Complete web development workflow
20+
- [Code Review](workflows/code-review.md) - Automated code review processes
21+
- [Project Setup](workflows/project-setup.md) - Setting up new projects
22+
- [Testing Automation](workflows/testing-automation.md) - Automated testing workflows
23+
24+
### 🔗 Integration
25+
26+
Integration with popular tools and platforms.
27+
28+
- [GitHub Actions](integration/github-actions.md) - CI/CD integration
29+
- [Docker](integration/docker.md) - Containerization examples
30+
- [VS Code](integration/vscode.md) - Editor integration
31+
32+
### ⚙️ Configuration
33+
34+
Configuration examples and best practices.
35+
36+
- [Basic Setup](configuration/basic-setup.md) - Initial configuration
37+
- [Advanced Config](configuration/advanced-config.md) - Advanced configuration patterns
38+
- [MCP Servers](configuration/mcp-servers.md) - MCP server configuration
39+
40+
### 🔧 Troubleshooting
41+
42+
Common issues and debugging techniques.
43+
44+
- [Common Errors](troubleshooting/common-errors.md) - Frequent problems and solutions
45+
- [Debug Mode](troubleshooting/debug-mode.md) - Using debug features
46+
- [Performance](troubleshooting/performance.md) - Performance optimization
47+
48+
### 📝 Recipes
49+
50+
Quick solutions and useful snippets.
51+
52+
- [Quick Tasks](recipes/quick-tasks.md) - One-line solutions
53+
- [Automation](recipes/automation.md) - Automation scripts
54+
- [Best Practices](recipes/best-practices.md) - Recommended patterns
55+
56+
## 🚀 Quick Start
57+
58+
```bash
59+
# View all examples
60+
roo examples
61+
62+
# Show basic examples
63+
roo examples show basic
64+
65+
# Search for specific examples
66+
roo examples search "web development"
67+
68+
# Run a specific example
69+
roo examples run getting-started-hello-world
70+
71+
# Get help on examples command
72+
roo examples --help
73+
```
74+
75+
## 💡 Contributing Examples
76+
77+
We welcome community contributions! To add your own examples:
78+
79+
1. Choose the appropriate category
80+
2. Follow the example template format
81+
3. Include clear descriptions and expected outputs
82+
4. Test your examples before submitting
83+
5. Submit a pull request
84+
85+
See our [contribution guidelines](../docs/contributing.md) for more details.

examples/basic/getting-started.md

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
# Getting Started Examples
2+
3+
These examples will help you take your first steps with the CLI utility.
4+
5+
## Your First Command
6+
7+
### Hello World
8+
9+
```bash
10+
# Get basic help
11+
roo --help
12+
13+
# Check version
14+
roo --version
15+
16+
# Simple task
17+
roo "create a hello world script in Python"
18+
```
19+
20+
**Expected Output:**
21+
The CLI will create a simple Python script with a hello world function.
22+
23+
**Difficulty:** Beginner
24+
**Estimated Time:** 1 minute
25+
**Tags:** #basics #hello-world #python
26+
27+
---
28+
29+
### Basic File Operations
30+
31+
```bash
32+
# Analyze a file
33+
roo "analyze this file: app.js"
34+
35+
# Create multiple files
36+
roo "create a React component with tests"
37+
38+
# Refactor code
39+
roo "refactor this function to use async/await: utils.js"
40+
```
41+
42+
**Description:** Basic file manipulation commands that demonstrate core functionality.
43+
44+
**Difficulty:** Beginner
45+
**Estimated Time:** 2-3 minutes
46+
**Tags:** #files #analysis #refactoring
47+
48+
---
49+
50+
### Getting Help
51+
52+
```bash
53+
# General help
54+
roo --help
55+
56+
# Help for specific commands
57+
roo help config
58+
59+
# Help for tools
60+
roo help tools
61+
62+
# Search help
63+
roo help search "file operations"
64+
```
65+
66+
**Description:** Learn how to find help and documentation within the CLI.
67+
68+
**Difficulty:** Beginner
69+
**Estimated Time:** 1 minute
70+
**Tags:** #help #documentation
71+
72+
---
73+
74+
### Basic Configuration
75+
76+
```bash
77+
# Initialize configuration
78+
roo config init
79+
80+
# View current configuration
81+
roo config list
82+
83+
# Set a configuration value
84+
roo config set api.provider anthropic
85+
86+
# Get a specific config value
87+
roo config get api.provider
88+
```
89+
90+
**Description:** Basic configuration management to get started.
91+
92+
**Prerequisites:**
93+
94+
- CLI installed and accessible in PATH
95+
96+
**Difficulty:** Beginner
97+
**Estimated Time:** 2 minutes
98+
**Tags:** #config #setup #basics
99+
100+
---
101+
102+
### Understanding Output
103+
104+
```bash
105+
# Default output (plain text)
106+
roo "explain this code: function add(a, b) { return a + b; }"
107+
108+
# JSON output for scripting
109+
roo --format json "list all functions in this file: utils.js"
110+
111+
# Verbose output for debugging
112+
roo --verbose "analyze project structure"
113+
```
114+
115+
**Description:** Understanding different output formats and verbosity levels.
116+
117+
**Difficulty:** Beginner
118+
**Estimated Time:** 2 minutes
119+
**Tags:** #output #formats #debugging

0 commit comments

Comments
 (0)