Back to Articles

Terax AI: The 7MB Terminal That Rethinks AI-Native Development

[ View on GitHub ]

Terax AI: The 7MB Terminal That Rethinks AI-Native Development

Hook

A complete AI development environment—terminal, editor, git UI, and agentic execution—fits in 7MB. That's smaller than a single high-resolution screenshot, yet it's reshaping how developers think about AI-assisted workflows.

Context

The AI coding assistant landscape has bifurcated into two camps: heavyweight IDE extensions like Cursor that bundle entire Electron instances (500MB+ installs), and terminal-adjacent tools like Warp that treat AI as a command search feature rather than a true development partner. Both approaches miss a fundamental insight: developers doing infrastructure work, scripting, or exploratory coding spend more time in terminals than editors, yet AI tools remain editor-first.

Terax AI attacks this gap with a radical architecture choice: build the entire workspace around the terminal as the primary interface, not the editor. Using Tauri 2's Rust-backed WebView approach instead of Electron, it achieves a 7MB binary that boots in under a second. But the real innovation isn't the file size—it's the agentic workflow design. Rather than autocomplete or chat-in-sidebar patterns, Terax treats AI as a collaborative pair programmer that proposes file edits and bash commands through an approval-gated execution model, with project memory persisted in a human-readable TERAX.md file. This architecture acknowledges a truth many tools ignore: giving AI direct shell access is powerful, but only if you can review and reject dangerous operations before they execute.

Technical Insight

External

Rust Backend

Tauri 2 IPC Layer

React 19 Frontend

PTY I/O

create_terminal

stdin/stdout

Tool Calls

File/Bash Commands

Approved Actions

Execute

Streaming Responses

Edit Requests

Read/Write

Persist

Shell Out

Graph Output

Parsed Data

Commit Lanes

xterm.js WebGL

Terminal Renderer

CodeMirror 6

Editor + Diff

Vercel AI SDK

Stream Handler

Command Bridge

portable-pty

Shell Spawner

Filesystem API

File Operations

Git Shell Executor

Commit Graph Parser

Tool Executor

Approval Gating

LLM API

Streaming

Native Shell

bash/zsh/pwsh

Git Repository

TERAX.md

Memory

System architecture — auto-generated

Terax's architecture is a study in strategic technology choices that prioritize binary size and terminal fidelity over IDE conveniences. The foundation is Tauri 2, which compiles to native executables using the operating system's WebView (WebKit on macOS/Linux, Edge WebView2 on Windows) instead of bundling Chromium. This isn't just about vanity metrics—the 7MB distribution means instant startup and trivial installation, crucial for a tool competing against native terminals like Alacritty.

The PTY (pseudo-terminal) handling reveals clever cross-platform engineering. Terax uses the portable-pty Rust crate to spawn shells, then bridges to the frontend via Tauri's IPC:

#[tauri::command]
async fn create_terminal(
    state: State<'_, TerminalState>,
    shell: Option<String>,
) -> Result<String, String> {
    let pty_system = native_pty_system();
    let mut cmd = PtyCommand::from_shell_with_args(
        shell.as_deref().unwrap_or_default(),
        &[],
    );
    
    let pair = pty_system
        .openpty(PtySize { rows: 24, cols: 80, .. })
        .map_err(|e| e.to_string())?;
    
    let reader = pair.master.try_clone_reader()
        .map_err(|e| e.to_string())?;
    let writer = pair.master.take_writer()
        .map_err(|e| e.to_string())?;
    
    let child = pair.slave.spawn_command(cmd)
        .map_err(|e| e.to_string())?;
    
    let term_id = Uuid::new_v4().to_string();
    state.terminals.lock().unwrap()
        .insert(term_id.clone(), (reader, writer, child));
    
    Ok(term_id)
}

This Rust backend handles shell spawning while the frontend uses xterm.js with WebGL rendering. The GPU-accelerated approach is controversial—traditional terminals like Alacritty use CPU-based glyph rendering for predictability, but xterm.js trades that for smooth scrollback on massive buffers. On a 100,000-line log file, Terax maintains 60fps scrolling where CPU renderers stutter, though you'll hit GPU driver quirks on older Intel integrated graphics.

The agentic workflow is where Terax diverges from competitors. Instead of autocomplete (Copilot's model) or freeform chat (ChatGPT's model), Terax uses structured tool calling via Vercel AI SDK v6:

import { streamText } from 'ai';
import { openai } from '@ai-sdk/openai';

const result = await streamText({
  model: openai('gpt-4-turbo'),
  messages: conversationHistory,
  tools: {
    editFile: {
      description: 'Modify file contents with unified diff format',
      parameters: z.object({
        path: z.string(),
        diff: z.string(),
      }),
      execute: async ({ path, diff }) => {
        return await invoke('apply_diff', { path, diff });
      },
    },
    executeBash: {
      description: 'Run bash command (requires user approval)',
      parameters: z.object({
        command: z.string(),
      }),
      execute: async ({ command }) => {
        const approved = await showApprovalDialog(command);
        if (!approved) throw new Error('User rejected');
        return await invoke('run_command', { command });
      },
    },
  },
});

The approval gating for bash execution is the crucial security primitive. When the AI wants to run rm -rf dist/, you see a modal with syntax-highlighted command preview before it touches your filesystem. This sounds obvious, but tools like Devin and early versions of Cursor's agent mode would auto-execute shell commands, leading to predictable disasters.

Project memory via TERAX.md is elegantly simple: when you start a session, Terax reads this markdown file from your project root and injects it as system context. The AI then updates it with architectural decisions, gotchas discovered, and useful commands. This avoids vector database complexity while keeping context human-auditable—you can git diff to see what the AI learned. The limitation is context window size; a 50-page TERAX.md will blow your token budget, but for most projects, a 2-3 page living document works beautifully.

The git integration sidesteps native bindings entirely. Instead of libgit2 (which requires platform-specific compilation), Terax shells out to git CLI and parses the output:

const { stdout } = await invoke('git_graph', { cwd });
const commits = stdout
  .split('\n')
  .filter(line => line.startsWith('*'))
  .map(line => {
    const [hash, message] = line.slice(2).split(' ', 2);
    return { hash, message, lane: line.match(/\|/g)?.length || 0 };
  });

This works because git's output format is stable, and it avoids the binary size overhead of libgit2 (several MB). The tradeoff is fragility—if git changes --graph output, Terax breaks until patched.

CodeMirror 6 powers the editor with a custom diff extension for AI edits. When the AI proposes changes, you see a split view with accept/reject buttons per hunk. This granular control beats VSCode's Copilot model where you accept entire suggestions or nothing, especially when the AI nails one part of a multi-line edit but hallucinates another.

Gotcha

The 7MB binary is impressive marketing, but the WebView dependency means you're at the mercy of system rendering engines. On Linux with Wayland, you'll hit janky scrolling and input lag until you set WEBKIT_DISABLE_DMABUF_RENDERER=1, and even then, emoji rendering breaks in some distros. macOS and Windows fare better due to mature WebKit/WebView2 implementations, but if you're running bleeding-edge Linux desktop environments, expect paper cuts. Alacritty and Kitty's native renderers avoid this entire class of problems by controlling the rendering pipeline.

The elephant in the room is the absence of LSP (Language Server Protocol) integration. Terax gives you syntax highlighting via CodeMirror, but no autocomplete, no go-to-definition, no inline type errors. This isn't an oversight—LSP clients are complex and would bloat the binary—but it means Terax is genuinely a terminal-first tool with a lightweight editor, not an IDE replacement. You're expected to use the AI for code intelligence instead of traditional tooling. This works surprisingly well for scripting and exploratory coding, but if you're writing a TypeScript monorepo with complex imports, you'll miss VSCode's intellisense within an hour. The AI can suggest code, but it can't tell you in real-time that you're calling a method that doesn't exist.

Security-wise, the approval gates only cover bash execution, not file operations. The AI can write to any file your user can access without additional prompts beyond the initial edit preview. If the LLM hallucinates a path and you approve the diff without careful review, it might overwrite something critical. Container sandboxing (like Devin's Docker approach) would add safety, but also megabytes and complexity. There's no tmux/screen protocol support either, so remote development means SSH sessions that can't reattach—a dealbreaker if you work on long-running remote builds.

Verdict

Use Terax if you're doing infrastructure work, DevOps scripting, or exploratory prototyping where having AI, terminal, and git visualization in one lightweight window beats alt-tabbing between tools. It shines on macOS and Windows for local development workflows where you want agentic assistance without Electron bloat, and the approval-gated bash execution makes it safer than auto-executing alternatives. The TERAX.md project memory is genuinely clever for maintaining context across sessions. Skip it if you need real IDE features like LSP-powered autocomplete and refactoring tools, if you're running Linux Wayland as your daily driver (rendering issues), or if remote development via multiplexer reattachment is core to your workflow. Also skip if you expect a plugin ecosystem—there's no extension API, so you're dependent on upstream for every feature. For terminal-first developers willing to trade IDE conveniences for a fast, integrated AI workspace, Terax is the most architecturally interesting option since Warp, and far more hackable.

// ADD TO YOUR README
[![Featured on Starlog](https://starlog.is/api/badge/developer-tools/crynta-terax-ai.svg)](https://starlog.is/api/badge-click/developer-tools/crynta-terax-ai)