Repository navigation
Terminal and Claude Code
Since v0.14.0 form.md has a panel with terminals, Claude Code and a Claude Code chat. Since v0.55.0 it is the terminal panel every Form app shares: it sits at the bottom or the right of the window, in a row or a column of its own, so it does not cover the page.
The instance owner, signed in, on a form.md that listens on this computer (127.0.0.1, the default for ./form-md and the desktop case).
-
On a server it is off. A terminal is a shell as the user the server runs as, so on a server it is off unless you set
FORMMD_TERMINAL=on;FORMMD_TERMINAL=offturns it off even locally. - Agents cannot reach it. Agent tokens never reach it.
-
Only from the app's own page. A terminal also attaches only from a page the server itself served (the page's origin must be the request's own host, or
tauri.localhostfor the desktop window), so a page served from another port on the same computer is refused. - Tied to your session. A terminal tab is attached through the browser session that opened it: signing that session out (here, from another device in Account settings, Sessions, or by an admin) detaches it at once, while the shell keeps running for your other sessions.
- Not on Windows servers. Windows servers report that the terminal needs macOS or Linux.
| Keys | Opens |
|---|---|
Mod+J |
the panel (or the terminal button in the top bar) |
Mod+Alt+J |
Claude Code in a new tab |
Mod+Alt+K |
the Claude Code chat |
Terminal tabs keep running when the panel is hidden or the page reloads; reopening replays the last 256 KiB. The Restart button in the panel's head restarts the tab in front, the x closes a tab. Drag the panel's inner edge to resize it. The side button moves the panel between the bottom and the right; the right needs a window at least 768 px wide. The panel remembers its side, its size and the tab in front, and the first time it opens a short guide points at its parts.
The More agents menu opens Codex, Cursor's agent and Antigravity (Google's agy program) in a tab each when the program is installed, and shows the command that installs it when it is not. An Antigravity tab's connection is the formmd_tab entry in the tab folder's .agents/mcp_config.json, written when the tab opens and taken out when it closes. Its Connected apps entry opens Account settings.
Claude Code must be installed and signed in once (claude in any terminal).
How form.md finds the programs. form.md looks for each of the four programs (Claude Code, Codex, Cursor and Antigravity) in the same order:
- at its override variable (
FORMMD_CLAUDE_BIN,FORMMD_CODEX_BIN,FORMMD_CURSOR_BIN,FORMMD_ANTIGRAVITY_BIN), - on the PATH form.md was started with,
- in the usual install folders,
- then on your shell's own PATH, which it reads once.
A program that is found but does not start is reported with the error it printed, and one that is not found with the places that were looked in.
Tokens.
- Each tab starts in the data directory's
agent/folder with this form.md's MCP endpoint attached through a token of its own, listed as "Claude Code tab in form.md" in your account's API tokens while the tab is open. - Closing the tab ends its token, and revoking it there cuts that tab off.
- Chat uses one token named "Claude Code in form.md"; revoke it and the next chat turn gets a new token of the same name.
The chat runs the same Claude Code non-interactively and shows its answer, every form.md tool it calls and the memory it uses. Open in Claude Code continues the conversation in a terminal tab; the From Claude Code command, in Find a command, brings a tab's conversation into the chat.
Outside the app, ./form-md claude starts Claude Code in your own terminal with form.md's tools, and ./form-md agents install registers form.md with Claude Code for every project; both need FORMMD_MCP_TOKEN set to a personal API token. agents install does not put the token on a command line: it registers the header Authorization: Bearer ${FORMMD_MCP_TOKEN} and Claude Code reads the variable from its environment when it connects, so keep FORMMD_MCP_TOKEN exported in the shell where you start claude. Both find Claude Code the way the server does, so a copy the terminal panel finds is the one they use. For Codex, Cursor and Antigravity the command only prints where to copy the configs from examples/agents/.
Every command in the window has an id, a label, a group and, for newer commands, a description, typed parameters and whether it changes anything. Agents use:
| Tool or route | Does |
|---|---|
MCP window_commands · GET /api/commands
|
lists the open window's commands |
MCP window_command_describe · GET /api/commands/{id}
|
one command in full |
MCP window_command_run · POST /api/commands/run
|
runs it in the window and returns its result |
./form-md cli list, describe ID, run ID key=value
|
the same from a terminal, with FORMMD_MCP_TOKEN
|
A call needs a form.md window open for the same account; otherwise it fails with a message saying so. A read-only token can run only commands that change nothing.
form.md
Running an instance
Using it
- Data-views
- Offline
- API-and-agents
- Form-family
- Context-and-knowledge
- Terminal-and-Claude-Code
- Extensions
Changing the code