This guide walks you through installing tcode and running it for the first time.
-
Operating system -- Linux or macOS. Windows is not supported natively, but tcode works on WSL2 (Chrome browser tools may require extra library dependencies; see 06-browser.md).
-
tmux -- tcode manages its UI as panes inside a tmux session. Install via your system package manager (
apt install tmux,brew install tmux, etc.). -
Neovim (>= 0.9) -- tcode uses neovim for its display and edit windows. The LazyVim distribution is recommended. See 05-neovim.md for plugin setup.
-
Chrome or Chromium -- required by
web_searchandweb_fetchtools, including web-only sessions. Runtcode browserto configure. See 06-browser.md for details.Heads up — Google CAPTCHA on first use.
web_searchdrives the public Google search page (https://www.google.com/search) through a headless Chrome profile — it does not use a search API. A brand-new profile with no history or cookies will very often hit Google's CAPTCHA / "unusual traffic" page on the first few queries, and searches will silently fail. Before relying onweb_search, runtcode browserand either log in to your Google account in that window, or at least run a handful of manual Google searches to warm the profile up. Cookies and sessions fromtcode browserare reused by the headless browser-server, so you only need to do this once. If you prefer a different engine, log in to Kagi intcode browserand switch thesearch_enginesetting — see 06-browser.md and 02-configuration.md.
curl -sSL https://raw.githubusercontent.com/wb14123/tcode/refs/heads/master/install.sh | shThis downloads the latest release and installs:
tcodeandbrowser-serverto/usr/local/binlibtree-sitter-tcode.so(or.dylibon macOS) to/usr/local/lib
Release builds embed the web UI frontend into the tcode binary, so no separate frontend files are installed.
To install a specific version:
curl -sSL https://raw.githubusercontent.com/wb14123/tcode/refs/heads/master/install.sh | VERSION=v0.2.0 shIf you don't have root, or prefer a self-contained install under your home directory, pass --user:
curl -sSL https://raw.githubusercontent.com/wb14123/tcode/refs/heads/master/install.sh | sh -s -- --userThis installs to ~/.local/bin and ~/.local/lib and never invokes sudo. Make sure ~/.local/bin is on your $PATH; the installer prints a shell-specific hint at the end if it isn't. The VERSION environment variable also works with --user:
curl -sSL https://raw.githubusercontent.com/wb14123/tcode/refs/heads/master/install.sh | VERSION=v0.2.0 sh -s -- --usermacOS manual download: If you download
.tar.gzfrom GitHub Releases via a browser instead of using the install script, macOS may block the binaries. Runxattr -d com.apple.quarantineagainst the installed files to fix this. For a system install:xattr -d com.apple.quarantine /usr/local/bin/tcode /usr/local/bin/browser-server /usr/local/lib/libtree-sitter-tcode.dylib. For a user install:xattr -d com.apple.quarantine ~/.local/bin/tcode ~/.local/bin/browser-server ~/.local/lib/libtree-sitter-tcode.dylib.
Building from source requires:
- Rust toolchain — install via rustup
- A C compiler — needed to build the tree-sitter grammar (
gccorclang) - Node.js/npm — needed to build the web frontend and install the tree-sitter CLI
- tree-sitter CLI — install via
npm install -g tree-sitter-cli
git clone https://github.com/wb14123/tcode.git && cd tcode
./install-from-source.sh # system install to /usr/local (uses sudo)
# or, for a user-local install (no sudo):
./install-from-source.sh --user # installs to ~/.localinstall-from-source.sh runs npm ci and npm run build in tcode-web/frontend, then runs cargo build --release --features tcode/bundled-frontend. It installs tcode, browser-server, and the tree-sitter shared library into <prefix>/bin and <prefix>/lib. The web UI is embedded in the installed tcode binary.
tcode --version
# tcode 0.1.5 (a3f9b2c)To uninstall:
# System install:
sudo rm /usr/local/bin/tcode /usr/local/bin/browser-server /usr/local/lib/libtree-sitter-tcode.*
# User install:
rm ~/.local/bin/tcode ~/.local/bin/browser-server ~/.local/lib/libtree-sitter-tcode.*tcode uses a custom tcode filetype for the display buffer. To get rendered headings, code blocks, lists, and other markdown elements, you need to configure render-markdown.nvim to handle this filetype. Add tcode to its file types in your neovim config (e.g., as a LazyVim plugin spec):
return {
{
"MeanderingProgrammer/render-markdown.nvim",
ft = { "markdown", "tcode" },
opts = {
file_types = { "markdown", "tcode" },
},
},
}Without this, the display pane will have no syntax highlighting for markdown content. See 05-neovim.md for more neovim setup details.
Normal sessions can read all files under the current directory by default. tcode automatically grants read access to everything inside the directory you launch it from in normal mode — no approval prompt. Always
cdinto the specific project you want to work on before runningtcode. Don't launch it from broad directories like~or/. Web-only sessions do not register local filesystem or shell tools. See 07-permissions.md for details.
Inside a tmux window, cd into your project and run:
tcodeOn first launch tcode detects that no config file exists and auto-starts the interactive setup wizard. You can re-run the wizard any time with tcode config, or with tcode -p <profile> config to create a profile-specific config at ~/.tcode/config-<profile>.toml. The wizard refuses to overwrite an existing file — delete it first if you want to regenerate.
Pick a provider from the menu:
claude— Anthropic API-key mode. Paste your key at the wizard prompt, or leave it blank; an empty input is written asapi_key = ""and at runtime tcode falls back toANTHROPIC_API_KEYfrom your shell if the env var is set.claude-oauth— Claude Pro/Max subscription via OAuth. The wizard skips both the base URL and API-key prompts; after it finishes, runtcode claude-authto authenticate (ortcode -p <profile> claude-authif you created a profile-specific config). This provider loads tokens viatcode claude-authand ignores both the configapi_keyand$ANTHROPIC_API_KEYentirely.open-ai— OpenAI API-key mode. Paste your key, or leave it blank to fall back toOPENAI_API_KEYat runtime.open-ai-oauth— OpenAI with a Codex / ChatGPT Pro subscription via OAuth. The wizard skips both the base URL and API-key prompts; after it finishes, runtcode openai-authto authenticate (ortcode -p <profile> openai-authif you created a profile-specific config). This provider loads tokens viatcode openai-authand ignores both the configapi_keyand$OPENAI_API_KEYentirely.open-router— OpenRouter API-key mode. Paste your key, or leave it blank to fall back toOPENROUTER_API_KEYat runtime.
| Provider | Environment Variable |
|---|---|
claude |
ANTHROPIC_API_KEY |
open-ai |
OPENAI_API_KEY |
open-router |
OPENROUTER_API_KEY |
claude-oauth and open-ai-oauth have no environment variable — they authenticate via OAuth only.
Accept the default base URL or override it, then paste your API key (or leave it blank to fall back to the env var). For claude-oauth and open-ai-oauth, both the base URL and API-key prompts are skipped entirely.
The wizard writes the config to ~/.tcode/config.toml (or ~/.tcode/config-<profile>.toml with -p), prints the absolute path, and exits. Run tcode again to start your first session. OAuth token files follow the same pattern: no profile uses the unsuffixed token file, while tcode -p <profile> ... uses a matching *-<profile>.json token file.
Typical first-time flow for claude-oauth (no profile):
tcode— wizard runs, pickclaude-oauth, accept defaults, wizard exits.tcode claude-auth— complete OAuth in the browser.tcode— launches the full four-pane UI.
If you created a profile-specific config, use the matching profile for auth and runtime too: tcode -p work claude-auth, then tcode -p work.
Typical first-time flow for open-ai-oauth (no profile):
tcode— wizard runs, pickopen-ai-oauth, accept defaults, wizard exits.tcode openai-auth— complete OAuth in the browser (openslocalhost:1455callback).tcode— launches the full four-pane UI.
If you created a profile-specific config, use the matching profile for auth and runtime too: tcode -p work openai-auth, then tcode -p work.
All other options (model, layout, subagent limits, browser server, search engine) live as commented-out lines in the generated file. Open ~/.tcode/config.toml in your editor to uncomment and tune them. See 02-configuration.md for the full reference.
For web research without local project access, start:
tcode --web-onlyA web-only session uses the same tmux/neovim UI, but only current time, web search/fetch, and delegation tools are available. It does not expose local file tools, shell commands, LSP, skills, or project instructions. Browser setup still matters because web_search and web_fetch use the shared browser-server profile. web_fetch hostname permissions are auto-granted in web-only sessions (revocable from the permission pane).
To use tcode from a browser, or to deploy a web-only research server, see Remote Web UI.
tcode opens a four-pane layout inside your tmux window:
+------------------+------------------+
| | |
| display | tree |
| (conversation) | (subagent/tool |
| | hierarchy) |
+------------------+------------------+
| | |
| edit | permission |
| (compose message)| (tool approvals) |
| | |
+------------------+------------------+
- display (top-left) -- shows the conversation history. This is a neovim buffer, so all your normal neovim navigation works (scrolling, searching with
/, etc.). - edit (bottom-left) -- where you compose messages. Also a neovim buffer, so you have full neovim editing (motions, registers, visual mode, etc.).
- tree (top-right) -- shows the subagent and tool call hierarchy.
- permission (bottom-right) -- where tool permission prompts appear.
Navigating between panes: These are tmux panes, so you use tmux keybindings to move between them. The default tmux prefix is Ctrl-b:
Ctrl-bthen arrow key -- move to the pane in that directionCtrl-b o-- cycle to the next paneCtrl-b z-- zoom the current pane to full screen (press again to restore)
Most of the time you'll stay in the edit pane to type messages and use Ctrl-p to handle permissions without switching panes.
Focus starts in the edit pane. Type your message, then:
- Press Enter in insert mode to send, or
- Press Ctrl-s in normal mode to send.
Use Ctrl-j in insert mode to insert a newline without sending.
The agent's response will stream into the display pane.
When the agent tries to use a tool that requires permission (e.g., reading a file, running a command, or fetching a URL), a permission request appears in the permission pane (bottom-right). You can approve it in two ways:
-
From any pane: Press Ctrl-p to open the next pending approval as a tmux popup. Choose:
1— Allow once (this invocation only)2— Allow for session (until you close tcode)3— Allow for project (persisted across sessions)4— Deny (opens an optional single-line reason input; press Enter to deny, Esc to go back)
-
From the permission pane: Navigate to a pending request with
j/kand press Enter to open the approval popup.
Approved permissions are visible in the permission pane. You can navigate to any granted permission and press Enter to revoke it. This gives you a clear view of exactly what the agent can do at any point. See 07-permissions.md for a full explanation of how permissions work (scopes, matching, adding permissions proactively, etc.) and 04-keybindings.md for the full keybinding reference.
Skills with user-invocable: true appear as /skill-name completions in the edit buffer. Type / followed by a skill name and press Tab to expand the skill body into the edit buffer. For example:
/code-review+ Tab — expands to a thorough code review prompt/write-tests+ Tab — expands to a test-writing instruction template
Typing / at the start of a line or after a space shows a completion popup with all user-invocable skills. Skills come from ~/.tcode/skills/ or .tcode/skills/ directories — there are no longer any built-in shortcuts. You create and customize skills to fit your own workflows. See 02-configuration.md for setup and usage details.
When the agent spawns subagents or runs tools, they appear in the tree pane (top-right) as a live hierarchy. From the tree pane:
j/kto navigate,Spaceto expand/collapse- Enter to open a subagent's conversation or tool call detail in a new tmux window
- Ctrl-k to cancel a running subagent
From the display pane, press o on a subagent or tool call block to open its detail in a new window. Press Ctrl-k on a running tool/subagent to cancel it, or Ctrl-c to cancel the entire conversation.
Detail views open as separate tmux windows. Use tmux window navigation to switch between them and the main tcode instance:
Ctrl-b n/Ctrl-b p-- next / previous tmux windowCtrl-b <number>-- jump to a specific window by index- q -- close the detail view and return to the previous window
- Start tcode in your project directory:
tcode(or usetcode --web-onlyfor standalone web research without local project access) - Type
/your-skill-name+ Tab to expand a skill template, then describe what you want to build. Send it. - The agent responds. Approve any tool permissions it needs (file reads, etc.) via Ctrl-p.
- Review the results, ask questions or suggest changes.
- Monitor progress in the tree pane. Approve permissions as they come up.
Create your own skills in ~/.tcode/skills/ or .tcode/skills/ to match your workflow. See 02-configuration.md for details.
- 02-configuration.md -- full config reference
- 03-commands.md -- CLI commands and usage
- 04-keybindings.md -- keyboard shortcuts
- 05-neovim.md -- neovim plugin setup
- 06-browser.md -- browser and web tools setup
- 07-permissions.md -- how the permission system works