{"id":40585083,"url":"https://github.com/karpeleslab/cterm","last_synced_at":"2026-02-07T13:06:40.125Z","repository":{"id":332384333,"uuid":"1133601000","full_name":"KarpelesLab/cterm","owner":"KarpelesLab","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-13T18:33:21.000Z","size":303,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-13T18:35:58.601Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KarpelesLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2026-01-13T15:13:37.000Z","updated_at":"2026-01-13T18:33:25.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/KarpelesLab/cterm","commit_stats":null,"previous_names":["karpeleslab/cterm"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/KarpelesLab/cterm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarpelesLab%2Fcterm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarpelesLab%2Fcterm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarpelesLab%2Fcterm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarpelesLab%2Fcterm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KarpelesLab","download_url":"https://codeload.github.com/KarpelesLab/cterm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarpelesLab%2Fcterm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28624341,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T02:47:06.670Z","status":"ssl_error","status_checked_at":"2026-01-21T02:45:44.886Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-01-21T03:02:55.197Z","updated_at":"2026-02-07T13:06:40.111Z","avatar_url":"https://github.com/KarpelesLab.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cterm\n\nA high-performance, customizable terminal emulator built in pure Rust. Features native UI on macOS (AppKit/CoreGraphics), GTK4 on Linux, and native Win32 on Windows, with a modular architecture and optimizations for running AI coding assistants like Claude Code.\n\n## Features\n\n### Terminal Emulation\n- **High Performance**: Custom VT100/ANSI terminal emulator with efficient screen buffer management\n- **True Color Support**: Full 24-bit RGB color with 256-color palette fallback\n- **Unicode Support**: Proper handling of wide characters, combining characters, and emoji\n- **Scrollback Buffer**: Configurable scrollback with efficient memory usage\n- **Find in Scrollback**: Search through terminal history with regex support\n\n### User Interface\n- **Tabs**: Multiple terminal tabs with keyboard shortcuts\n- **Tab Customization**: Custom colors and names for tabs\n- **Sticky Tabs**: Persistent tab configurations for frequently-used commands (great for Claude sessions)\n- **Themes**: Built-in themes (Tokyo Night, Dracula, Nord, and more) plus custom TOML themes\n- **Keyboard Shortcuts**: Fully configurable shortcuts for all actions\n- **Zoom**: Adjustable font size with Ctrl+/Ctrl-\n- **Copy as HTML**: Copy terminal content with colors and formatting preserved (macOS)\n- **Send Signal**: Send Unix signals (SIGHUP, SIGINT, SIGTERM, etc.) to terminal processes (macOS/Linux)\n\n### Terminal Features\n- **Hyperlinks**: Clickable URLs with OSC 8 support\n- **Clipboard**: OSC 52 clipboard integration for remote copy/paste\n- **Color Queries**: OSC 10/11 color query support for theme-aware applications\n- **Alternate Screen**: Full alternate screen buffer support (for vim, less, etc.)\n- **Sixel Graphics**: Inline image display with DEC Sixel protocol support\n- **iTerm2 Graphics**: Inline images via OSC 1337 protocol (PNG, JPEG, GIF)\n- **iTerm2 File Transfer**: Receive files via OSC 1337 with streaming support for large files\n- **DRCS Fonts**: Soft font support via DECDLD for custom character sets\n\n### System Integration\n- **Native PTY**: Cross-platform PTY implementation (Unix openpty, Windows ConPTY)\n- **Crash Recovery**: Automatic recovery from crashes - a watchdog process preserves terminal sessions and restores them after unexpected termination (macOS/Linux)\n- **Seamless Upgrades**: Update cterm without losing terminal sessions (macOS/Linux/Windows)\n- **Auto-Update**: Built-in update checker with GitHub releases integration and release notes display\n- **Debug Log Viewer**: In-app log viewer for troubleshooting (Windows)\n\n## Installation\n\n### Pre-built Binaries\n\n| Platform | Download |\n|----------|----------|\n| **macOS** (Universal) | [DMG Installer](https://github.com/KarpelesLab/cterm/releases/latest/download/cterm-macos-universal.dmg) |\n| **Windows** (x64) | [Installer](https://github.com/KarpelesLab/cterm/releases/latest/download/cterm-windows-x86_64-setup.exe) · [ZIP](https://github.com/KarpelesLab/cterm/releases/latest/download/cterm-windows-x86_64.zip) |\n| **Linux** (x64) | [tar.gz](https://github.com/KarpelesLab/cterm/releases/latest/download/cterm-linux-x86_64.tar.gz) |\n| **Linux** (ARM64) | [tar.gz](https://github.com/KarpelesLab/cterm/releases/latest/download/cterm-linux-arm64.tar.gz) |\n\nOr browse all releases on the [GitHub Releases](https://github.com/KarpelesLab/cterm/releases) page.\n\n### Building from Source\n\n#### Prerequisites\n\n- Rust 1.70 or later\n\n**Linux only** - GTK4 development libraries:\n\n**Debian/Ubuntu:**\n```bash\nsudo apt install libgtk-4-dev\n```\n\n**Fedora:**\n```bash\nsudo dnf install gtk4-devel\n```\n\n**Arch Linux:**\n```bash\nsudo pacman -S gtk4\n```\n\n**macOS:**\nNo additional dependencies required - uses native AppKit/CoreGraphics.\n\n**Windows:**\nNo additional dependencies required - uses native Win32/Direct2D.\n\n#### Build\n\n```bash\n# Development build\ncargo build\n\n# Release build (optimized)\ncargo build --release\n\n# Run\ncargo run --release\n```\n\nThe binary will be at `target/release/cterm`.\n\n## Configuration\n\nConfiguration files are stored in platform-specific locations:\n- **Linux**: `~/.config/cterm/`\n- **macOS**: `~/Library/Application Support/com.cterm.terminal/`\n- **Windows**: `%APPDATA%\\cterm\\`\n\nSee [docs/configuration.md](docs/configuration.md) for detailed configuration options.\n\n## Keyboard Shortcuts\n\n| Action | macOS | Linux/Windows |\n|--------|-------|---------------|\n| New Tab | Cmd+T | Ctrl+Shift+T |\n| Close Tab | Cmd+W | Ctrl+Shift+W |\n| Close Other Tabs | — | — |\n| Next Tab | Cmd+Shift+] | Ctrl+Tab |\n| Previous Tab | Cmd+Shift+[ | Ctrl+Shift+Tab |\n| Switch to Tab 1-9 | Cmd+1-9 | Ctrl+1-9 |\n| Copy | Cmd+C | Ctrl+Shift+C |\n| Copy as HTML | Cmd+Shift+C | — |\n| Paste | Cmd+V | Ctrl+Shift+V |\n| Find | Cmd+F | Ctrl+Shift+F |\n| Zoom In | Cmd++ | Ctrl++ |\n| Zoom Out | Cmd+- | Ctrl+- |\n| Reset Zoom | Cmd+0 | Ctrl+0 |\n\n**Scrollback:** Use mouse wheel or trackpad to scroll through terminal history.\n\n## Terminal Compatibility\n\n### Supported DEC Private Modes (DECSET/DECRST)\n\n| Mode | Name | Description |\n|------|------|-------------|\n| 1 | DECCKM | Application cursor keys |\n| 6 | DECOM | Origin mode (cursor addressing relative to scroll region) |\n| 7 | DECAWM | Auto-wrap mode |\n| 9 | X10 Mouse | X10 mouse reporting (button press only) |\n| 25 | DECTCEM | Show/hide cursor |\n| 80 | DECSDM | Sixel display mode (scrolling control) |\n| 1000 | — | Normal mouse tracking (button press/release) |\n| 1002 | — | Button-event mouse tracking (press/release/motion with button) |\n| 1003 | — | Any-event mouse tracking (all motion events) |\n| 1004 | — | Focus event reporting |\n| 1006 | — | SGR extended mouse coordinates |\n| 1047 | — | Alternate screen buffer |\n| 1048 | — | Save/restore cursor |\n| 1049 | — | Alternate screen buffer with cursor save/restore |\n| 2004 | — | Bracketed paste mode |\n\n### Supported ANSI Modes (SM/RM)\n\n| Mode | Name | Description |\n|------|------|-------------|\n| 4 | IRM | Insert mode |\n| 20 | LNM | Line feed/new line mode |\n\n### Supported OSC Sequences\n\n| OSC | Description |\n|-----|-------------|\n| 0 | Set window title and icon name |\n| 1 | Set icon name |\n| 2 | Set window title |\n| 8 | Hyperlinks |\n| 10 | Query/set foreground color |\n| 11 | Query/set background color |\n| 12 | Query/set cursor color |\n| 52 | Clipboard operations |\n| 1337 | iTerm2 inline images and file transfer |\n\n### Sixel Graphics\n\ncterm supports DEC Sixel graphics for inline image display:\n- Full color palette support (up to 256 colors)\n- RGB and HLS color definitions\n- DECSDM mode for controlling image placement and scrolling\n- Images scroll with terminal content\n- Grid cells under images are cleared (xterm-compatible behavior)\n\nTest with:\n```bash\n# Using ImageMagick\nconvert image.png -resize 200x200 sixel:-\n\n# Using libsixel\nimg2sixel image.png\n```\n\n### iTerm2 Graphics Protocol (OSC 1337)\n\ncterm supports iTerm2's inline image protocol for displaying PNG, JPEG, and GIF images:\n- Inline image display with `inline=1`\n- File transfer with `inline=0` (shows notification bar with Save/Save As/Discard)\n- Streaming file transfer support for large files (spills to disk when \u003e1MB)\n- Configurable width/height in pixels, cells, or percentages\n- Aspect ratio preservation\n\nTest with:\n```bash\n# Using imgcat (from iTerm2 utilities)\nimgcat image.png\n\n# Manual test (inline image)\nprintf '\\033]1337;File=inline=1:'$(base64 \u003c image.png)'\\a'\n\n# Manual test (file transfer)\nprintf '\\033]1337;File=name='$(echo -n \"test.bin\" | base64)':'$(base64 \u003c file.bin)'\\a'\n```\n\n### DRCS (Soft Fonts)\n\ncterm supports DECDLD (DEC Download) for custom character sets:\n- Define custom glyphs via escape sequences\n- Multiple font sizes supported\n- Designate fonts to G0/G1 character sets\n\n## Architecture\n\n```\ncterm/\n├── crates/\n│   ├── cterm-core/     # Core terminal emulation (parser, screen, PTY)\n│   ├── cterm-ui/       # UI abstraction traits\n│   ├── cterm-app/      # Application logic (config, sessions, upgrades, crash recovery)\n│   ├── cterm-cocoa/    # Native macOS UI using AppKit/CoreGraphics\n│   ├── cterm-gtk/      # GTK4 UI implementation (Linux)\n│   └── cterm-win32/    # Native Windows UI using Win32/Direct2D\n└── docs/               # Documentation\n```\n\nThe modular architecture enables:\n- **cterm-core**: Pure Rust terminal emulation, reusable in other projects\n- **cterm-ui**: UI-agnostic traits for toolkit abstraction\n- **cterm-app**: Shared application logic between UI implementations\n- **cterm-cocoa**: Native macOS implementation using AppKit and CoreGraphics\n- **cterm-gtk**: GTK4-specific rendering and widgets (Linux)\n- **cterm-win32**: Native Windows implementation using Win32 and Direct2D\n\n## Built-in Themes\n\n- Default Dark\n- Default Light\n- Tokyo Night\n- Dracula\n- Nord\n\nCustom themes can be added as TOML files in the `themes/` configuration subdirectory.\n\n## Roadmap\n\n- [x] Text selection and copy/paste\n- [x] Crash recovery (macOS/Linux)\n- [x] Sixel graphics support\n- [x] iTerm2 graphics protocol (OSC 1337)\n- [x] DRCS soft font support\n- [x] Windows native UI (Win32/Direct2D)\n- [x] Seamless upgrades (macOS/Linux/Windows)\n- [x] Copy as HTML with formatting\n\n### Future\n\n- Native SSH client\n- ctermd client (connect to headless terminal daemon)\n- Split panes\n- Plugin system\n\n## License\n\nMIT License\n\n## Contributing\n\nContributions are welcome! Please open an issue or pull request on GitHub.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarpeleslab%2Fcterm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarpeleslab%2Fcterm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarpeleslab%2Fcterm/lists"}