cbwsh

command module
v0.0.0-...-81fcdeb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 3 Imported by: 0

README ΒΆ

cbwsh 🐚

A Modern, AI-Powered Terminal Shell Built with Bubble Tea

cbwsh is a next-generation terminal shell that combines the power of traditional shells (bash/zsh) with modern TUI components, AI assistance, and advanced features for developers and power users.

Build Status Go Report Card

cbwsh Demo

✨ Features

🎨 Modern Terminal UI
  • Multi-pane Support - Split your terminal horizontally, vertically, or in a grid layout
  • Figma-inspired Design System - Beautiful, consistent UI with customizable themes
  • Syntax Highlighting - Shell commands highlighted in real-time
  • Visual Effects - Water ripples, fluid simulations, spring animations
  • Markdown Rendering - View documentation with rich formatting
  • Menu Bar - File, Edit, View, and Help menus for easy navigation
πŸ€– AI Integration
  • Multiple AI Providers - OpenAI, Anthropic Claude, Google Gemini, Local LLMs (Ollama)
  • Natural Language Commands - Ask AI to generate commands for you
  • Error Fix Suggestions - AI analyzes failed commands and suggests fixes
  • AI Monitor Pane - Real-time activity tracking with contextual recommendations
  • Command Explanations - Learn what commands do before running them
  • Smart Suggestions - Context-aware command completion
πŸ” Security & Secrets
  • Encrypted Secrets Storage - AES-256-GCM encryption with Argon2id key derivation
  • SSH Key Management - Store and manage SSH keys securely
  • API Key Storage - Safely store API keys for various services
  • Multiple Encryption Backends - Support for Age and GPG
🌐 SSH & Remote Access
  • SSH Connection Manager - Save and manage SSH connections
  • Key-based Authentication - Secure SSH with public key authentication
  • Port Forwarding - Local and remote port forwarding support
  • Known Hosts Management - Security through host key verification
🎯 Developer Features
  • Git Integration - View status, branches, and diffs
  • Command History - Persistent, searchable command history
  • Smart Autocompletion - File paths, commands, environment variables
  • Job Control - Manage background jobs
  • Plugin System - Extensible architecture for custom functionality
  • Custom Themes - Default, Dracula, Nord, and more
⚑ Performance
  • Lightweight - Built with Go for speed and efficiency
  • Concurrent Panes - Each pane runs independently
  • Optimized Rendering - Smooth animations and responsive UI

πŸ“¦ Installation

Quick Install (Linux/macOS)
curl -fsSL https://raw.githubusercontent.com/cbwinslow/cbwsh/main/install.sh | bash
Quick Install (Windows)
irm https://raw.githubusercontent.com/cbwinslow/cbwsh/main/install.ps1 | iex
Install with Go
go install github.com/cbwinslow/cbwsh@latest
Build from Source
git clone https://github.com/cbwinslow/cbwsh.git
cd cbwsh
make build
sudo make install

For detailed installation instructions, see INSTALL.md.

πŸš€ Quick Start

Starting cbwsh

Simply run:

cbwsh
Basic Key Bindings
Key Action
Ctrl+Q Quit cbwsh
Ctrl+? Show help
Ctrl+A AI assist mode
Ctrl+M Toggle AI monitor
Ctrl+N New pane
Ctrl+] Next pane
Ctrl+\ Split vertical
Ctrl+- Split horizontal
Tab Autocomplete
↑/↓ Command history

For complete key bindings, see USAGE.md.

Using AI Features
  1. Install Ollama (recommended for privacy):
curl https://ollama.ai/install.sh | sh
ollama pull llama2
  1. Configure AI in cbwsh: Create ~/.cbwsh/config.yaml:
ai:
  provider: ollama
  ollama_url: http://localhost:11434
  ollama_model: llama2
  enable_monitoring: true
  1. Enable AI Monitor: Press Ctrl+M to open the AI monitor pane

  2. Use AI Assist: Press Ctrl+A and ask: "How do I find large files?"

🎨 Multi-Pane Workflow

cbwsh supports multiple panes for efficient multitasking:

# Start cbwsh
cbwsh

# Split vertically (Ctrl+\)
# Now you have left and right panes

# In left pane: Edit code
vim main.go

# Switch to right pane (Ctrl+])
# Split horizontally (Ctrl+-)

# In right pane top: Build/test
go build && go test

# In right pane bottom: Monitor
watch -n 2 git status
Pane Layouts
  • Single - One full-screen pane (default)
  • Horizontal Split - Two panes side by side
  • Vertical Split - Two panes stacked
  • Grid - Four panes in a 2x2 grid
  • Custom - Create your own layout

πŸ“š Documentation

βš™οΈ Configuration

