Juricode CLI
We are forging the future with lines of digital steel
A CLI version of the OpenHands frontend, providing command-line access to OpenHands functionality.
Installation
npm install -g @graphteon/juricode
Usage
juricode --help
Features
- SSH Tunneling: Automatic SSH tunnel setup for remote OpenHands instances
- VSCode Integration:
/editor command for direct VSCode access through SSH tunnels
- Suggested Tasks: Browse and start working on AI-suggested tasks from your repositories
- Multi-Provider Support: GitHub, GitLab, and Bitbucket integration
- Enhanced Performance: Optimized React rendering and smooth typing experience
- Smart Pagination: 20-item windowed display for large lists
- Clean UI: Filtered system messages and duplicate prevention
- Modern API: Updated to match OpenHands frontend v0.45.0
- CLI Interface: Full command-line access to OpenHands features
Recent Updates (v0.3.0)
Major New Features
- SSH Tunneling System: Automatic SSH connection and port forwarding to remote OpenHands instances
- VSCode Integration:
/editor command opens VSCode through SSH tunnels for seamless remote development
- Enhanced Performance: Fixed typing glitches and optimized React rendering with memoization
- Smart UI Improvements: 20-item pagination, duplicate message prevention, and system message filtering
Technical Improvements
- SSH Library Migration: Replaced
node-ssh with ssh2 for better tunneling control
- React Optimization: Implemented
useMemo, useCallback, and React.memo for smooth performance
- Message Deduplication: Unique ID tracking prevents duplicate messages in conversations
- Reliable Exit: Enhanced exit functionality with
process.exit(0) and proper cleanup
- WebSocket Management: Improved connection lifecycle and state management
Bug Fixes
- Fixed conversation typing glitches and re-rendering issues
- Resolved duplicate messages when loading existing conversations
- Enhanced exit handling for reliable application termination
- Improved SSH authentication flow with proper async handling
- Fixed layout issues in repositories and suggested tasks views
Previous Updates (v0.2.0)
- Suggested Tasks Menu: Browse failing checks, merge conflicts, and open issues
- Added Bitbucket provider support
- Enhanced settings with budget management (
MAX_BUDGET_PER_TASK)
- Email verification support (
EMAIL, EMAIL_VERIFIED)
- Updated API client to match OpenHands frontend structure
- Improved TypeScript configuration with DOM support
Development
npm install
npm run build
Build Scripts
npm run build:esm - Build ES modules
npm run build:cjs - Build CommonJS modules
npm run build:types - Generate TypeScript declarations
npm run build - Build all formats
Usage Guide
Main Menu Options
- 📋 View All Tasks - Browse existing conversations and tasks
- 💡 Suggested Tasks - Browse AI-suggested tasks from your repositories
- Failing CI/CD checks that need attention
- Merge conflicts requiring resolution
- Open issues ready for development
- 📚 Browse Repositories - Explore your connected repositories
- 📝 Create New Task - Start a new conversation/task manually
SSH Tunneling & VSCode Integration
JuriCode now includes automatic SSH tunneling for seamless remote development:
- Automatic SSH Setup: Connects to
ubuntu@aigw.biznetgio.dev and forwards port 3000
- VSCode Integration: Use
/editor command in any conversation to open VSCode
- Seamless Development: Work on remote OpenHands instances as if they were local
Special Commands in Conversations
/editor: Opens VSCode through SSH tunnel for direct code editing
exit: Cleanly exits the conversation and returns to main menu
Suggested Tasks Workflow
- Select "💡 Suggested Tasks" from main menu
- Browse categorized tasks (20 items per page):
- ❌ FAILING_CHECKS - CI/CD failures needing fixes
- 🔀 MERGE_CONFLICTS - Pull requests with conflicts
- 📋 OPEN_ISSUE - Issues ready for development
- Select a task to view details
- Choose "🚀 Start Working on Task" to create a conversation
- Use
/editor command for direct code editing when needed
- Optionally start an immediate chat session with the AI
Configuration
Environment Variables
Set the OpenHands base URL:
export JURICODE_BASE_URL=http://localhost:3000
For websocket connections (if different from base URL):
export JURICODE_WS_URL=http://localhost:3000
Set connection timeout (default: 10000ms):
export JURICODE_TIMEOUT=15000
SSH Tunneling Configuration
JuriCode includes built-in SSH tunneling that automatically connects to remote OpenHands instances:
Default SSH Configuration:
- Host:
ubuntu@aigw.biznetgio.dev
- Port forwarding: Remote port 3000 → Local port 3000
- Authentication: SSH key-based (uses your default SSH key)
Manual SSH Setup (if needed):
ssh -L 3000:localhost:3000 ubuntu@aigw.biznetgio.dev
export JURICODE_BASE_URL=http://localhost:3000
juricode
Troubleshooting
SSH Connection Issues:
- SSH Key Setup: Ensure your SSH key is added to the remote server
- Network Access: Verify you can reach
aigw.biznetgio.dev
- Port Conflicts: Check if local port 3000 is already in use
WebSocket Connection Issues:
- Check OpenHands Backend: Ensure OpenHands backend is running on remote server
- Verify URL: Make sure
JURICODE_BASE_URL points to http://localhost:3000
- SSH Tunnel: Verify SSH tunnel is active and forwarding port 3000
- Firewall: Check if firewall is blocking SSH or local port access
VSCode Integration Issues:
- SSH Tunnel: Ensure SSH tunnel is established before using
/editor
- VSCode Installation: Verify VSCode is installed and accessible via
code command
- Remote Access: Check that VSCode can connect through the SSH tunnel
Configuration Examples
Standard Usage (with built-in SSH tunneling):
export JURICODE_BASE_URL=http://localhost:3000
juricode
Local Development:
export JURICODE_BASE_URL=http://localhost:3000
juricode
Custom Remote Server:
ssh -L 3000:localhost:3000 user@your-remote-host
export JURICODE_BASE_URL=http://localhost:3000
juricode
VSCode Integration:
License
MIT
Contributing
This project is synchronized with the OpenHands frontend. When updating, ensure compatibility with the latest OpenHands release.