soba CLI

日本語版はこちら
Autonomous GitHub Issue workflow automation CLI that bridges GitHub Issues with Claude Code, enabling AI-driven development cycles.
Overview
soba CLI automates the entire development workflow from issue creation to pull request merging. It monitors GitHub Issues, automatically processes them through planning, implementation, review, and merge phases using Claude Code AI assistance.
Key Features
- 🤖 Autonomous Workflow: Fully automated issue-to-merge pipeline
- 🏷️ Label-Driven State Management: Progress tracking via GitHub labels
- 🔄 Continuous Processing: Automatic polling and phase transitions
- 🎯 Priority Management: Sequential processing by issue number
- 🪟 Tmux Integration: Visual monitoring of AI processes
- 🔀 Git Worktree Support: Isolated branch management
- 🚀 Auto-Merge: Automatic PR merging after approval
Workflow
graph TD
A[Multiple soba:todo] -->|soba: Priority check| B[One becomes soba:queued]
B -->|soba: Immediately| C[soba:planning]
C -->|Claude: Plan creation| D[soba:ready]
D -->|soba: Auto-detect| E[soba:doing]
E -->|Claude: Implement & PR| F[soba:review-requested]
F -->|soba: Auto-detect| G[soba:reviewing]
G -->|Claude: Approve| H[soba:done + PR:soba:lgtm]
G -->|Claude: Request changes| I[soba:requires-changes]
I -->|soba: Auto-detect| K[soba:revising]
K -->|Claude: Apply fixes| F
H -->|soba: Auto-merge| J[soba:merged]
J -->|Next queuing| A
Installation
As a Ruby Gem
gem install soba-cli
From Source
git clone https://github.com/douhashi/soba-cli.git
cd soba-cli
bundle install
bin/soba --help
Quick Start
⚠ Important Notice ⚠
soba uses --dangerously-skip-permissions
by default to support AI-driven autonomous development. (This can be disabled in the configuration file)
When using default settings, please take necessary precautions such as using devcontainers and restricting external access.
-
Initialize configuration
soba init
-
Configure settings
Edit .soba/config.yml
:
github:
auth_method: gh
repository: owner/repo
-
Start automation
soba start
-
Create an issue with label
Add soba:todo
label to any GitHub issue to start automated processing.
Configuration
Configuration file location: .soba/config.yml
(in project root)
GitHub Authentication
soba supports multiple authentication methods:
Full Configuration Example
github:
auth_method: gh
repository: douhashi/soba-cli
workflow:
interval: 20
use_tmux: true
auto_merge_enabled: true
closed_issue_cleanup_enabled: true
closed_issue_cleanup_interval: 300
tmux_command_delay: 3
slack:
webhook_url: ${SLACK_WEBHOOK_URL}
notifications_enabled: false
git:
worktree_base_path: .git/soba/worktrees
setup_workspace: true
phase:
plan:
command: claude
options:
- --dangerously-skip-permissions
parameter: '/soba:plan {{issue-number}}'
implement:
command: claude
options:
- --dangerously-skip-permissions
parameter: '/soba:implement {{issue-number}}'
review:
command: claude
options:
- --dangerously-skip-permissions
parameter: '/soba:review {{issue-number}}'
revise:
command: claude
options:
- --dangerously-skip-permissions
parameter: '/soba:revise {{issue-number}}'
Environment Variables
GITHUB_TOKEN | GitHub Personal Access Token with repo/read:org/write:discussion scopes | Yes |
SLACK_WEBHOOK_URL | Slack Webhook URL | No |
Claude Command Templates
Soba automatically deploys Claude command templates to .claude/commands/soba/
during initialization. These templates define the workflow automation commands for each phase:
- plan.md - Issue planning phase template
- implement.md - Implementation phase template
- review.md - PR review phase template
- revise.md - Revision phase template
These templates are included in the gem package and can be found in:
lib/soba/templates/claude_commands/
Commands
soba init
Initialize soba configuration in the current project.
soba init
soba init --interactive
soba start
Start the workflow automation daemon.
soba start
soba start --daemon
soba start 123
soba start --no-tmux
soba status
Show daemon status and recent logs.
soba status
soba status --log 50
soba status --json
soba stop
Stop the running daemon.
soba stop
soba stop --force
soba stop --timeout 60
soba open
Open or list tmux sessions for tasks.
soba open
soba open --list
soba config
Display current configuration.
soba config
soba --config /path/to/config.yml config
Label System
Issue Labels (State Management)
soba:todo | Waiting | New issue awaiting processing |
soba:queued | Queued | Selected for processing |
soba:planning | Planning | Claude creating implementation plan |
soba:ready | Ready | Plan complete, awaiting implementation |
soba:doing | Implementing | Claude working on implementation |
soba:review-requested | Review Pending | PR created, awaiting review |
soba:reviewing | Reviewing | Claude reviewing PR |
soba:done | Complete | Review approved, ready to merge |
soba:requires-changes | Changes Needed | Review requested modifications |
soba:revising | Revising | Claude applying requested changes |
soba:merged | Merged | PR merged and issue closed |
PR Labels
soba:lgtm | Review approved, eligible for auto-merge |
Development
Directory Structure
lib/
├── soba/
│ ├── cli/ # CLI framework setup
│ ├── commands/ # Command implementations
│ ├── domain/ # Domain models
│ ├── services/ # Business logic
│ └── infrastructure/ # External integrations
Running Tests
bundle exec rspec
bundle exec rake coverage
bundle exec rspec spec/unit/
Code Quality
bundle exec rubocop
bundle exec rubocop -a
bundle exec bundler-audit
Git Hooks
The project uses pre-commit hooks for code quality:
- Automatic Rubocop fixes
- Re-staging after auto-fixes
- Block commits with manual fix requirements
Setup hooks:
./scripts/setup-hooks.sh
Requirements
- Ruby >= 3.0
- Git
- tmux (optional, but recommended)
- GitHub Personal Access Token
- Claude Code CLI (
claude
command)
Architecture
soba CLI follows a layered architecture:
- Commands Layer: CLI command definitions and parsing
- Domain Layer: Core business models and logic
- Services Layer: Workflow orchestration and state management
- Infrastructure Layer: GitHub API and external tool integration
For detailed architecture documentation, see docs/development/architecture.md.
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
)
- Commit changes (
git commit -m 'Add amazing feature'
)
- Push to branch (
git push origin feature/amazing-feature
)
- Open a Pull Request
Please ensure:
- All tests pass (
bundle exec rspec
)
- Rubocop checks pass (
bundle exec rubocop
)
- Code coverage remains high
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
Acknowledgments