TotalApp Docs

Terminal Editor

The superset terminal — 75+ commands, chart rendering, and persistent block history.

Overview

Terminal Editor is the most feature-rich terminal in TotalApp. It is the "superset" — combining git commands, GitHub integration, AI analysis, chart rendering, canvas operations, and custom pipelines all in one session. With 75+ commands available, it is designed as a developer notebook where you can mix and match commands freely.

Unlike other terminals, Terminal Editor uses the onBlocksChange callback to automatically persist your block history to the server. When you return to the session, all previous blocks are restored exactly as you left them.

Block Types

Terminal Editor supports all five block types defined in the shared block infrastructure:

TextBlock

Plain text output, optionally with an embedded ChartView. Used for AI responses, plain command output, and chart renders.

RunBlock

Multi-step progress indicator. Each step transitions: pending → running → done/error. Used for multi-stage commands.

SelectBlock

Interactive choice prompt. Displayed when a command needs you to select an option before proceeding.

DiffBlock

Before/after code diff view. Rendered when AI suggests a code change or refactoring.

PipeBlock

Pipeline stage tracker. Shows each stage of a piped command sequence with live status.

Persistent Blocks

Terminal Editor automatically saves your session to the server via the onBlocksChange callback. This means:

  • All blocks from your previous session are restored when you open Terminal Editor again.
  • AI responses, chart renders, and git output are all preserved across page reloads.
  • You can build up a rich analysis session over multiple working sessions.

Use as a Dev Notebook

The persistent block history makes Terminal Editor ideal as a long-running developer notebook. Start a session in the morning with git log --oneline, run some AI analysis midday, and add charts in the afternoon. Everything stays in place.

To clear the session history, click the Clear button in the terminal toolbar. This removes all blocks from both the view and the server-persisted store.

AI Commands

Terminal Editor includes the full Claude AI command set. These commands send your input to the configured AI backend (Anthropic API, Claude CLI, or Cohere) and stream the response into a TextBlock.

CommandDescription
claude ask [question]Ask Claude any question. Response streamed into TextBlock with markdown rendering.
brainstorm [topic]Generate a structured brainstorm with ideas, considerations, and next steps.
summarize [file]Read a file and return a concise summary of its contents.
ask-doc [file] [question]Ask a specific question about a file's contents. Useful for understanding unfamiliar code.

Chart Commands

Terminal Editor supports chart rendering via the shared ChartView component embedded inside TextBlocks. Chart commands are the same as in Graph View.

CommandOutput
chart bar [dataset]Interactive bar chart inside a TextBlock
chart line [dataset]Interactive line chart inside a TextBlock
chart pie [dataset]Pie/donut chart inside a TextBlock
git-stats commits-by-authorBar chart of commit counts per contributor
git-stats file-changes-over-timeLine chart of file modification frequency

Tips

  • Combine AI + git + chart commands — run git-stats commits-by-author to see contributor activity, then claude ask "which contributor should I ask to review auth code?" to get an AI recommendation based on the stats.
  • Use pipelines for multi-step workflows — chain commands with | to feed one command's output directly into the next.
  • History navigation — use the Up arrow key to scroll through command history. Avoids retyping long commands.
  • Compact mode — toggle compact mode in the toolbar to see more blocks at once by reducing each block's vertical footprint.
  • Clear when starting fresh — if the accumulated block history becomes cluttered, use Clear to start a new session while retaining your command history (Up arrow still works after clearing).