MCPcopy Index your code
hub / github.com/eugenioenko/ttt

github.com/eugenioenko/ttt @v0.3.5

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.3.5 ↗ · + Follow
2,229 symbols 8,744 edges 244 files 113 documented · 5%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

TTT Editor: Terminal Text Tool

The IDE that lives in your terminal. Not a simplified terminal editor — a real alternative to VS Code, Zed, and Sublime that happens to run in your terminal. Single Go binary, zero config.

TTT Demo

Installation

Prerequisites

  • Git — required for source control features
  • ripgrep (rg) — required for workspace search

Quick Install MacOS (brew)

brew tap eugenioenko/ttt
brew install ttt

Quick Install Linux

curl -sSfL https://raw.githubusercontent.com/eugenioenko/ttt/main/install.sh | sh

Arch Linux (AUR)

Thanks to @Dominiquini for maintaining the AUR package.

yay -S ttt

Go Install

Requires Go 1.18 or newer:

go install github.com/eugenioenko/ttt/cmd/ttt@latest

This installs the ttt binary to your $GOPATH/bin (or $HOME/go/bin by default). Make sure that directory is in your PATH.

This downloads the latest release binary for your OS/architecture and installs it to /usr/local/bin. To install to a different directory:

INSTALL_DIR=~/.local/bin curl -sSfL https://raw.githubusercontent.com/eugenioenko/ttt/main/install.sh | sh

Download Binary

Pre-built binaries for Linux, macOS, and Windows are available on the Releases page. Download the one for your platform, make it executable, and put it in your PATH.

From Source

git clone https://github.com/eugenioenko/ttt.git
cd ttt
make build

This produces an optimized binary at bin/ttt. Add it to your PATH or copy it somewhere convenient:

cp bin/ttt ~/.local/bin/

Features

