{"id":50662320,"url":"https://github.com/kshivang/bossterm","last_synced_at":"2026-06-30T23:01:25.158Z","repository":{"id":324348698,"uuid":"1096044594","full_name":"kshivang/BossTerm","owner":"kshivang","description":"Pure Kotlin Terminal Emulator. Works with SSH and PTY.","archived":false,"fork":false,"pushed_at":"2026-06-24T11:43:49.000Z","size":115062,"stargazers_count":49,"open_issues_count":5,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-06-24T13:22:18.664Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.bossterm.com","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"JetBrains/jediterm","license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kshivang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE-2.0.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-13T21:39:16.000Z","updated_at":"2026-06-23T15:48:10.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kshivang/BossTerm","commit_stats":null,"previous_names":["kshivang/jeditermcompose"],"tags_count":86,"template":false,"template_full_name":null,"purl":"pkg:github/kshivang/BossTerm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kshivang%2FBossTerm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kshivang%2FBossTerm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kshivang%2FBossTerm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kshivang%2FBossTerm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kshivang","download_url":"https://codeload.github.com/kshivang/BossTerm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kshivang%2FBossTerm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34986248,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-30T02:00:05.919Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-08T03:08:37.168Z","updated_at":"2026-06-30T23:01:25.145Z","avatar_url":"https://github.com/kshivang.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"BossTerm.png\" alt=\"BossTerm\" width=\"140\"\u003e\n\n# BossTerm\n\n**A blazing-fast terminal you can embed, share to any device, and hand to your AI.**\n\n[![CI](https://github.com/kshivang/BossTerm/actions/workflows/test.yml/badge.svg)](https://github.com/kshivang/BossTerm/actions/workflows/test.yml)\n[![Release](https://github.com/kshivang/BossTerm/actions/workflows/release.yml/badge.svg)](https://github.com/kshivang/BossTerm/releases)\n[![Download DMG](https://img.shields.io/github/v/release/kshivang/BossTerm?label=Download%20DMG\u0026logo=apple)](https://github.com/kshivang/BossTerm/releases/latest)\n[![Maven Central](https://img.shields.io/maven-central/v/com.risaboss/bossterm-core)](https://central.sonatype.com/namespace/com.risaboss)\n\n\u003c/div\u003e\n\n| ⚡ [**Fast**](#performance) | 📱 [**Share**](#session-sharing) | 🤖 [**MCP for AI**](#bossterm-mcp) | 🧩 [**Embeddable**](#embedding-in-your-app) |\n|:--:|:--:|:--:|:--:|\n| 1,645 MB/s — edges out Alacritty | Watch \u0026 control from any device | Expose tabs to Claude Code \u0026 co. | Drop it into your Compose app |\n\nA modern terminal emulator built with **Kotlin** and **Compose Desktop** — high-performance, deeply customizable, and feature-rich on macOS, Linux, and Windows.\n\n## Performance\n\nBossTerm delivers **industry-leading throughput** for developer workflows. Benchmarked against iTerm2, Terminal.app, and Alacritty (December 2025, **Latency Mode**):\n\n### Raw Throughput @ 50MB (MB/s) - Higher is Better\n```\nBossTerm   ████████████████████████████████████████████████████ 1,645 MB/s ✓\nAlacritty  ██████████████████████████████████████████████████   1,633 MB/s\niTerm2     █████████████████████████████████████████████████    1,599 MB/s\nTerminal   ████████████████████████████████████████████████     1,491 MB/s\n```\n\n### Raw Throughput @ 1MB (MB/s) - Higher is Better\n```\nBossTerm   ████████████████████████████████████████████████████  364 MB/s ✓\niTerm2     ███████████████████████████████████                   255 MB/s\nTerminal   ██████████████████████████████████                    249 MB/s\nAlacritty  █████████████████████████████████                     233 MB/s\n```\n\n### Variation Selectors (chars/sec) - Higher is Better\n```\nBossTerm   ████████████████████████████████████████████████████  1.01M ✓\niTerm2     █████████████████████████████████████████████████     904K\nTerminal   ████████████████████████████████████████████████      879K\nAlacritty  █████████████████████████████████████████████         829K\n```\n\n### htop Simulation (ms) - Lower is Better\n```\nBossTerm   ████████████████████████████████████████████████      3.09 ms ✓\nTerminal   █████████████████████████████████████████████████████ 3.21 ms\niTerm2     ██████████████████████████████████████████████████████ 3.55 ms\nAlacritty  ███████████████████████████████████████████████████████ 3.72 ms\n```\n\n| Benchmark | BossTerm vs iTerm2 |\n|-----------|-------------------|\n| Raw Throughput (1MB) | **+43% faster** |\n| Raw Throughput (5MB) | **+24% faster** |\n| Raw Throughput (50MB) | **+3% faster** |\n| Variation Selectors | **+12% faster** |\n| CJK Characters | **+10% faster** |\n| Powerline | **+10% faster** |\n| htop Simulation | **+13% faster** |\n| Git Diff Simulation | **+5% faster** |\n| Flags Emoji | **+3% faster** |\n\n\u003e **Full benchmark details:** [benchmark/README.md](benchmark/README.md) | [Detailed Results](benchmark_results/BENCHMARK_SUMMARY.md)\n\n## Installation\n\n### Universal Installer (Recommended)\n\n[![Install Script](https://github.com/kshivang/BossTerm/actions/workflows/test-install.yml/badge.svg)](https://github.com/kshivang/BossTerm/actions/workflows/test-install.yml)\n\nThe universal installer automatically detects your platform and installs BossTerm using the best method available.\n\n| Platform | Command |\n|----------|---------|\n| **macOS / Linux** | `curl -fsSL https://raw.githubusercontent.com/kshivang/BossTerm/master/install.sh \\| bash` |\n| **Windows (PowerShell)** | `iwr -useb https://raw.githubusercontent.com/kshivang/BossTerm/master/install.ps1 \\| iex` |\n| **Windows (CMD)** | `curl -fsSL https://raw.githubusercontent.com/kshivang/BossTerm/master/install.bat -o install.bat \u0026\u0026 install.bat` |\n\n**Features:**\n- Auto-detects platform (macOS, Linux, Windows) and architecture (x64, ARM64)\n- Uses the best installation method (Homebrew → DMG on macOS, Deb → RPM → Snap → JAR on Linux)\n- Installs Java 17+ automatically if needed (Windows)\n- Creates CLI launcher (`bossterm` command)\n- Supports `--version`, `--uninstall`, `--dry-run`, and `--method` flags\n\n**Common operations:**\n\n```bash\n# Install specific version\ncurl -fsSL https://raw.githubusercontent.com/kshivang/BossTerm/master/install.sh | bash -s -- --version 1.0.80\n\n# Preview without installing\ncurl -fsSL https://raw.githubusercontent.com/kshivang/BossTerm/master/install.sh | bash -s -- --dry-run\n\n# Force specific method (homebrew, dmg, deb, rpm, snap, jar)\ncurl -fsSL https://raw.githubusercontent.com/kshivang/BossTerm/master/install.sh | bash -s -- --method dmg\n\n# Uninstall\ncurl -fsSL https://raw.githubusercontent.com/kshivang/BossTerm/master/install.sh | bash -s -- --uninstall\n```\n\n---\n\n### Alternative Installation Methods\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003emacOS (Homebrew)\u003c/strong\u003e\u003c/summary\u003e\n\n```bash\nbrew tap kshivang/bossterm\nbrew install --cask bossterm\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003emacOS (DMG)\u003c/strong\u003e\u003c/summary\u003e\n\nDownload the latest DMG from [GitHub Releases](https://github.com/kshivang/BossTerm/releases) and drag BossTerm to Applications.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eLinux (Debian/Ubuntu)\u003c/strong\u003e\u003c/summary\u003e\n\n```bash\n# Download the .deb package from GitHub Releases\nsudo dpkg -i bossterm_*_amd64.deb\nsudo apt-get install -f  # Install dependencies if needed\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eLinux (Fedora/RHEL)\u003c/strong\u003e\u003c/summary\u003e\n\n```bash\n# Download the .rpm package from GitHub Releases\nsudo dnf install bossterm-*.x86_64.rpm\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eLinux (Snap)\u003c/strong\u003e\u003c/summary\u003e\n\n```bash\nsudo snap install bossterm --classic\n```\n\nOr download the `.snap` file from [GitHub Releases](https://github.com/kshivang/BossTerm/releases) and install manually:\n\n```bash\nsudo snap install bossterm_*.snap --classic --dangerous\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eJAR (Cross-platform)\u003c/strong\u003e\u003c/summary\u003e\n\nRequires Java 17+:\n\n```bash\n# Download bossterm-*.jar from GitHub Releases\njava -jar bossterm-*.jar\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eBuild from Source\u003c/strong\u003e\u003c/summary\u003e\n\n```bash\ngit clone https://github.com/kshivang/BossTerm.git\ncd BossTerm\n./gradlew :bossterm-app:run\n```\n\n\u003c/details\u003e\n\n## Features\n\n- **Native Performance** - Built with Kotlin/Compose Desktop for smooth 60fps rendering\n- **Multiple Windows** - Cmd/Ctrl+N opens new window, each with independent tabs\n- **Multiple Tabs** - Ctrl+T new tab, Ctrl+W close, Ctrl+Tab switch\n- **Split Panes** - Horizontal/vertical splits with Cmd+D / Cmd+Shift+D\n- **Themes** - Built-in theme presets (Dracula, Solarized, Nord, etc.) with custom theme support\n- **Window Transparency** - Adjustable opacity with background blur effects\n- **Background Images** - Custom background images with blur and opacity controls\n- **Xterm Emulation** - Full VT100/Xterm compatibility\n- **True Color** - Full 256 color and 24-bit true color support\n- **Mouse Reporting** - Click, scroll, and drag support for terminal apps (vim, tmux, htop, less, fzf)\n- **Full Unicode** - Emoji (👨‍👩‍👧‍👦), variation selectors (☁️), surrogate pairs, combining characters\n- **Nerd Fonts** - Built-in support for powerline symbols and devicons\n- **Inline Images** - Display images in terminal via iTerm2's imgcat (OSC 1337)\n- **Progress Bar** - Visual progress indicator for long-running commands (OSC 1337)\n- **Search** - Ctrl/Cmd+F to search terminal history with regex support\n- **Hyperlink Detection** - Auto-detect URLs, file paths, emails with Ctrl+Click to open\n- **Copy/Paste** - Standard clipboard + copy-on-select + middle-click paste + OSC 52\n- **Context Menu** - Right-click for Copy, Paste, Clear, Select All\n- **Drag \u0026 Drop** - Drop files onto terminal to paste shell-escaped paths (iTerm2 style)\n- **Auto-Scroll Selection** - Drag selection beyond bounds to scroll through history\n- **IME Support** - Full Chinese/Japanese/Korean input method support\n- **Visual Bell** - Configurable visual flash for BEL character\n- **Command Notifications** - System notifications when long commands complete (OSC 133)\n- **OSC 7 Support** - Working directory tracking for new tabs\n- **Settings UI** - Full GUI settings panel with live preview\n- **Debug Tools** - Built-in terminal debugging with Ctrl+Shift+D\n- **Welcome Wizard** - First-time setup wizard for shell, tools, and AI assistants\n- **Customizable** - JSON-based settings at `~/.bossterm/settings.json`\n- **Session Sharing** - Watch or control a tab / window / all windows from any device — self-hosted, with a QR code and a mobile-friendly web viewer (LAN, Tailscale, or a zero-config Cloudflare tunnel)\n- **Remote Control** - End-to-end encrypted; viewers get typing access on approval, or connect from another BossTerm as a native remote client\n- **AI / MCP Server** - Built-in [Model Context Protocol](https://modelcontextprotocol.io) server exposes your terminals to Claude Code, Codex, Gemini CLI, and OpenCode\n- **Session Daemon** - tmux-style background process (on by default) keeps your sessions, MCP server, and shares alive after the GUI closes — reopen to reattach; starts at login\n- **Embeddable** - Drop the terminal into your own Kotlin/Compose Desktop app as a library (`com.risaboss:bossterm-compose`)\n\n## Design\n\nBossTerm's default look is the **Operator** theme — part of the shared BOSS **\"Operator's Console\"** visual language: an amber **signal** (`#F2A93B`) for the live/now moment on a calm **ink** floor (`#0E1217`), with cyan **data** accents and a MesloLGS mono voice. The tab bar and terminal surface both follow the active theme, and you can switch themes/palettes in Settings.\n\n🎨 **[Visual styleguide](docs/design-system.html)** — a self-contained HTML reference for the whole design system's colors / type / components (open it in a browser).\n\n## Keyboard Shortcuts\n\n| Shortcut | Action |\n|----------|--------|\n| Ctrl/Cmd+N | New window |\n| Ctrl/Cmd+T | New tab |\n| Ctrl/Cmd+W | Close tab/pane |\n| Ctrl+Tab | Next tab |\n| Ctrl+Shift+Tab | Previous tab |\n| Ctrl/Cmd+1-9 | Jump to tab |\n| Ctrl/Cmd+D | Split pane vertically |\n| Ctrl/Cmd+Shift+D | Split pane horizontally |\n| Ctrl/Cmd+Option+Arrow | Navigate between panes |\n| Ctrl/Cmd+, | Open settings |\n| Ctrl/Cmd+F | Search |\n| Ctrl/Cmd+C | Copy |\n| Ctrl/Cmd+V | Paste |\n| Ctrl+Space | Toggle IME |\n\n## Shell Integration\n\nEnable working directory tracking and command completion notifications:\n\n**Bash** (`~/.bashrc`):\n```bash\n# OSC 7 (directory tracking) + OSC 133 (command notifications)\n__prompt_command() {\n    local exit_code=$?\n    echo -ne \"\\033]133;D;${exit_code}\\007\"  # Command finished\n    echo -ne \"\\033]133;A\\007\"                # Prompt starting\n    echo -ne \"\\033]7;file://${HOSTNAME}${PWD}\\007\"  # Working directory\n}\nPROMPT_COMMAND='__prompt_command'\ntrap 'echo -ne \"\\033]133;B\\007\"' DEBUG  # Command starting\n```\n\n**Zsh** (`~/.zshrc`):\n```bash\n# OSC 7 (directory tracking) + OSC 133 (command notifications)\nprecmd() {\n    local exit_code=$?\n    print -Pn \"\\e]133;D;${exit_code}\\a\"      # Command finished\n    print -Pn \"\\e]133;A\\a\"                   # Prompt starting\n    print -Pn \"\\e]7;file://${HOST}${PWD}\\a\"  # Working directory\n}\npreexec() { print -Pn \"\\e]133;B\\a\" }         # Command starting\n```\n\nThis enables:\n- New tabs inherit working directory from active tab\n- System notifications when commands \u003e 5 seconds complete while window is unfocused\n\n## Project Structure\n\n```\nBossTerm/\n├── bossterm-core-mpp/     # Core terminal emulation library\n│   └── src/jvmMain/kotlin/ai/rever/bossterm/\n│       ├── core/          # Core utilities and types\n│       └── terminal/      # Terminal emulator implementation\n├── compose-ui/            # Compose Desktop UI library (embeddable)\n│   └── src/desktopMain/kotlin/ai/rever/bossterm/compose/\n│       ├── ui/            # Main terminal composable (ProperTerminal)\n│       ├── terminal/      # Terminal data stream handling\n│       ├── input/         # Mouse/keyboard input handling\n│       ├── rendering/     # Canvas rendering engine\n│       ├── tabs/          # Tab management\n│       ├── window/        # Window management (WindowManager)\n│       ├── search/        # Search functionality\n│       ├── debug/         # Debug tools\n│       └── settings/      # Settings management\n├── bossterm-app/          # Main BossTerm application\n│   └── src/desktopMain/kotlin/ai/rever/bossterm/app/\n│       └── Main.kt        # Application entry point\n├── embedded-example/      # Example: single terminal embedding\n├── tabbed-example/        # Example: tabbed terminal embedding\n└── .github/workflows/     # CI configuration\n```\n\n## Configuration\n\nSettings are stored in `~/.bossterm/settings.json`:\n\n```json\n{\n  \"fontSize\": 14,\n  \"fontName\": \"JetBrains Mono\",\n  \"copyOnSelect\": true,\n  \"pasteOnMiddleClick\": true,\n  \"scrollbackLines\": 10000,\n  \"cursorBlinkRate\": 500,\n  \"enableMouseReporting\": true,\n  \"performanceMode\": \"balanced\",\n  \"notifyOnCommandComplete\": true,\n  \"notifyMinDurationSeconds\": 5\n}\n```\n\n### Performance Modes\n\nBossTerm offers configurable performance optimization via Settings \u003e Performance:\n\n| Mode | Best For |\n|------|----------|\n| **Balanced** (default) | General use - good balance of responsiveness and throughput |\n| **Latency** | SSH, vim, interactive commands - fastest response time |\n| **Throughput** | Build logs, large files - maximum data processing speed |\n\n\u003e **Note:** For `fontName`, use a monospace font name installed on your system (e.g., \"SF Mono\", \"Menlo\", \"JetBrains Mono\"). If not set, BossTerm uses the bundled MesloLGS Nerd Font which includes powerline symbols.\n\n## Embedding in Your App\n\nBossTerm provides embeddable terminal libraries for Kotlin Multiplatform projects.\n\n\u003e **Full Documentation**: See [docs/embedding.md](docs/embedding.md) for the complete embedding guide, including custom context menus, focus management, and session persistence.\n\n### Gradle Setup\n\n**Maven Central** (recommended):\n\n[![Maven Central](https://img.shields.io/maven-central/v/com.risaboss/bossterm-core)](https://central.sonatype.com/namespace/com.risaboss)\n\n```kotlin\n// build.gradle.kts\nrepositories {\n    mavenCentral()\n}\n\ndependencies {\n    // Core terminal emulation engine\n    implementation(\"com.risaboss:bossterm-core:\u003cversion\u003e\")\n\n    // Compose Desktop UI component\n    implementation(\"com.risaboss:bossterm-compose:\u003cversion\u003e\")\n}\n```\n\n**JitPack** (alternative):\n\n[![JitPack](https://jitpack.io/v/kshivang/BossTerm.svg)](https://jitpack.io/#kshivang/BossTerm)\n\n```kotlin\n// settings.gradle.kts\ndependencyResolutionManagement {\n    repositories {\n        maven { url = uri(\"https://jitpack.io\") }\n    }\n}\n\n// build.gradle.kts\ndependencies {\n    implementation(\"com.github.kshivang.BossTerm:bossterm-core-mpp:\u003cversion\u003e\")\n    implementation(\"com.github.kshivang.BossTerm:compose-ui:\u003cversion\u003e\")\n}\n```\n\n**GitHub Packages** (requires authentication):\n\n```kotlin\n// settings.gradle.kts\ndependencyResolutionManagement {\n    repositories {\n        maven {\n            url = uri(\"https://maven.pkg.github.com/kshivang/BossTerm\")\n            credentials {\n                username = System.getenv(\"GITHUB_ACTOR\")\n                password = System.getenv(\"GITHUB_TOKEN\")\n            }\n        }\n    }\n}\n\n// build.gradle.kts\ndependencies {\n    implementation(\"com.risaboss:bossterm-core:\u003cversion\u003e\")\n    implementation(\"com.risaboss:bossterm-compose:\u003cversion\u003e\")\n}\n```\n\n### Usage\n\n```kotlin\nimport ai.rever.bossterm.compose.EmbeddableTerminal\nimport ai.rever.bossterm.compose.rememberEmbeddableTerminalState\n\n@Composable\nfun MyApp() {\n    // Basic usage - uses default settings from ~/.bossterm/settings.json\n    EmbeddableTerminal()\n\n    // With custom settings path\n    EmbeddableTerminal(settingsPath = \"/path/to/settings.json\")\n\n    // With custom font (via settings)\n    EmbeddableTerminal(settings = TerminalSettings(fontName = \"JetBrains Mono\"))\n\n    // With callbacks\n    EmbeddableTerminal(\n        onOutput = { output -\u003e println(output) },\n        onTitleChange = { title -\u003e window.title = title },\n        onExit = { code -\u003e println(\"Shell exited: $code\") },\n        onReady = { println(\"Terminal ready!\") }\n    )\n\n    // Programmatic control\n    val state = rememberEmbeddableTerminalState()\n\n    Button(onClick = { state.write(\"ls -la\\n\") }) {\n        Text(\"Run ls\")\n    }\n\n    // Send control signals (useful for interrupting processes)\n    Button(onClick = { state.sendCtrlC() }) {\n        Text(\"Stop (Ctrl+C)\")\n    }\n\n    EmbeddableTerminal(state = state)\n\n    // Session preservation across navigation/visibility changes\n    val persistentState = rememberEmbeddableTerminalState(autoDispose = false)\n\n    if (showTerminal) {\n        EmbeddableTerminal(state = persistentState)\n    }\n    // Terminal process keeps running even when hidden!\n\n    // Don't forget to dispose when truly done:\n    DisposableEffect(Unit) {\n        onDispose { persistentState.dispose() }\n    }\n\n    // Custom PlatformServices - override process spawning, notifications, etc.\n    // Uses Kotlin's 'by' delegation to wrap defaults while customizing specific services\n    val customServices = object : PlatformServices by getPlatformServices() {\n        val defaults = getPlatformServices()\n        override fun getProcessService() = object : PlatformServices.ProcessService {\n            private val delegate = defaults.getProcessService()\n            override suspend fun spawnProcess(config: PlatformServices.ProcessService.ProcessConfig)\n                : PlatformServices.ProcessService.ProcessHandle? {\n                println(\"Spawning: ${config.command}\")\n                return delegate.spawnProcess(config)\n            }\n        }\n    }\n    EmbeddableTerminal(platformServices = customServices)\n}\n```\n\n## Session Sharing\n\nWatch — or hand over — a live terminal to any device, with **no cloud relay and no account**.\nBossTerm runs the share server itself; viewers open a link (or scan a QR code) in any browser, or\nconnect from another BossTerm as a native client.\n\n- **Scope**: share a single **tab** (with its splits), a whole **window**, or **all windows**\n  (viewers see tabs grouped by window).\n- **View or Control**: hand out a read-only **view** link or a **control** link (typing access).\n  View-only viewers can request control mid-session and you approve from a prompt — required for\n  public links by default, skipped on the LAN.\n- **Reach**: LAN out of the box, or a public URL via **Tailscale** (Serve/Funnel) or a zero-config\n  **Cloudflare** quick tunnel (the default — `cloudflared` is fetched automatically, no account).\n  The tunnel is pre-warmed so the QR is ready the moment you hit Share.\n- **Mobile web viewer**: xterm.js-based and touch-tuned — soft-keyboard push, an on-screen key bar\n  (Esc / Tab / Ctrl / arrows + a ⌨ toggle), pinch-zoom, fit-to-screen, and clickable links.\n- **Native remote client**: \"Add remote\" in BossTerm to mirror another machine's shared tabs into\n  your own window — including its **Remote MCP** — with control relayed up the chain.\n- **End-to-end encrypted**: the session key rides in the URL **fragment** (`#k=…`), which browsers\n  never send to the server — so even a tunnel relay can't read your session. Frames use\n  per-connection AES-256-GCM, and a short verification code lets both ends confirm the same key.\n\nEnable it under **Settings → Session Sharing** (off by default), then **Share** from a tab's menu.\nDefaults: binds the LAN on port `7677`, Cloudflare remote mode, approval required only for public\nlinks.\n\nSee **[docs/session-sharing.md](docs/session-sharing.md)** for the full guide — scopes,\nremote-access setup, the viewer, the native client, the encryption design, and every setting.\n\n## BossTerm MCP\n\nBossTerm ships an in-process [Model Context Protocol](https://modelcontextprotocol.io)\nserver that exposes the running terminal to MCP-aware clients (Claude Code,\nCodex, Gemini CLI, OpenCode). Clients can enumerate tabs, read scrollback,\nsearch output, capture the last completed command, and — when write tools\nare enabled — drive shells, send signals, open new splits, and **run\ncommands in a visible pane** while still capturing stdout/stderr and exit\ncode (`run_command` — recommended default shell for AI clients).\n\n- **Endpoint**: `http://127.0.0.1:7676/` over Server-Sent Events, configurable\n  via Settings → BossTerm MCP → Port.\n- **Loopback-only**: the server binds `127.0.0.1` and rejects non-loopback\n  `Host` headers (DNS-rebinding defense). Any local process running as your\n  user can reach it while it is enabled.\n- **Opt-in**: disabled by default. Toggle on under Settings → BossTerm MCP.\n- **Remote MCP**: when you [share a session](#session-sharing), the host's MCP can be driven from\n  the web viewer (an \"MCP pill\" toggles it and attaches CLIs) or from a native remote client —\n  calls on shared tabs are relayed to the host.\n\n### Turning it on (as a user)\n\n1. Open Settings → **BossTerm MCP** and toggle **Enable BossTerm MCP Server**.\n   A green \"BossTerm MCP on\" pill appears in the tab bar.\n2. (Optional) Under **Exposed Tools**, untick any built-in tool you don't\n   want clients to call — toggles apply live.\n3. Under **Attach to AI CLI**, click the button for each AI CLI you want to\n   register the endpoint with. Re-attachment is idempotent and happens\n   silently on subsequent launches.\n\n### Using as Claude Code's default shell\n\n`run_command` is exposed by default and ready for explicit use (e.g. \"split and\nrun X\"). To make it Claude Code's *default* shell — preferred over its built-in\n`Bash` for everything — turn on **Settings → BossTerm MCP → \"Use `run_command`\nas AI clients' default shell\"** (off by default). With it on, the server's\ninitialize-time `instructions` tell Claude Code to prefer `run_command` (a soft\nnudge that applies to the next client connection).\n\nFor a hard guarantee that also takes effect **instantly**, add the user-global\n`PreToolUse` hook described in\n[docs/mcp-server.md](docs/mcp-server.md#using-as-claude-codes-default-shell).\nBossTerm writes/deletes the `~/.bossterm/mcp.port` marker the moment you flip\nthe setting, and the hook routes `Bash` calls to `mcp__bossterm__run_command`\nwhenever the marker is present — so toggling the setting turns enforcement on or\noff per command, with no Claude restart.\n\n### Embedding it (as a developer)\n\n```kotlin\nimport ai.rever.bossterm.compose.mcp.BossTermMcpConfig\nimport ai.rever.bossterm.compose.mcp.BossTermMcpManager\nimport ai.rever.bossterm.compose.mcp.LocalBossTermMcpConfig\nimport ai.rever.bossterm.compose.mcp.McpTerminalRegistry\nimport ai.rever.bossterm.compose.settings.SettingsManager\n\nfun main() {\n    val mcpConfig = BossTermMcpConfig(serverName = \"myapp\", serverVersion = \"1.0\")\n    val mcpScope = CoroutineScope(SupervisorJob() + Dispatchers.Default)\n    val mcpManager = BossTermMcpManager(\n        registry = McpTerminalRegistry,\n        settingsManager = SettingsManager.instance,\n        parentScope = mcpScope,\n        config = mcpConfig\n    )\n    mcpManager.start()\n    Runtime.getRuntime().addShutdownHook(Thread {\n        mcpManager.stop()\n        mcpScope.cancel()\n    })\n\n    application {\n        CompositionLocalProvider(LocalBossTermMcpConfig provides mcpConfig) {\n            // Each window that uses TabbedTerminalState must also register\n            // it with McpTerminalRegistry so the server can see its tabs:\n            //\n            //   DisposableEffect(tabbedState) {\n            //       McpTerminalRegistry.register(tabbedState)\n            //       onDispose { McpTerminalRegistry.unregister(tabbedState) }\n            //   }\n            //\n            // Apps built on the single-terminal EmbeddableTerminal can still\n            // run the MCP server and register custom tools via additionalTools,\n            // but the tab-scoped built-ins (list_tabs, send_input, etc.) won't\n            // see any tabs. See docs/mcp-server.md for the full contract.\n            MyAppWindows()\n        }\n    }\n}\n```\n\nCommon knobs on `BossTermMcpConfig`: `toolNamePrefix` to namespace built-in\ntools, `allowWriteTools = false` for an observe-only build, `additionalTools`\nto register app-specific MCP tools, and `customToolDescriptions` to override\ndescriptions of individual built-ins. The\n[`embedded-example`](embedded-example/) and [`tabbed-example`](tabbed-example/)\nmodules demonstrate both hooks.\n\nSee [docs/mcp-server.md](docs/mcp-server.md) for the full reference —\nevery built-in tool's JSON schema, the `manage_tools` meta-tool, the\n`BossTermMcpConfig` field-by-field table, and troubleshooting.\n\n## Session Daemon\n\nA tmux-style background process that **owns your terminal sessions, MCP server, and shares** so they\nkeep running after you close the GUI — reopen BossTerm and it reattaches to the live sessions. **On by\ndefault**; turn it off under Settings → Session Daemon to fall back to the pre-daemon behavior\n(in-process MCP/sharing, sessions die with the window), a path that's preserved byte-for-byte.\n\n- **Survives the GUI**: sessions live in the daemon, not the window. Close the app (or all its\n  windows) and your shells keep running — long builds, SSH sessions, and `run_command` agents don't\n  die. The next launch mirrors them straight back as tabs.\n- **Thin-client GUI**: when enabled, each window attaches to the daemon over a loopback WebSocket and\n  renders its sessions; keystrokes and resizes flow back to the daemon, which owns the PTYs. If the\n  daemon is unreachable, the GUI falls back to local tabs so you're never stuck.\n- **MCP + sharing stay live headless**: the daemon hosts the [MCP server](#bossterm-mcp) and\n  [session sharing](#session-sharing), so agents and share links keep working with no window open. A\n  menu-bar / tray icon shows it's running and lets you open the GUI or quit the daemon.\n- **Starts at login** (on by default): installs a per-OS login service (launchd LaunchAgent / systemd\n  user unit / Windows Run key) so the daemon is available even before BossTerm is first opened or after\n  a reboot. A separate **Start daemon at login** toggle turns this off without disabling the daemon. On\n  a shared/multi-user host, note the loopback MCP endpoint is then reachable by any process running as\n  you whenever you're logged in.\n- **Secure by construction**: loopback-only, gated by a 256-bit per-launch secret (constant-time\n  compare, sent in a header — never the query string), DNS-rebinding `Host` guards on every server,\n  owner-only (`0600`) discovery/secret files in a `0700` base dir, and a `FileChannel.tryLock`\n  single-spawn guard. SESSION-scoped shares are write-isolated to their one session.\n\nManage it under **Settings → Session Daemon** (toggles take effect after restarting BossTerm). The\ndaemon never stops when you close the GUI — only via **Quit daemon**, or OS logout.\n\n## Technology Stack\n\n- **Kotlin** - Modern JVM language\n- **Compose Desktop** - Declarative UI framework\n- **Pty4J** - PTY support for local terminal sessions\n- **ICU4J** - Unicode/grapheme cluster support\n\n## Command-Line Interface\n\n`install.sh` installs a `bossterm` CLI launcher (and a Python helper +\nman page) under `/usr/local/bin/` or `~/.local/bin/`. With no arguments it\nlaunches the GUI; with a positional path it opens that directory.\n\nBeyond launching, the CLI has subcommands that talk to a running BossTerm\nthrough the in-process MCP server:\n\n```bash\nbossterm                              # Launch the GUI\nbossterm ~/Projects/foo               # Launch in a directory\nbossterm new                          # New window\nbossterm new-tab                      # New tab in the running BossTerm  (MCP)\nbossterm run npm test                 # Run a command in a new tab        (MCP)\nbossterm run --split=h tail -f log    # Open a horizontal split and tail  (MCP)\nbossterm send $'ls\\n'                 # Send to the focused pane           (MCP)\nbossterm logs --lines 50              # Dump the last 50 scrollback lines  (MCP)\nbossterm attach claude                # Re-register with Claude Code\nbossterm mcp status                   # Inspect MCP enabled/port/state\nbossterm mcp on | off                 # Toggle settings.mcpEnabled\nbossterm config                       # Print path to ~/.bossterm/settings.json\nbossterm --help                       # Full usage\n```\n\nRun `man bossterm` after installation for the complete reference.\n\n\u003e **Note on local dev usage:** the repo-root `./bossterm` is a symlink into\n\u003e `cli-resources/bossterm`, so `./bossterm --version` works from a clean\n\u003e `git clone`. GitHub's \"Download ZIP\" link does **not** preserve symlinks\n\u003e (the file materializes as plain text containing the link target). If\n\u003e you've downloaded a zip rather than cloned, run\n\u003e `cli-resources/bossterm` directly, or `git clone` the repo.\n\n## Documentation\n\n- [Embedding Guide](docs/embedding.md) - Embed a single terminal with custom context menus\n- [Tabbed Terminal Guide](docs/tabbed-terminal.md) - Full-featured tabbed terminal with splits\n- [Session Sharing](docs/session-sharing.md) - Watch \u0026 control a terminal from any device (web viewer, QR, tunnels, E2E)\n- [BossTerm MCP Server](docs/mcp-server.md) - Expose tabs to MCP clients (Claude Code, Codex, Gemini, OpenCode)\n- [BossTerm CLI](docs/bossterm.1) - `man bossterm` reference (troff)\n- [Onboarding Wizard](docs/onboarding.md) - First-time setup wizard for users\n- [Troubleshooting Guide](docs/troubleshooting.md) - Common issues and solutions\n- [Release Notes](docs/release-notes/) - Detailed changelog for each version\n- [Design System](docs/design-system.html) - \"Operator's Console\" visual styleguide (self-contained HTML; shared with BossConsole)\n\n## Contributing\n\nContributions are welcome! Please feel free to submit issues and pull requests.\n\n## License\n\nBossTerm is dual-licensed under:\n- [LGPLv3](LICENSE-LGPLv3.txt)\n- [Apache 2.0](LICENSE-APACHE-2.0.txt)\n\nYou may select either license at your option.\n\n## Authors\n\n**Shivang** — shivang@risalabs.ai\n\n## Open Source Origin and History\n\nBossTerm was originally inspired by [JediTerm](https://github.com/JetBrains/jediterm) by JetBrains (authored by Dmitry Trofimov dmitry.trofimov@jetbrains.com and Clément Poulain). The initial version of JediTerm was itself a reworked terminal emulator Gritty, which was in its own turn a reworked JCTerm terminal implementation.\n\nBossTerm has since been completely rewritten from the ground up in Kotlin with Compose Desktop — no JediTerm, Gritty, or JCTerm code remains. Everything was rewritten from scratch with a new rendering engine, new buffer implementation, and new UI framework. A lot of new features were added including split panes, inline images, AI assistant integration, custom platform services, and high-performance incremental snapshot rendering.\n\n## Acknowledgments\n\n- [JediTerm](https://github.com/JetBrains/jediterm) by JetBrains — original inspiration for terminal emulation\n- [iTerm2](https://github.com/gnachman/iTerm2) — the beloved macOS terminal, inspiration for many UX features\n- [Pty4J](https://github.com/JetBrains/pty4j) — PTY library for local terminal sessions\n- [ICU4J](https://unicode-icu.github.io/icu/userguide/icu4j/) — Unicode and grapheme cluster support\n\n## References\n\n- [Terminal protocol description](http://invisible-island.net/xterm/ctlseqs/ctlseqs.html) — Xterm control sequences\n- [Terminal Character Set Terminology and Mechanics](http://www.columbia.edu/kermit/k95manual/iso2022.html) — ISO 2022 character sets\n- [VT420 Programmer Reference Manual](http://manx.classiccmp.org/collections/mds-199909/cd3/term/vt420rm2.pdf) — DEC terminal reference\n- [UTF-8 Demo](http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt) — Unicode test file\n- [Control sequences visualization](http://www.gnu.org/software/teseq/) — GNU teseq\n- [Terminal protocol tests](http://invisible-island.net/vttest/) — vttest suite\n\n---\n\n**Built by [Risa Labs Inc](https://risalabs.ai)**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkshivang%2Fbossterm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkshivang%2Fbossterm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkshivang%2Fbossterm/lists"}