parabot 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.rubocop.yml +55 -0
- data/CLAUDE.md +171 -0
- data/DISTRIBUTION.md +287 -0
- data/INSTALL.md +242 -0
- data/LICENSE +21 -0
- data/README.md +371 -0
- data/Rakefile +50 -0
- data/config/base.yml +12 -0
- data/config/commands.yml +28 -0
- data/config/core_prompts/system_prompt.yml +66 -0
- data/config/core_prompts/test_guidance.yml +24 -0
- data/config/languages/elixir.yml +62 -0
- data/config/languages/javascript.yml +64 -0
- data/config/languages/kotlin.yml +64 -0
- data/config/languages/ruby.yml +66 -0
- data/config/languages/shell.yml +63 -0
- data/config/languages/typescript.yml +63 -0
- data/exe/parabot +22 -0
- data/lib/parabot/cli/argument_parser.rb +105 -0
- data/lib/parabot/cli/command_router.rb +114 -0
- data/lib/parabot/cli.rb +71 -0
- data/lib/parabot/commands/base.rb +108 -0
- data/lib/parabot/commands/custom_commands.rb +63 -0
- data/lib/parabot/commands/doctor.rb +196 -0
- data/lib/parabot/commands/init.rb +171 -0
- data/lib/parabot/commands/message.rb +25 -0
- data/lib/parabot/commands/start.rb +35 -0
- data/lib/parabot/commands/test.rb +43 -0
- data/lib/parabot/commands/version.rb +17 -0
- data/lib/parabot/commands.rb +15 -0
- data/lib/parabot/configuration.rb +199 -0
- data/lib/parabot/dry_run_logging.rb +22 -0
- data/lib/parabot/errors.rb +12 -0
- data/lib/parabot/language_detector.rb +158 -0
- data/lib/parabot/language_inference.rb +82 -0
- data/lib/parabot/logging_setup.rb +73 -0
- data/lib/parabot/messaging/adapter.rb +53 -0
- data/lib/parabot/messaging/adapter_factory.rb +33 -0
- data/lib/parabot/messaging/dry_run_adapter.rb +55 -0
- data/lib/parabot/messaging/tmux_adapter.rb +82 -0
- data/lib/parabot/system.rb +41 -0
- data/lib/parabot/test_runner.rb +179 -0
- data/lib/parabot/tmux_manager.rb +245 -0
- data/lib/parabot/version.rb +5 -0
- data/lib/parabot/yaml_text_assembler.rb +155 -0
- data/lib/parabot.rb +30 -0
- data/parabot.gemspec +44 -0
- data/scripts/build-distribution +122 -0
- data/scripts/install +152 -0
- metadata +221 -0
data/INSTALL.md
ADDED
@@ -0,0 +1,242 @@
|
|
1
|
+
# Parabot CLI Installation Guide
|
2
|
+
|
3
|
+
The Parabot CLI is a standalone executable that can be distributed to Linux and macOS systems with Ruby installed.
|
4
|
+
|
5
|
+
## Requirements
|
6
|
+
|
7
|
+
- **Ruby 3.1.0 or higher**
|
8
|
+
- **tmux** (for Claude AI integration)
|
9
|
+
- **git** (recommended, but not required)
|
10
|
+
|
11
|
+
### Checking Requirements
|
12
|
+
|
13
|
+
```bash
|
14
|
+
# Check Ruby version
|
15
|
+
ruby --version
|
16
|
+
|
17
|
+
# Check if tmux is installed
|
18
|
+
tmux -V
|
19
|
+
|
20
|
+
# Check if git is available
|
21
|
+
git --version
|
22
|
+
```
|
23
|
+
|
24
|
+
## Installation Methods
|
25
|
+
|
26
|
+
### Method 1: System-wide Installation (Recommended)
|
27
|
+
|
28
|
+
Install for all users (requires sudo):
|
29
|
+
|
30
|
+
```bash
|
31
|
+
sudo cp build/parabot /usr/local/bin/parabot
|
32
|
+
```
|
33
|
+
|
34
|
+
Verify installation:
|
35
|
+
```bash
|
36
|
+
parabot --version
|
37
|
+
```
|
38
|
+
|
39
|
+
### Method 2: User Installation
|
40
|
+
|
41
|
+
Install for current user only (requires `~/bin` in PATH):
|
42
|
+
|
43
|
+
```bash
|
44
|
+
# Create ~/bin if it doesn't exist
|
45
|
+
mkdir -p ~/bin
|
46
|
+
|
47
|
+
# Copy executable
|
48
|
+
cp build/parabot ~/bin/parabot
|
49
|
+
|
50
|
+
# Add ~/bin to PATH if not already there
|
51
|
+
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc
|
52
|
+
source ~/.bashrc
|
53
|
+
```
|
54
|
+
|
55
|
+
### Method 3: Direct Usage
|
56
|
+
|
57
|
+
Use without installation:
|
58
|
+
|
59
|
+
```bash
|
60
|
+
./build/parabot --help
|
61
|
+
```
|
62
|
+
|
63
|
+
## Verification
|
64
|
+
|
65
|
+
Test that all core functionality works:
|
66
|
+
|
67
|
+
```bash
|
68
|
+
# Show help
|
69
|
+
parabot --help
|
70
|
+
|
71
|
+
# Show version
|
72
|
+
parabot version
|
73
|
+
|
74
|
+
# Test basic commands (dry-run mode)
|
75
|
+
parabot test --dry-run
|
76
|
+
parabot start --dry-run
|
77
|
+
parabot --version
|
78
|
+
parabot list
|
79
|
+
```
|
80
|
+
|
81
|
+
## Configuration
|
82
|
+
|
83
|
+
Create a configuration file to customize behavior:
|
84
|
+
|
85
|
+
```bash
|
86
|
+
# Project-specific configuration
|
87
|
+
echo "commands:" > .parabot.yml
|
88
|
+
echo " testhelp: 'help me understand why my tests are failing'" >> .parabot.yml
|
89
|
+
echo " review: 'review my recent code changes'" >> .parabot.yml
|
90
|
+
|
91
|
+
# Test custom commands
|
92
|
+
parabot commands
|
93
|
+
```
|
94
|
+
|
95
|
+
## Usage Examples
|
96
|
+
|
97
|
+
### Basic Test Running
|
98
|
+
```bash
|
99
|
+
# Run all tests
|
100
|
+
parabot test
|
101
|
+
|
102
|
+
# Run specific test files
|
103
|
+
parabot test spec/user_spec.rb spec/admin_spec.rb
|
104
|
+
|
105
|
+
# Run tests with language override
|
106
|
+
parabot test --language ruby
|
107
|
+
|
108
|
+
# Preview what would run (dry-run)
|
109
|
+
parabot test --dry-run
|
110
|
+
```
|
111
|
+
|
112
|
+
### Claude AI Integration
|
113
|
+
```bash
|
114
|
+
# Start Claude session
|
115
|
+
parabot start
|
116
|
+
|
117
|
+
# Check installation
|
118
|
+
parabot --version
|
119
|
+
|
120
|
+
# Send a message to Claude
|
121
|
+
parabot message "help me debug this test failure"
|
122
|
+
|
123
|
+
# Use custom commands (if configured)
|
124
|
+
parabot testhelp
|
125
|
+
parabot review
|
126
|
+
```
|
127
|
+
|
128
|
+
### Multi-language Projects
|
129
|
+
```bash
|
130
|
+
# Force language detection
|
131
|
+
parabot test --language ruby
|
132
|
+
parabot test --language elixir
|
133
|
+
|
134
|
+
# Let parabot detect automatically
|
135
|
+
parabot test test/integration_test.exs # Detects Elixir
|
136
|
+
parabot test spec/user_spec.rb # Detects Ruby
|
137
|
+
```
|
138
|
+
|
139
|
+
## Troubleshooting
|
140
|
+
|
141
|
+
### Ruby Version Issues
|
142
|
+
```bash
|
143
|
+
# Error: "Parabot requires Ruby 3.1.0 or higher"
|
144
|
+
# Solution: Update Ruby using rbenv, RVM, or system package manager
|
145
|
+
|
146
|
+
# Using rbenv
|
147
|
+
rbenv install 3.1.0
|
148
|
+
rbenv global 3.1.0
|
149
|
+
|
150
|
+
# Using RVM
|
151
|
+
rvm install 3.1.0
|
152
|
+
rvm use 3.1.0 --default
|
153
|
+
```
|
154
|
+
|
155
|
+
### Permission Issues
|
156
|
+
```bash
|
157
|
+
# Error: "Permission denied"
|
158
|
+
# Solution: Make executable or use sudo
|
159
|
+
|
160
|
+
chmod +x ./parabot
|
161
|
+
# or
|
162
|
+
sudo cp ./parabot /usr/local/bin/
|
163
|
+
```
|
164
|
+
|
165
|
+
### tmux Integration Issues
|
166
|
+
```bash
|
167
|
+
# Error: "tmux: command not found"
|
168
|
+
# Solution: Install tmux
|
169
|
+
|
170
|
+
# Ubuntu/Debian
|
171
|
+
sudo apt-get install tmux
|
172
|
+
|
173
|
+
# macOS with Homebrew
|
174
|
+
brew install tmux
|
175
|
+
|
176
|
+
# CentOS/RHEL
|
177
|
+
sudo yum install tmux
|
178
|
+
```
|
179
|
+
|
180
|
+
### Configuration Issues
|
181
|
+
```bash
|
182
|
+
# Error: "Configuration error: Failed to load configuration"
|
183
|
+
# Solution: Check YAML syntax
|
184
|
+
|
185
|
+
# Validate YAML file
|
186
|
+
ruby -e "require 'yaml'; puts YAML.load_file('.parabot.yml')"
|
187
|
+
```
|
188
|
+
|
189
|
+
## System Compatibility
|
190
|
+
|
191
|
+
### User-specific Configuration
|
192
|
+
```bash
|
193
|
+
# Create user config directory
|
194
|
+
mkdir -p ~/.config/parabot
|
195
|
+
|
196
|
+
# User configuration
|
197
|
+
tee ~/.config/parabot/config.yml << EOF
|
198
|
+
log_level: debug
|
199
|
+
language_prompts:
|
200
|
+
ruby:
|
201
|
+
system_prompt: "Ruby expert focused on Rails best practices"
|
202
|
+
elixir:
|
203
|
+
system_prompt: "Elixir expert focused on OTP design patterns"
|
204
|
+
EOF
|
205
|
+
```
|
206
|
+
|
207
|
+
## Distribution Notes
|
208
|
+
|
209
|
+
### For Distributors
|
210
|
+
- The executable is self-contained with embedded dependencies
|
211
|
+
- No gem installation required on target systems
|
212
|
+
- Size: ~16KB (very lightweight)
|
213
|
+
- Dependencies: Only Ruby standard library + system Ruby
|
214
|
+
|
215
|
+
### Security Considerations
|
216
|
+
- Executable uses only standard Ruby libraries
|
217
|
+
- No network connections except tmux communication
|
218
|
+
- Configuration files are standard YAML (no code execution)
|
219
|
+
- All file operations are in current directory or user home
|
220
|
+
|
221
|
+
## Support
|
222
|
+
|
223
|
+
### Getting Help
|
224
|
+
```bash
|
225
|
+
# Show all available commands
|
226
|
+
parabot --help
|
227
|
+
|
228
|
+
# Show available custom commands
|
229
|
+
parabot commands
|
230
|
+
|
231
|
+
# Test with dry-run for debugging
|
232
|
+
parabot test --dry-run
|
233
|
+
```
|
234
|
+
|
235
|
+
### Common Issues
|
236
|
+
1. **Ruby version too old**: Update to Ruby 3.1+
|
237
|
+
2. **tmux not found**: Install tmux package
|
238
|
+
3. **Permission denied**: Use `chmod +x` or `sudo cp`
|
239
|
+
4. **Configuration errors**: Validate YAML syntax
|
240
|
+
5. **Git repository warnings**: Normal when not in a git repo
|
241
|
+
|
242
|
+
The Parabot CLI is designed to work smoothly across different environments while providing helpful error messages and warnings when issues occur.
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2025 Alexander Paramonov
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,371 @@
|
|
1
|
+
# 🤖 Parabot Ruby CLI
|
2
|
+
|
3
|
+
**AI-powered Test-Driven Development assistant with seamless tmux integration**
|
4
|
+
|
5
|
+
Parabot is a modern Ruby CLI tool that connects your development workflow with Claude AI, providing intelligent test execution, project analysis, and TDD guidance across multiple programming languages.
|
6
|
+
|
7
|
+
## 🤖 **Why "Parabot"?**
|
8
|
+
|
9
|
+
**"Para" + "bot"** = **Parallel** + **Robot/Bot**
|
10
|
+
|
11
|
+
Parabot's core function as an AI assistant that works **alongside** (parallel to) your development workflow:
|
12
|
+
|
13
|
+
**Key aspects of the "parallel" concept:**
|
14
|
+
- **Parallel Terminal Sessions** - Runs Claude in a separate tmux pane alongside your coding
|
15
|
+
- **Parallel Workflow** - Works with your existing TDD process without interrupting it
|
16
|
+
- **Parallel Analysis** - Analyzes test results while you continue coding
|
17
|
+
- **Parallel Intelligence** - Provides AI assistance that complements your development skills
|
18
|
+
|
19
|
+
## ✨ **What Parabot Does**
|
20
|
+
|
21
|
+
- 🔄 **Runs your tests** and sends results to Claude for analysis
|
22
|
+
- 🧠 **Provides AI guidance** for test-driven development
|
23
|
+
- 🖥️ **Integrates with tmux** for seamless terminal workflow
|
24
|
+
- 🌐 **Supports multiple languages** (Ruby, Elixir, JavaScript, TypeScript, Kotlin, Shell)
|
25
|
+
- ⚙️ **Highly configurable** with YAML configuration files you can add new and customize existing languages
|
26
|
+
- 🚀 **Works anywhere** - various installation methods
|
27
|
+
|
28
|
+
---
|
29
|
+
|
30
|
+
## 🚀 **Quick Installation**
|
31
|
+
|
32
|
+
### **Option 1: RubyGems Install (Recommended)**
|
33
|
+
```bash
|
34
|
+
gem install parabot
|
35
|
+
```
|
36
|
+
|
37
|
+
### **Option 2: Installation Script**
|
38
|
+
```bash
|
39
|
+
curl -sSL https://raw.githubusercontent.com/AlexParamonov/parabot/main/scripts/install | bash
|
40
|
+
```
|
41
|
+
|
42
|
+
### **Option 3: Manual Download**
|
43
|
+
```bash
|
44
|
+
curl -L https://github.com/AlexParamonov/parabot/releases/latest/download/parabot -o parabot
|
45
|
+
chmod +x parabot && sudo mv parabot /usr/local/bin/
|
46
|
+
```
|
47
|
+
|
48
|
+
**Requirements:** Ruby 3.0+ on Linux or macOS
|
49
|
+
|
50
|
+
---
|
51
|
+
|
52
|
+
## ⚡ **Quick Start**
|
53
|
+
|
54
|
+
```bash
|
55
|
+
# Initialize parabot in your project
|
56
|
+
parabot init
|
57
|
+
|
58
|
+
# Start Claude AI session in tmux
|
59
|
+
parabot start
|
60
|
+
|
61
|
+
# Run tests with AI analysis
|
62
|
+
parabot test
|
63
|
+
|
64
|
+
# Send custom message to Claude
|
65
|
+
parabot "analyze this code for potential issues"
|
66
|
+
|
67
|
+
# Check version
|
68
|
+
parabot --version
|
69
|
+
```
|
70
|
+
|
71
|
+
---
|
72
|
+
|
73
|
+
## 🎯 **Core Features**
|
74
|
+
|
75
|
+
### **🔬 Intelligent Test Execution**
|
76
|
+
```bash
|
77
|
+
parabot test # Run all tests
|
78
|
+
parabot test spec/user_spec.rb # Run specific file
|
79
|
+
parabot test --language ruby # Force language detection
|
80
|
+
```
|
81
|
+
|
82
|
+
### **🤖 AI Integration**
|
83
|
+
```bash
|
84
|
+
parabot start # Launch Claude session
|
85
|
+
parabot message "analyze this" # Send custom messages
|
86
|
+
parabot commands # List custom commands
|
87
|
+
```
|
88
|
+
|
89
|
+
### **📋 Custom Commands**
|
90
|
+
Define shortcuts in `.parabot.yml`:
|
91
|
+
```yaml
|
92
|
+
commands:
|
93
|
+
review: "review my latest changes and provide suggestions"
|
94
|
+
debug: "help me debug this failing test"
|
95
|
+
optimize: "suggest performance improvements"
|
96
|
+
```
|
97
|
+
|
98
|
+
Use them directly:
|
99
|
+
```bash
|
100
|
+
parabot review # Sends review message to Claude
|
101
|
+
parabot debug # Sends debug message to Claude
|
102
|
+
```
|
103
|
+
|
104
|
+
Add more context to your commands:
|
105
|
+
```bash
|
106
|
+
parabot review spec/user_spec.rb
|
107
|
+
parabot review and analyze changes in the last commit
|
108
|
+
parabot review "let's review the last 5 commits"
|
109
|
+
```
|
110
|
+
|
111
|
+
---
|
112
|
+
|
113
|
+
## 🛠️ **Installation Details**
|
114
|
+
|
115
|
+
### **Installation Script Features**
|
116
|
+
- ✅ **Automatic platform detection** (Linux/macOS)
|
117
|
+
- ✅ **Smart installation paths** (`/usr/local/bin`, `~/bin`, `~/.local/bin`)
|
118
|
+
- ✅ **Ruby version validation** (ensures 3.0+)
|
119
|
+
- ✅ **Permission handling** (chooses location based on access)
|
120
|
+
|
121
|
+
### **Manual Installation Options**
|
122
|
+
|
123
|
+
**System-wide installation:**
|
124
|
+
```bash
|
125
|
+
sudo cp parabot /usr/local/bin/
|
126
|
+
```
|
127
|
+
|
128
|
+
**User installation:**
|
129
|
+
```bash
|
130
|
+
mkdir -p ~/.local/bin
|
131
|
+
cp parabot ~/.local/bin/
|
132
|
+
export PATH="$HOME/.local/bin:$PATH"
|
133
|
+
```
|
134
|
+
|
135
|
+
**Verify installation:**
|
136
|
+
```bash
|
137
|
+
parabot --version
|
138
|
+
```
|
139
|
+
|
140
|
+
### **For Ruby Developers**
|
141
|
+
If you have Ruby and want gem management:
|
142
|
+
```bash
|
143
|
+
gem install parabot
|
144
|
+
parabot --version
|
145
|
+
```
|
146
|
+
|
147
|
+
**Works in any Ruby project** - no bundler conflicts!
|
148
|
+
|
149
|
+
---
|
150
|
+
|
151
|
+
## ⚙️ **Configuration**
|
152
|
+
|
153
|
+
### **Initialize Configuration**
|
154
|
+
```bash
|
155
|
+
parabot init # Creates .parabot.yml with sensible defaults
|
156
|
+
```
|
157
|
+
|
158
|
+
If you want to specify project languages instead of reling on auto-detection, you can use the -l or --language option:
|
159
|
+
```bash
|
160
|
+
parabot init -l ruby,typescript
|
161
|
+
```
|
162
|
+
|
163
|
+
### **Configuration Hierarchy**
|
164
|
+
1. `./.parabot.yml` (project-specific)
|
165
|
+
2. `~/.config/parabot/.parabot.yml` (user-wide)
|
166
|
+
3. `~/.parabot.yml` (global)
|
167
|
+
|
168
|
+
### **Example Configuration**
|
169
|
+
```yaml
|
170
|
+
# Test commands per language
|
171
|
+
test_command:
|
172
|
+
ruby: bundle exec rspec
|
173
|
+
elixir: mix test --trace
|
174
|
+
javascript: npm test
|
175
|
+
|
176
|
+
# Custom AI commands
|
177
|
+
commands:
|
178
|
+
review: "review my latest changes and provide suggestions"
|
179
|
+
debug: "help me debug this failing test"
|
180
|
+
commit: "create a logical git commit message"
|
181
|
+
|
182
|
+
# Language-specific settings
|
183
|
+
languages:
|
184
|
+
ruby:
|
185
|
+
file_extensions: [".rb", ".rake"]
|
186
|
+
project_files: ["Gemfile", "Rakefile"]
|
187
|
+
elixir:
|
188
|
+
file_extensions: [".ex", ".exs"]
|
189
|
+
project_files: ["mix.exs"]
|
190
|
+
```
|
191
|
+
|
192
|
+
---
|
193
|
+
|
194
|
+
## 🌐 **Multi-Language Support**
|
195
|
+
|
196
|
+
| Language | Auto-Detection | Default Test Command |
|
197
|
+
|----------|----------------|---------------------|
|
198
|
+
| **Ruby** | `Gemfile`, `*.rb` | `bundle exec rspec` |
|
199
|
+
| **Elixir** | `mix.exs`, `*.ex` | `mix test --trace` |
|
200
|
+
| **JavaScript** | `package.json`, `*.js` | `npm test` |
|
201
|
+
| **TypeScript** | `tsconfig.json`, `*.ts` | `npm test` |
|
202
|
+
| **Kotlin** | `build.gradle.kts`, `*.kt` | `./gradlew test` |
|
203
|
+
| **Shell** | `*.sh`, `*.bash` | `bats` |
|
204
|
+
|
205
|
+
### **Language Detection Process**
|
206
|
+
Parabot detects the programming language of your project using multiple methods:
|
207
|
+
**Auto-detection**:
|
208
|
+
- Based on test command parameters like test flies, directories, and glob patterns.
|
209
|
+
- Based on project files like `Gemfile`, `mix.exs`, `package.json`, etc.
|
210
|
+
|
211
|
+
**User forced**:
|
212
|
+
- `parabot test --language ruby`
|
213
|
+
- `language` option in `.parabot.yml`
|
214
|
+
|
215
|
+
---
|
216
|
+
|
217
|
+
## 🖥️ **Tmux Integration**
|
218
|
+
|
219
|
+
### **How It Works**
|
220
|
+
Parabot automatically finds Claude sessions by:
|
221
|
+
1. Looking for sessions named "claude" (case-insensitive)
|
222
|
+
2. Scanning for Claude processes in any tmux session
|
223
|
+
3. Creating new sessions if needed
|
224
|
+
|
225
|
+
### **Session Management**
|
226
|
+
```bash
|
227
|
+
parabot start # Start Claude in new tmux pane
|
228
|
+
parabot message # Send message to active Claude session
|
229
|
+
```
|
230
|
+
|
231
|
+
**No tmux?** Parabot allows you to add own adapters and reference them in configuration file. You can also use `--dry-run` mode to see what would happen without needing tmux.
|
232
|
+
|
233
|
+
---
|
234
|
+
|
235
|
+
## 🔧 **Command Reference**
|
236
|
+
|
237
|
+
### **Core Commands**
|
238
|
+
```bash
|
239
|
+
parabot init # Initialize project configuration
|
240
|
+
parabot start # Start Claude AI session
|
241
|
+
parabot test [files...] # Run tests with AI analysis
|
242
|
+
parabot message "text" # Send message to Claude
|
243
|
+
parabot commands # List available custom commands
|
244
|
+
parabot doctor # Diagnose configuration issues
|
245
|
+
parabot version # Show version information
|
246
|
+
```
|
247
|
+
|
248
|
+
### **Global Options**
|
249
|
+
```bash
|
250
|
+
--dry-run # Show what would happen
|
251
|
+
--language, -l LANG # Force language detection
|
252
|
+
--config, -c FILE # Use specific config file
|
253
|
+
--help, -h # Show help
|
254
|
+
```
|
255
|
+
|
256
|
+
### **Examples**
|
257
|
+
```bash
|
258
|
+
# Test specific files with language override
|
259
|
+
parabot test --language ruby spec/user_spec.rb spec/auth_spec.rb
|
260
|
+
|
261
|
+
# Dry-run to see what would happen
|
262
|
+
parabot --dry-run test
|
263
|
+
|
264
|
+
# Dry-run to see what would happen
|
265
|
+
parabot --dry-run start
|
266
|
+
|
267
|
+
# Custom configuration file
|
268
|
+
parabot --config ~/.custom-parabot.yml test
|
269
|
+
```
|
270
|
+
|
271
|
+
---
|
272
|
+
|
273
|
+
## 🐛 **Troubleshooting**
|
274
|
+
|
275
|
+
### **Common Issues**
|
276
|
+
|
277
|
+
**"Ruby version too old"**
|
278
|
+
```bash
|
279
|
+
ruby --version # Check current version
|
280
|
+
# Install Ruby 3.0+ using rbenv, asdf, or system package manager
|
281
|
+
```
|
282
|
+
|
283
|
+
**"Command not found"**
|
284
|
+
```bash
|
285
|
+
# Check if installation directory is in PATH
|
286
|
+
echo $PATH
|
287
|
+
# Add to PATH if needed:
|
288
|
+
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
|
289
|
+
source ~/.bashrc
|
290
|
+
```
|
291
|
+
|
292
|
+
**"Tmux not found"**
|
293
|
+
```bash
|
294
|
+
# Install tmux
|
295
|
+
sudo apt install tmux # Ubuntu/Debian
|
296
|
+
brew install tmux # macOS
|
297
|
+
# Or use dry-run mode: parabot --dry-run test
|
298
|
+
```
|
299
|
+
|
300
|
+
**Bundler conflicts in Ruby projects**
|
301
|
+
✅ **Fixed!** Parabot v1.0.0+ isolates its dependencies from your project's Gemfile.
|
302
|
+
|
303
|
+
---
|
304
|
+
|
305
|
+
## 🏗️ **Development**
|
306
|
+
|
307
|
+
### **Setup**
|
308
|
+
```bash
|
309
|
+
git clone https://github.com/AlexParamonov/parabot.git
|
310
|
+
cd parabot
|
311
|
+
bundle install
|
312
|
+
```
|
313
|
+
|
314
|
+
### **Testing**
|
315
|
+
```bash
|
316
|
+
bundle exec rspec # Run all tests
|
317
|
+
bundle exec rake fast # Fast test subsets
|
318
|
+
```
|
319
|
+
|
320
|
+
### **Building & Distribution**
|
321
|
+
```bash
|
322
|
+
gem build parabot.gemspec # Build gem
|
323
|
+
./scripts/build-distribution # Build standalone executable
|
324
|
+
./scripts/install # Test installation script
|
325
|
+
```
|
326
|
+
|
327
|
+
---
|
328
|
+
|
329
|
+
## 🤝 **Contributing**
|
330
|
+
|
331
|
+
1. Fork the repository
|
332
|
+
2. Create feature branch: `git checkout -b feature/amazing-feature`
|
333
|
+
3. Add tests for new functionality
|
334
|
+
4. Ensure all tests pass: `bundle exec rspec`
|
335
|
+
5. Submit pull request
|
336
|
+
|
337
|
+
---
|
338
|
+
|
339
|
+
## 📄 **License**
|
340
|
+
|
341
|
+
MIT License - see [LICENSE](LICENSE) file for details.
|
342
|
+
|
343
|
+
---
|
344
|
+
|
345
|
+
## 🆚 **Why Parabot Ruby CLI?**
|
346
|
+
|
347
|
+
**vs Manual Testing:**
|
348
|
+
- ✅ Automatic AI analysis of test results
|
349
|
+
- ✅ Contextual guidance for failures
|
350
|
+
- ✅ Multi-language support
|
351
|
+
|
352
|
+
**vs Shell Scripts:**
|
353
|
+
- ✅ Robust error handling
|
354
|
+
- ✅ Cross-platform compatibility
|
355
|
+
- ✅ Extensible architecture
|
356
|
+
- ✅ Comprehensive testing
|
357
|
+
|
358
|
+
**vs Other AI Tools:**
|
359
|
+
- ✅ TDD-focused workflow
|
360
|
+
- ✅ Seamless terminal integration
|
361
|
+
- ✅ Project-aware context
|
362
|
+
- ✅ No bundler conflicts
|
363
|
+
|
364
|
+
---
|
365
|
+
|
366
|
+
**Ready to supercharge your TDD workflow? Install parabot and start building better software with AI assistance!** 🚀
|
367
|
+
|
368
|
+
```bash
|
369
|
+
gem install parabot
|
370
|
+
parabot init && parabot start
|
371
|
+
```
|
data/Rakefile
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "bundler/gem_tasks"
|
4
|
+
require "rspec/core/rake_task"
|
5
|
+
require "rubocop/rake_task"
|
6
|
+
|
7
|
+
RSpec::Core::RakeTask.new(:spec)
|
8
|
+
RuboCop::RakeTask.new
|
9
|
+
|
10
|
+
desc "Run tests"
|
11
|
+
task test: :spec
|
12
|
+
|
13
|
+
desc "Run tests and linting"
|
14
|
+
task default: %i[test rubocop]
|
15
|
+
|
16
|
+
desc "Console with parabot loaded"
|
17
|
+
task :console do
|
18
|
+
require "bundler/setup"
|
19
|
+
require_relative "lib/parabot"
|
20
|
+
require "pry"
|
21
|
+
Pry.start
|
22
|
+
end
|
23
|
+
|
24
|
+
desc "Install the gem locally"
|
25
|
+
task :install_local do
|
26
|
+
sh "gem build parabot.gemspec"
|
27
|
+
sh "gem install parabot-*.gem"
|
28
|
+
sh "rm parabot-*.gem"
|
29
|
+
end
|
30
|
+
|
31
|
+
desc "Fast test runner with intelligent selection"
|
32
|
+
task :fast, [:options] do |t, args|
|
33
|
+
require_relative 'spec/support/performance_helpers'
|
34
|
+
|
35
|
+
options = (args[:options] || "").split
|
36
|
+
|
37
|
+
if options.include?("--benchmark")
|
38
|
+
include PerformanceHelpers
|
39
|
+
benchmark_test_suite
|
40
|
+
elsif options.include?("--unit")
|
41
|
+
sh "bundle exec rspec --format documentation --pattern 'spec/lib/**/*_spec.rb'"
|
42
|
+
elsif options.include?("--integration")
|
43
|
+
sh "bundle exec rspec --format documentation --pattern 'spec/integration/**/*_spec.rb'"
|
44
|
+
elsif options.include?("--changed")
|
45
|
+
# Run tests for changed files (simplified version)
|
46
|
+
sh "bundle exec rspec --format documentation"
|
47
|
+
else
|
48
|
+
sh "bundle exec rspec --format documentation"
|
49
|
+
end
|
50
|
+
end
|
data/config/base.yml
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# Core Parabot configuration settings
|
2
|
+
# This file contains infrastructure settings that apply to all projects
|
3
|
+
|
4
|
+
# Logging configuration
|
5
|
+
log_level: info # debug, info, warn, error
|
6
|
+
log_file: stderr # stderr or path to log file (e.g., .parabot/parabot.log)
|
7
|
+
|
8
|
+
# Language detection
|
9
|
+
language: auto # auto or specific language (elixir, ruby, etc.)
|
10
|
+
|
11
|
+
# Messaging adapter
|
12
|
+
adapter: tmux
|