Editor

  • Syntax highlighting via chroma — supports hundreds of languages with automatic detection
  • Bracket matching with highlighted pairs
  • Find and Replace — inline find bar (Ctrl+F) with match navigation, replace bar (Ctrl+H) with replace-one and replace-all
  • Go to Line (Ctrl+G)
  • Selection, copy/cut/paste (Ctrl+C/X/V) with system clipboard support
  • Undo/redo (Ctrl+Z/Y) via a command-pattern undo stack
  • .editorconfig support — indent size is picked up automatically per file
  • Indent detection — auto-detects indentation from file content; manual override via the status bar indent picker
  • Multi-cursor editing — Ctrl+D to select next occurrence, Ctrl+K L to select all occurrences, Alt+Click to add cursors; typing, backspace, delete, and enter work at all positions simultaneously
  • Mouse support — click to position cursor, click tabs, drag sidebar/panel dividers, right-click context menus
  • Auto-completion — LSP-powered completions with live filtering, debounce, and auto-import support
  • Signature help — parameter hints shown automatically on ( and ,
  • Diagnostics — inline curly underline squiggles, problems panel, hover popup, and status bar counts
  • Document formatting — format document, format selection, and format-on-save via LSP (command palette)
  • Git blame — inline blame info for the current line shown in the status bar (author, relative time, summary)
  • Line numbers with current-line highlighting
  • Integrated terminal emulator via vt10x — multiple tabs with vertical inner tab bar, full VT escape sequence support
  • Bottom panel — tabbed panel with integrated terminal and problems list
  • Diff-based renderer for efficient terminal updates (double-buffered cell grid)

Multi-Folder Workspaces

Open multiple project directories in a single session. Each root appears as a collapsible group in the explorer, search, and changes panels.

ttt                             # opens the current directory
ttt .                           # also opens the current directory
ttt /path/to/dir                # opens that directory as the workspace
ttt /path/to/file.go            # opens the file; workspace is the git repo root
                                # (falls back to the file's parent dir if not in a repo)
ttt dir1 dir2                   # opens multiple folders as a multi-root workspace
ttt --workspace project.ttt     # loads a saved workspace file

# Review a GitHub pull request
ttt https://github.com/owner/repo/pull/123

# Review a PR with the repo tree open
ttt . https://github.com/owner/repo/pull/123

Workspace files use the .ttt extension and store a list of folders as relative paths:

{
  "folders": [
    { "path": "." },
    { "path": "../other-project" }
  ]
}
  • Save Workspace As... from the File menu to create a workspace file
  • Add Folder to Workspace and Remove Folder from Workspace via the command palette
  • The git branch in the status bar switches automatically based on which workspace folder the active file belongs to

File Explorer

Multi-root file tree in the sidebar (Ctrl+Shift+E). When multiple folders are open, each root is shown as a collapsible group.

  • Directories sorted before files, both alphabetically
  • Expand/collapse with Enter or arrow keys
  • Right-click context menu: New File, New Folder, Rename, Delete
  • Sidebar actions button for Refresh and New File

Search

Sidebar search panel (Ctrl+Shift+F) powered by ripgrep. Results are grouped by file with match counts.

  • Smart-case matching by default
  • Include/Exclude glob filters — click the toggle arrow to reveal filter inputs (e.g. *.go, vendor/**)
  • Tab between search, include, and exclude inputs
  • Searches across all workspace folders simultaneously
  • Click a result to jump to the file and line

Git Integration

Changes panel in the sidebar (Ctrl+Shift+G) with full staging workflow.

Staging: - Spacebar — toggle stage/unstage on the selected file - a — stage all unstaged files - u — unstage all staged files - + button on the "Changes" section header — stage all files in that section - - button on the "Staged" section header — unstage all files in that section

Committing: - Inline commit message input at the top of each group - Type a message and press Enter to commit all staged files

Remote operations: - Pull, Push, Sync (pull then push) from the sidebar actions button - Per-repo actions via the group header menu button in multi-root workspaces

Diff view: - Select a changed file to open a diff with syntax highlighting layered on diff backgrounds - Untracked files open directly in the editor

Multi-root: - Changes are grouped by repository, each with its own collapsible Staged/Changes sections - Each group has a commit input and a menu button for pull/push/sync on that specific repo - File status badges: M (modified), A (added), D (deleted), R (renamed), U (untracked)

Command Palette

  • Ctrl+Shift+P — opens the command palette with all available commands
  • Ctrl+P — opens quick file open (searches all files across workspace folders)
  • Type > in quick-open mode to switch to command mode
  • Delete the > in command mode to switch to file mode
  • Menu shortcuts resolve dynamically from your keybindings

Bottom Panel

The bottom panel (Ctrl+J to toggle) contains the Terminal, Problems, and References tabs.

  • Problems tab — lists all LSP diagnostics (errors, warnings) grouped by file; click to jump to location
  • References tab — shows results from Find All References; click to jump to location
  • Terminal tab — integrated terminal emulator (see below)

Integrated Terminal

Built-in terminal emulator. Press Ctrl+` to toggle the terminal panel.

  • Ctrl+K T to spawn a new terminal tab
  • Multiple terminal tabs with a vertical inner tab bar on the left edge
  • Full VT escape sequence support via hinshun/vt10x and PTY management via creack/pty
  • True color (24-bit) and 256-color rendering
  • When the terminal is focused, all keys go to the PTY except Ctrl+` (to toggle the panel)
  • Terminal shell and scrollback are configurable in settings.json
  • Terminal ANSI colors are theme-configurable via the terminal field in theme.json
  • Close all terminals from the panel actions menu

LSP (Language Server Protocol)

TTT has built-in LSP support for language-aware editing features. Install a language server and TTT detects it automatically — zero configuration needed. If a server isn't installed, TTT shows a brief notification with a link to install instructions.

Built-in Language Support

Language Server Install
Go gopls go install golang.org/x/tools/gopls@latest
TypeScript / JavaScript typescript-language-server npm i -g typescript typescript-language-server
Python pyright pip install pyright
C / C++ clangd sudo apt install clangd
Rust rust-analyzer rustup component add rust-analyzer
Vue vue-language-server npm i -g @vue/language-server
Svelte svelteserver npm i -g svelte-language-server
CSS / SCSS / Less vscode-css-language-server npm i -g vscode-langservers-extracted
HTML vscode-html-language-server npm i -g vscode-langservers-extracted
JSON vscode-json-language-server npm i -g vscode-langservers-extracted
YAML yaml-language-server npm i -g yaml-language-server
Bash bash-language-server npm i -g bash-language-server
Lua lua-language-server LuaLS releases
Zig zls ZLS releases
Kotlin kotlin-language-server Releases
Java jdtls Eclipse JDT.LS
Ruby ruby-lsp gem install ruby-lsp
Dart dart language-server Included with Dart SDK
Elixir elixir-ls Releases
PHP phpactor composer global require phpactor/phpactor
Terraform terraform-ls Releases
Markdown marksman Releases
Tailwind CSS tailwindcss-language-server npm i -g @tailwindcss/language-server
Docker docker-langserver npm i -g dockerfile-language-server-nodejs

You can also add custom servers or override built-in ones in ~/.config/ttt/settings.json. See the LSP docs for details.

To disable LSP entirely: "lsp": { "enabled": false } in settings.

Supported Features

Feature Keybinding Description
Autocomplete Ctrl+U Trigger completion at cursor position
Signature Help (automatic) Parameter hints shown on ( and ,
Go to Definition F12 Jump to the definition of the symbol under the cursor
Go to Implementation Shift+F12 Jump to the implementation of the symbol under the cursor
Go to Type Definition (command palette) Jump to the type definition of the symbol under the cursor
Find References (command palette) Find all references to the symbol under the cursor (results in bottom panel REFERENCES tab)
Rename Symbol F2 Rename the symbol under the cursor across all files in the workspace
Hover Ctrl+K I Show type information and documentation for the symbol under the cursor
Format Document (command palette) Format the entire document using the language server
Format Selection (command palette) Format the selected range
Diagnostics (automatic) Error/warning squiggles inline, status bar summary, hover popup

Auto-Completion

Completions trigger automatically as you type with a configurable debounce (default 150ms, set autocomplete.debounce in settings.json). The completion list filters live as you continue typing, and supports completionItem/resolve for additional details and auto-imports.

Diagnostics

The LSP server publishes diagnostics (errors, warnings, hints) which are displayed as:

  • Inline squiggles — curly underlines on the affected range, colored by severity
  • Problems panel — a tab in the bottom panel listing all diagnostics grouped by file
  • Hover popup — hover over a squiggle to see the diagnostic message
  • Status bar — error/warning counts shown in the status bar

Formatting

  • Format Document — formats the entire file via the language server (available from the command palette)
  • Format Selection — formats only the selected range (available from the command palette)
  • Format on Save — enable formatOnSave in settings.json to auto-format when saving

References & Rename

  • Find All References — search for all usages of the symbol under the cursor; results appear in the bottom panel REFERENCES tab (available from the command palette)
  • Rename Symbol (F2) — rename the symbol under the cursor across all files in the workspace. Applies multi-file workspace edits automatically. Enable lsp.saveOnRename in settings.json to auto-save affected files after renaming.

Tabs

Tabs follow a pin-on-reclick model similar to VS Code:

  • Opening a file from the explorer or search replaces the current unpinned tab
  • Clicking on an already-open tab (or opening the same file again) pins it
  • Ctrl+W to close a tab, Ctrl+PgDn/PgUp to switch tabs
  • Right-click a tab for Close, Close Others, Close All
  • Tab bar actions button for Close All

Theming

TTT supports fully customizable themes via JSON files. You can change every color in the editor — from syntax highlighting and diff ba

Extension points exported contracts — how you extend this code

EditCommand (Interface)
EditCommand defines the interface for undoable buffer edits. [13 implementers]
internal/core/undo/undo.go
CursorProvider (Interface)
(no doc) [11 implementers]
internal/ui/widget.go
Screen (Interface)
Screen abstracts the terminal screen. [2 implementers]
internal/term/screen.go
RawKeyConsumer (Interface)
RawKeyConsumer indicates a widget that wants all key events sent directly to it, bypassing global key bindings. Used by [2 …
internal/ui/widget.go
InputHolder (Interface)
InputHolder is implemented by widgets that host an InputWidget so global clipboard commands can be routed to the focused [2 …
internal/ui/input_widget.go
Widget (Interface)
(no doc) [1 implementers]
internal/ui/widget.go

Core symbols most depended-on inside this repo

Error
called by 242
internal/lsp/jsonrpc.go
SetCell
called by 184
internal/term/screen.go
createTempDir
called by 161
tests/functional/helpers.js
Register
called by 141
internal/command/registry.go
createTempFile
called by 141
tests/functional/helpers.js
OpenFile
called by 98
internal/ui/editor_group.go
HandleEvent
called by 91
internal/ui/widget.go
GetRect
called by 75
internal/ui/widget.go

Shape

Function 1,032
Method 919
Struct 252
TypeAlias 20
Interface 6

Languages

Go98%
TypeScript1%
Python1%
C1%

Modules by API surface

internal/ui/editor_widget.go93 symbols
internal/ui/editor_group.go91 symbols
internal/lsp/protocol.go54 symbols
internal/term/paste_test.go52 symbols
internal/core/undo/undo.go52 symbols
internal/core/undo/undo_test.go47 symbols
internal/app/app.go45 symbols
internal/ui/search_widget.go40 symbols
internal/app/app_lsp.go40 symbols
internal/ui/changes_widget.go39 symbols
internal/ui/diff_widget.go34 symbols
internal/lsp/protocol_test.go32 symbols

For agents

$ claude mcp add ttt \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page