cbwsh uses YAML configuration files. Create ~/.cbwsh/config.yaml:

# Shell settings
shell:
  default_shell: bash          # or zsh
  history_size: 10000
  history_path: ~/.cbwsh/history

# UI settings
ui:
  theme: default              # default, dracula, nord
  layout: single              # single, horizontal, vertical, grid
  show_status_bar: true
  enable_animations: true
  syntax_highlighting: true

# AI settings
ai:
  provider: ollama            # none, ollama, openai, anthropic, gemini
  ollama_url: http://localhost:11434
  ollama_model: llama2
  enable_monitoring: true
  monitoring_interval: 30     # seconds

# SSH settings
ssh:
  default_user: your-username
  key_path: ~/.ssh/id_rsa
  known_hosts: ~/.ssh/known_hosts

# Secrets settings
secrets:
  store_path: ~/.cbwsh/secrets.enc
  encryption_algorithm: AES-256-GCM

🀝 AI Agents for Code Review

cbwsh integrates with multiple AI agents for automated code review and assistance:

  • CodeRabbit - Automated PR reviews
  • GitHub Copilot - Code suggestions
  • OpenAI Codex - Code generation
  • Google Gemini - Multimodal AI
  • Anthropic Claude - Long-context analysis

See AGENTS.md for configuration details.

πŸ› οΈ Development

Prerequisites
  • Go 1.24 or later
  • Make
  • Git
Building
# Build the binary
make build

# Run tests
make test

# Run linter
make lint

# Install locally
make install
Project Structure
cbwsh/
β”œβ”€β”€ cmd/            # Command-line interface
β”œβ”€β”€ internal/       # Internal application code
β”‚   └── app/        # Main application logic
β”œβ”€β”€ pkg/            # Public packages
β”‚   β”œβ”€β”€ ai/         # AI integration
β”‚   β”œβ”€β”€ config/     # Configuration management
β”‚   β”œβ”€β”€ panes/      # Pane management
β”‚   β”œβ”€β”€ secrets/    # Secrets storage
β”‚   β”œβ”€β”€ shell/      # Shell execution
β”‚   β”œβ”€β”€ ssh/        # SSH management
β”‚   └── ui/         # UI components
β”œβ”€β”€ test/           # Integration tests
└── examples/       # Example applications

🎯 Use Cases

For Developers
  • Split panes for code editing, building, and testing
  • AI-assisted debugging and error fixing
  • Git operations with visual feedback
  • SSH into remote servers with saved configurations
For DevOps
  • Monitor multiple servers in different panes
  • Execute commands across multiple machines
  • Track system metrics with AI analysis
  • Manage secrets and credentials securely
For Data Scientists
  • Run long-running jobs with progress tracking
  • AI-powered command suggestions
  • Manage Python/R environments
  • SSH tunnel management for Jupyter notebooks
For System Administrators
  • Multi-server management
  • Automated task scheduling
  • Security audit with AI insights
  • Centralized secret management

🌟 Inspiration

cbwsh draws inspiration from:

  • Warp - AI-powered terminal
  • Fig - Autocomplete and AI features
  • tmux - Terminal multiplexing
  • Zellij - Modern workspace
  • Bubble Tea - TUI framework

πŸ“ License

cbwsh is licensed under the MIT License. See LICENSE for details.

πŸ™ Acknowledgments

Built with the amazing Bubble Tea ecosystem:

πŸ› Bug Reports & Feature Requests

Found a bug or have a feature request? Please open an issue on GitHub Issues.

πŸ’¬ Community

πŸš€ Roadmap

See TODO.md for planned features and improvements.


Made with ❀️ and β˜• by the cbwsh team

Documentation ΒΆ

Overview ΒΆ

cbwsh - Custom Bubble Tea Shell

A modern, modular terminal shell built with the Bubble Tea ecosystem. cbwsh provides rich TUI components, AI integration, multi-pane support, and advanced shell features in an elegant terminal interface.

Usage:

cbwsh [flags]

The shell starts in interactive mode by default. Use keyboard shortcuts to access various features:

  • Ctrl+Q: Quit
  • Ctrl+?: Help
  • Ctrl+A: AI assist mode
  • Ctrl+M: Toggle AI monitor

For more information, visit: https://github.com/cbwinslow/cbwsh

Directories ΒΆ

