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.
Files changed (51) hide show
  1. checksums.yaml +7 -0
  2. data/.rubocop.yml +55 -0
  3. data/CLAUDE.md +171 -0
  4. data/DISTRIBUTION.md +287 -0
  5. data/INSTALL.md +242 -0
  6. data/LICENSE +21 -0
  7. data/README.md +371 -0
  8. data/Rakefile +50 -0
  9. data/config/base.yml +12 -0
  10. data/config/commands.yml +28 -0
  11. data/config/core_prompts/system_prompt.yml +66 -0
  12. data/config/core_prompts/test_guidance.yml +24 -0
  13. data/config/languages/elixir.yml +62 -0
  14. data/config/languages/javascript.yml +64 -0
  15. data/config/languages/kotlin.yml +64 -0
  16. data/config/languages/ruby.yml +66 -0
  17. data/config/languages/shell.yml +63 -0
  18. data/config/languages/typescript.yml +63 -0
  19. data/exe/parabot +22 -0
  20. data/lib/parabot/cli/argument_parser.rb +105 -0
  21. data/lib/parabot/cli/command_router.rb +114 -0
  22. data/lib/parabot/cli.rb +71 -0
  23. data/lib/parabot/commands/base.rb +108 -0
  24. data/lib/parabot/commands/custom_commands.rb +63 -0
  25. data/lib/parabot/commands/doctor.rb +196 -0
  26. data/lib/parabot/commands/init.rb +171 -0
  27. data/lib/parabot/commands/message.rb +25 -0
  28. data/lib/parabot/commands/start.rb +35 -0
  29. data/lib/parabot/commands/test.rb +43 -0
  30. data/lib/parabot/commands/version.rb +17 -0
  31. data/lib/parabot/commands.rb +15 -0
  32. data/lib/parabot/configuration.rb +199 -0
  33. data/lib/parabot/dry_run_logging.rb +22 -0
  34. data/lib/parabot/errors.rb +12 -0
  35. data/lib/parabot/language_detector.rb +158 -0
  36. data/lib/parabot/language_inference.rb +82 -0
  37. data/lib/parabot/logging_setup.rb +73 -0
  38. data/lib/parabot/messaging/adapter.rb +53 -0
  39. data/lib/parabot/messaging/adapter_factory.rb +33 -0
  40. data/lib/parabot/messaging/dry_run_adapter.rb +55 -0
  41. data/lib/parabot/messaging/tmux_adapter.rb +82 -0
  42. data/lib/parabot/system.rb +41 -0
  43. data/lib/parabot/test_runner.rb +179 -0
  44. data/lib/parabot/tmux_manager.rb +245 -0
  45. data/lib/parabot/version.rb +5 -0
  46. data/lib/parabot/yaml_text_assembler.rb +155 -0
  47. data/lib/parabot.rb +30 -0
  48. data/parabot.gemspec +44 -0
  49. data/scripts/build-distribution +122 -0
  50. data/scripts/install +152 -0
  51. metadata +221 -0
data/scripts/install ADDED
@@ -0,0 +1,152 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ #
5
+ # Parabot CLI Installation Script
6
+ #
7
+ # Detects platform and installs parabot CLI appropriately
8
+ #
9
+
10
+ PARABOT_VERSION="${PARABOT_VERSION:-latest}"
11
+ INSTALL_DIR="${INSTALL_DIR:-}"
12
+ GITHUB_REPO="parabot/parabot-ruby"
13
+
14
+ # Colors for output
15
+ RED='\033[0;31m'
16
+ GREEN='\033[0;32m'
17
+ YELLOW='\033[1;33m'
18
+ BLUE='\033[0;34m'
19
+ NC='\033[0m' # No Color
20
+
21
+ log() {
22
+ echo -e "${BLUE}[INFO]${NC} $1"
23
+ }
24
+
25
+ warn() {
26
+ echo -e "${YELLOW}[WARN]${NC} $1"
27
+ }
28
+
29
+ error() {
30
+ echo -e "${RED}[ERROR]${NC} $1"
31
+ }
32
+
33
+ success() {
34
+ echo -e "${GREEN}[SUCCESS]${NC} $1"
35
+ }
36
+
37
+ # Detect platform
38
+ detect_platform() {
39
+ local os=""
40
+ local arch=""
41
+
42
+ case "$(uname -s)" in
43
+ Linux*) os="linux" ;;
44
+ Darwin*) os="macos" ;;
45
+ *)
46
+ error "Unsupported operating system: $(uname -s)"
47
+ exit 1
48
+ ;;
49
+ esac
50
+
51
+ case "$(uname -m)" in
52
+ x86_64) arch="x86_64" ;;
53
+ arm64) arch="arm64" ;;
54
+ aarch64) arch="arm64" ;;
55
+ *)
56
+ warn "Unknown architecture: $(uname -m), defaulting to x86_64"
57
+ arch="x86_64"
58
+ ;;
59
+ esac
60
+
61
+ echo "${os}-${arch}"
62
+ }
63
+
64
+ # Determine installation directory
65
+ determine_install_dir() {
66
+ if [[ -n "$INSTALL_DIR" ]]; then
67
+ echo "$INSTALL_DIR"
68
+ return
69
+ fi
70
+
71
+ # Check if user has write access to /usr/local/bin
72
+ if [[ -w "/usr/local/bin" ]] || [[ "$(id -u)" -eq 0 ]]; then
73
+ echo "/usr/local/bin"
74
+ elif [[ -d "$HOME/bin" ]] && [[ ":$PATH:" == *":$HOME/bin:"* ]]; then
75
+ echo "$HOME/bin"
76
+ elif [[ -d "$HOME/.local/bin" ]] && [[ ":$PATH:" == *":$HOME/.local/bin:"* ]]; then
77
+ echo "$HOME/.local/bin"
78
+ else
79
+ # Create ~/.local/bin if it doesn't exist
80
+ mkdir -p "$HOME/.local/bin"
81
+ echo "$HOME/.local/bin"
82
+ fi
83
+ }
84
+
85
+ # Check if Ruby is available
86
+ check_ruby() {
87
+ if ! command -v ruby >/dev/null 2>&1; then
88
+ error "Ruby is required but not installed."
89
+ error "Please install Ruby 3.0+ and try again."
90
+ error "Visit: https://www.ruby-lang.org/en/documentation/installation/"
91
+ exit 1
92
+ fi
93
+
94
+ local ruby_version
95
+ ruby_version=$(ruby -v | cut -d' ' -f2 | cut -d'p' -f1)
96
+ local major_version
97
+ major_version=$(echo "$ruby_version" | cut -d'.' -f1)
98
+ local minor_version
99
+ minor_version=$(echo "$ruby_version" | cut -d'.' -f2)
100
+
101
+ if [[ $major_version -lt 3 ]]; then
102
+ error "Ruby 3.0+ is required, but found Ruby $ruby_version"
103
+ exit 1
104
+ fi
105
+
106
+ log "Found Ruby $ruby_version ✓"
107
+ }
108
+
109
+ # Download and install
110
+ install_parabot() {
111
+ local platform
112
+ platform=$(detect_platform)
113
+
114
+ local install_dir
115
+ install_dir=$(determine_install_dir)
116
+
117
+ log "Installing parabot for $platform to $install_dir"
118
+
119
+ # For now, install via gem since we don't have platform-specific binaries yet
120
+ if command -v gem >/dev/null 2>&1; then
121
+ log "Installing via RubyGems..."
122
+ if gem install parabot; then
123
+ success "Parabot installed successfully via gem!"
124
+ else
125
+ error "Failed to install parabot via gem"
126
+ exit 1
127
+ fi
128
+ else
129
+ error "gem command not found. Please install RubyGems."
130
+ exit 1
131
+ fi
132
+ }
133
+
134
+ # Main installation flow
135
+ main() {
136
+ log "Parabot CLI Installation Script"
137
+ log "=============================="
138
+
139
+ check_ruby
140
+ install_parabot
141
+
142
+ # Verify installation
143
+ if command -v parabot >/dev/null 2>&1; then
144
+ success "Installation verified!"
145
+ log "Run 'parabot --help' to get started"
146
+ else
147
+ warn "Installation completed but 'parabot' command not found in PATH"
148
+ warn "You may need to restart your shell or add the gem bin directory to PATH"
149
+ fi
150
+ }
151
+
152
+ main "$@"
metadata ADDED
@@ -0,0 +1,221 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: parabot
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Alexander Paramonov
8
+ bindir: exe
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: dry-cli
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - "~>"
17
+ - !ruby/object:Gem::Version
18
+ version: '1.1'
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - "~>"
24
+ - !ruby/object:Gem::Version
25
+ version: '1.1'
26
+ - !ruby/object:Gem::Dependency
27
+ name: config
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - "~>"
31
+ - !ruby/object:Gem::Version
32
+ version: '5.0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '5.0'
40
+ - !ruby/object:Gem::Dependency
41
+ name: semantic_logger
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '4.15'
47
+ type: :runtime
48
+ prerelease: false
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '4.15'
54
+ - !ruby/object:Gem::Dependency
55
+ name: rake
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '13.0'
61
+ type: :development
62
+ prerelease: false
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '13.0'
68
+ - !ruby/object:Gem::Dependency
69
+ name: rspec
70
+ requirement: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '3.12'
75
+ type: :development
76
+ prerelease: false
77
+ version_requirements: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: '3.12'
82
+ - !ruby/object:Gem::Dependency
83
+ name: rubocop
84
+ requirement: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: '1.21'
89
+ type: :development
90
+ prerelease: false
91
+ version_requirements: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '1.21'
96
+ - !ruby/object:Gem::Dependency
97
+ name: rubocop-rspec
98
+ requirement: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: '2.0'
103
+ type: :development
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: '2.0'
110
+ - !ruby/object:Gem::Dependency
111
+ name: pry
112
+ requirement: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - "~>"
115
+ - !ruby/object:Gem::Version
116
+ version: '0.14'
117
+ type: :development
118
+ prerelease: false
119
+ version_requirements: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - "~>"
122
+ - !ruby/object:Gem::Version
123
+ version: '0.14'
124
+ - !ruby/object:Gem::Dependency
125
+ name: simplecov
126
+ requirement: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - "~>"
129
+ - !ruby/object:Gem::Version
130
+ version: '0.22'
131
+ type: :development
132
+ prerelease: false
133
+ version_requirements: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - "~>"
136
+ - !ruby/object:Gem::Version
137
+ version: '0.22'
138
+ description: Parabot is a multi-language TDD assistant that provides intelligent test-driven
139
+ development support across various programming languages and testing frameworks.
140
+ Features tmux integration, YAML configuration, and automatic project type detection.
141
+ email:
142
+ - alexander.n.paramonov@gmail.com
143
+ executables:
144
+ - parabot
145
+ extensions: []
146
+ extra_rdoc_files: []
147
+ files:
148
+ - ".rubocop.yml"
149
+ - CLAUDE.md
150
+ - DISTRIBUTION.md
151
+ - INSTALL.md
152
+ - LICENSE
153
+ - README.md
154
+ - Rakefile
155
+ - config/base.yml
156
+ - config/commands.yml
157
+ - config/core_prompts/system_prompt.yml
158
+ - config/core_prompts/test_guidance.yml
159
+ - config/languages/elixir.yml
160
+ - config/languages/javascript.yml
161
+ - config/languages/kotlin.yml
162
+ - config/languages/ruby.yml
163
+ - config/languages/shell.yml
164
+ - config/languages/typescript.yml
165
+ - exe/parabot
166
+ - lib/parabot.rb
167
+ - lib/parabot/cli.rb
168
+ - lib/parabot/cli/argument_parser.rb
169
+ - lib/parabot/cli/command_router.rb
170
+ - lib/parabot/commands.rb
171
+ - lib/parabot/commands/base.rb
172
+ - lib/parabot/commands/custom_commands.rb
173
+ - lib/parabot/commands/doctor.rb
174
+ - lib/parabot/commands/init.rb
175
+ - lib/parabot/commands/message.rb
176
+ - lib/parabot/commands/start.rb
177
+ - lib/parabot/commands/test.rb
178
+ - lib/parabot/commands/version.rb
179
+ - lib/parabot/configuration.rb
180
+ - lib/parabot/dry_run_logging.rb
181
+ - lib/parabot/errors.rb
182
+ - lib/parabot/language_detector.rb
183
+ - lib/parabot/language_inference.rb
184
+ - lib/parabot/logging_setup.rb
185
+ - lib/parabot/messaging/adapter.rb
186
+ - lib/parabot/messaging/adapter_factory.rb
187
+ - lib/parabot/messaging/dry_run_adapter.rb
188
+ - lib/parabot/messaging/tmux_adapter.rb
189
+ - lib/parabot/system.rb
190
+ - lib/parabot/test_runner.rb
191
+ - lib/parabot/tmux_manager.rb
192
+ - lib/parabot/version.rb
193
+ - lib/parabot/yaml_text_assembler.rb
194
+ - parabot.gemspec
195
+ - scripts/build-distribution
196
+ - scripts/install
197
+ homepage: https://github.com/AlexParamonov/parabot
198
+ licenses:
199
+ - MIT
200
+ metadata:
201
+ homepage_uri: https://github.com/AlexParamonov/parabot
202
+ source_code_uri: https://github.com/AlexParamonov/parabot
203
+ changelog_uri: https://github.com/AlexParamonov/parabot/blob/main/CHANGELOG.md
204
+ rdoc_options: []
205
+ require_paths:
206
+ - lib
207
+ required_ruby_version: !ruby/object:Gem::Requirement
208
+ requirements:
209
+ - - ">="
210
+ - !ruby/object:Gem::Version
211
+ version: 3.0.0
212
+ required_rubygems_version: !ruby/object:Gem::Requirement
213
+ requirements:
214
+ - - ">="
215
+ - !ruby/object:Gem::Version
216
+ version: '0'
217
+ requirements: []
218
+ rubygems_version: 3.7.1
219
+ specification_version: 4
220
+ summary: AI-powered Test-Driven Development parallel assistant with tmux integration
221
+ test_files: []