Skip to content

tlbx-ai/MidTerm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2,144 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MidTerm Banner

MidTerm

GitHub Release License: AGPL v3 macOS Windows Linux

Your terminal workspace, anywhere. Run AI coding agents and local tools on your own machine, then keep using them from any browser on desktop, tablet, or phone.

MidTerm Screenshot

What MidTerm Is

MidTerm is a web-based terminal multiplexer with a lot more around the terminal than a simple shell tab. It gives you multiple long-lived terminal sessions, split layouts, files and git panels, saved commands, browser previews, mobile-first controls, voice and smart-input workflows, update management, certificate trust help, and remote-access tooling in one local install.

The core idea is still simple:

  1. Start work on your main machine.
  2. Open MidTerm from another browser later.
  3. Keep the same sessions alive without moving your code or secrets to someone else's server.

What You Get

  • Terminal workspace, not a single shell page. Multiple sessions, split-pane layouts, session reordering, search, heat indicators, bookmarks/history, tmux compatibility, and a manual-resize model built for multi-device use.
  • Workflow surfaces around the terminal. Per-session Files tabs with preview and save, Git status with diff overlays, Commands panels for saved scripts, a customizable manager bar, and session-scoped web preview/browser automation.
  • Remote and mobile features built in. Smart Input, touch controller, mobile action menus, PWA install, document Picture-in-Picture, voice/chat hooks, shared-session links, and Share Access packets for sending trusted connection details to other devices.
  • Security and operations for real installs. Password auth, local HTTPS cert generation, trust-page onboarding, API keys, run-as-user support, diagnostics overlays, live settings sync, stable/dev update channels, and install/update scripts for user mode or service mode.

The full tracked inventory is in docs/FEATURES.md.

Install

Recommended for real installs: use the native installer. It handles password setup, service mode, certificate setup, and the normal update path.

macOS / Linux

curl -fsSL https://tlbx-ai.github.io/MidTerm/install.sh | bash

Windows (PowerShell)

irm https://tlbx-ai.github.io/MidTerm/install.ps1 | iex

Quick launch via npx

npx @tlbx-ai/midterm

That path is useful for trying MidTerm in user mode. Use the native installer when you want the persistent install, service integration, and normal update flow.

Open https://localhost:2000, create a session, and you have the full workspace.

Install Modes

Mode Best for Notes
System service Always-on access, remote use, headless or shared machines Starts in the background and survives logouts/reboots
User install Trying MidTerm, personal workstations, no admin access Runs in your user context and is started when needed

Common Workflows

  • AI coding agents on your own hardware. Run Claude Code, Codex, Aider, Cursor CLI, or any other terminal-native agent, then continue approving steps from your phone.
  • Long-running sessions that stay put. Builds, deploys, test suites, data jobs, shells, and TUIs stay alive while the browser client comes and goes.
  • Terminal-plus-browser workflows. Use web preview and browser automation beside the terminal instead of constantly switching out to a separate browser window.
  • Remote access without turning your machine into a cloud IDE. Pair MidTerm with Tailscale, Cloudflare Tunnel, or your own reverse proxy and keep your code, tools, and API keys on the box you control.

Remote Access

The simplest path is usually Tailscale. Install it on the machine running MidTerm, then open MidTerm from any of your devices over the Tailnet.

Other common options:

  • Cloudflare Tunnel
  • Reverse proxy with HTTPS via nginx or Caddy
  • Shared-session links when you want to expose only one session instead of the full UI

MidTerm also includes a trust page and certificate download helpers so local HTTPS access works cleanly on phones and tablets.

Architecture and Docs

Reference

Binaries

  • mt / mt.exe - web server, static asset host, REST API, WebSockets, update UI, settings UI
  • mthost / mthost.exe - PTY host, one process per terminal session

Settings Locations

  • Service mode: %ProgramData%\MidTerm\settings.json on Windows or /usr/local/etc/midterm/settings.json on Unix
  • User mode: ~/.midterm/settings.json

Command Line

mt [options]

  --port 2000       Port to listen on (default: 2000)
  --bind 0.0.0.0    Address to bind to (default: 0.0.0.0)
  --version         Show version and exit
  --hash-password   Hash a password for settings.json

Build From Source

Prerequisites

git clone https://github.com/tlbx-ai/MidTerm.git
cd MidTerm

dotnet build src/Ai.Tlbx.MidTerm/Ai.Tlbx.MidTerm.csproj
dotnet test src/Ai.Tlbx.MidTerm.Tests/Ai.Tlbx.MidTerm.Tests.csproj
dotnet test src/Ai.Tlbx.MidTerm.UnitTests/Ai.Tlbx.MidTerm.UnitTests.csproj

Platform-specific AOT publish scripts live under src/Ai.Tlbx.MidTerm/.

Contributing

Contributions are welcome. See docs/CONTRIBUTING.md for guidelines.

All contributions require acceptance of the Contributor License Agreement.

License

GNU Affero General Public License v3.0

Commercial licensing is available via tlbx-ai.