Path Synopsis
Package main demonstrates the cbwsh design system usage.
Package main demonstrates the cbwsh design system usage.
internal
app
Package app provides the main application logic for cbwsh.
Package app provides the main application logic for cbwsh.
pkg
ai
Package ai provides AI integration for cbwsh.
Package ai provides AI integration for cbwsh.
ai/context
Package context provides context-aware suggestions for cbwsh.
Package context provides context-aware suggestions for cbwsh.
ai/errorfix
Package errorfix provides error fix suggestions for cbwsh.
Package errorfix provides error fix suggestions for cbwsh.
ai/models
Package models provides runtime model switching for cbwsh AI.
Package models provides runtime model switching for cbwsh AI.
ai/monitor
Package monitor provides shell activity monitoring with AI-powered recommendations.
Package monitor provides shell activity monitoring with AI-powered recommendations.
ai/nlp
Package nlp provides natural language to command translation for cbwsh.
Package nlp provides natural language to command translation for cbwsh.
ai/ollama
Package ollama provides integration with Ollama for local LLM inference.
Package ollama provides integration with Ollama for local LLM inference.
clipboard
Package clipboard provides cross-platform clipboard support for cbwsh.
Package clipboard provides cross-platform clipboard support for cbwsh.
commands/data
Package data provides command implementations for structured data operations
Package data provides command implementations for structured data operations
config
Package config provides configuration management for cbwsh.
Package config provides configuration management for cbwsh.
core
Package core provides fundamental types, interfaces, and enums for the cbwsh shell.
Package core provides fundamental types, interfaces, and enums for the cbwsh shell.
data
Package data provides parsers for common data formats
Package data provides parsers for common data formats
logging
Package logging provides structured logging infrastructure for cbwsh.
Package logging provides structured logging infrastructure for cbwsh.
panes
Package panes provides terminal pane management for cbwsh.
Package panes provides terminal pane management for cbwsh.
plugins
Package plugins provides plugin management for cbwsh.
Package plugins provides plugin management for cbwsh.
posix
Package posix provides POSIX-compliant system calls and signal handling for cbwsh.
Package posix provides POSIX-compliant system calls and signal handling for cbwsh.
privileges
Package privileges provides privilege checking and elevation for cbwsh.
Package privileges provides privilege checking and elevation for cbwsh.
process
Package process provides job control and process management for cbwsh.
Package process provides job control and process management for cbwsh.
secrets
Package secrets provides secure secrets management for cbwsh.
Package secrets provides secure secrets management for cbwsh.
shell
Package shell provides shell execution functionality for cbwsh.
Package shell provides shell execution functionality for cbwsh.
ssh
Package ssh provides SSH connection management for cbwsh.
Package ssh provides SSH connection management for cbwsh.
ui/aichat
Package aichat provides a resizable AI chat pane component for cbwsh.
Package aichat provides a resizable AI chat pane component for cbwsh.
ui/aimonitor
Package aimonitor provides a dedicated AI monitoring pane for shell activity.
Package aimonitor provides a dedicated AI monitoring pane for shell activity.
ui/animation
Package animation provides animation utilities using harmonica for cbwsh.
Package animation provides animation utilities using harmonica for cbwsh.
ui/autocomplete
Package autocomplete provides autocompletion for cbwsh.
Package autocomplete provides autocompletion for cbwsh.
ui/components
Package components provides reusable UI components following Figma design principles.
Package components provides reusable UI components following Figma design principles.
ui/editor
Package editor provides a markdown editor component for cbwsh.
Package editor provides a markdown editor component for cbwsh.
ui/effects
Package effects provides visual effects for cbwsh using harmonica physics.
Package effects provides visual effects for cbwsh using harmonica physics.
ui/highlight
Package highlight provides syntax highlighting for cbwsh.
Package highlight provides syntax highlighting for cbwsh.
ui/markdown
Package markdown provides markdown rendering for cbwsh.
Package markdown provides markdown rendering for cbwsh.
ui/menu
Package menu provides a menu bar UI component for cbwsh.
Package menu provides a menu bar UI component for cbwsh.
ui/notifications
Package notifications provides toast notifications for cbwsh.
Package notifications provides toast notifications for cbwsh.
ui/palette
Package palette provides a command palette (Ctrl+P) for cbwsh.
Package palette provides a command palette (Ctrl+P) for cbwsh.
ui/progress
Package progress provides progress bar components for cbwsh.
Package progress provides progress bar components for cbwsh.
ui/registry
Package registry provides a component registry system for cbwsh UI components, similar to shadcn/ui.
Package registry provides a component registry system for cbwsh UI components, similar to shadcn/ui.
ui/styles
Package styles provides UI styling for cbwsh.
Package styles provides UI styling for cbwsh.
ui/themes
Package themes provides theme management with hot-reloading for cbwsh.
Package themes provides theme management with hot-reloading for cbwsh.
ui/tokens
Package tokens provides design tokens for cbwsh.
Package tokens provides design tokens for cbwsh.
vcs/git
Package git provides git integration for cbwsh.
Package git provides git integration for cbwsh.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL