TerminalDB: The terminal that remembers what worked Skip to content
TerminalDB
Download for macOS
MIT licensed · native macOS · local history

The terminal that
remembers what worked.

TerminalDB records every command as a structured record. Path, host, environment, exit status, duration and output are all captured, then kept in a searchable database on your Mac. Your shell history stops being a flat list of strings and becomes context you and your AI assistant can actually reason about. Connect as many Claude subscription accounts as you use, and switch the active one per terminal tab in a single action.

macOS 13+ · universal build (Apple Silicon + Intel) · SHA-256 published with every release
Public prerelease: v0.1.0 is available now. The published checksum is included on the release page.

Screenshot of the TerminalDB app on macOS. The left pane shows a saved command block for find . -type f -iname '*.jpg' with EXIT 0, the path /Users/demo/Projects/archive, host Demo Mac, LOCAL environment and a 0.12s duration, plus Ask AI, Rerun and Details actions above the live terminal output. The right pane is the AI chat, running Claude Sonnet 5, proposing two commands with Paste and Run buttons. The bottom status strip reads Demo Team, developer@example.com, Team, LOCAL, and usage of 5h 28 percent, 7d 46 percent and F 12 percent with reset times.
TerminalDB 0.1.0 running on macOS. Command blocks, the AI pane and the status strip share one local record. View full size
Structured

Commands are records, not scrollback. Path, host, env, exit code, duration, output.

Permissioned

The assistant proposes. Nothing executes without an explicit grant you can scope.

Every Claude account

Connect as many subscription accounts as you need. Switch per tab in one action.

History stays on your Mac · MIT licensed and buildable from source · no analytics by default
Claude account management

Every Claude account, ready when you need it.

Work, team and personal Claude subscriptions live side by side in TerminalDB. Each connected profile gets its own isolated Claude configuration directory and its own macOS Keychain credential, so switching the account for a tab takes one click and never touches the tab beside it.

Screenshot of the TerminalDB Claude Code Account and Usage window on macOS. A cyan label reads CLAUDE CODE, ACTIVE FOR THIS TAB above the heading Account and usage, with the note that subscription usage is per Claude Code account and AI chat can use this subscription or a separately managed API key. The active account is Demo Team, developer@example.com, Team, marked SIGNED IN with usage applying to this terminal tab, beside an account picker and a Remove button. A usage panel lists 5h at 28 percent, 7d at 46 percent and F at 12 percent with reset times of 7/24 8:03 PM, 7/29 6:03 PM and a Fable weekly reset of 7/28 6:03 PM. Below, a list headed ALL ACCOUNTS, NO LIMIT, ONE ACTIVE PER TAB shows a checkmark beside Demo Team developer@example.com Team, then Operations ops@example.com Max, then Personal personal@example.com Pro. Footer buttons are Refresh Usage, Add Account and Done.
The Claude Code account and usage window in TerminalDB 0.1.0. The switcher also lives in the AI menu, and the active profile, plan and authentication state always show in the bottom status strip. View full size
What you get
No account limit

Connect and manage as many Claude subscription accounts as you actually use.

Isolated per profile

Every profile gets its own Claude configuration directory and its own macOS Keychain credential. Nothing is shared between them.

One click, one tab

Switching the active account applies to the current terminal tab only. Every other tab keeps working with the profile you gave it.

Always visible

The status strip names the active account, its plan and its authentication state, so you never guess who is answering.

Usage you can plan around

The 5 hour, 7 day and Fable windows show for the selected account, each with the time it next resets. Refresh them at any time.

Add, select or remove

Add Claude Code Account signs in and creates a new profile. Select one for the current tab, sign back in when a session expires, or remove a local profile.

Clean conversation boundaries

Changing the account, the provider or the model starts a fresh AI conversation, so identity and billing context never cross.

Removing a profile

Removing a TerminalDB profile deletes only that local isolated profile and the credential TerminalDB created for it. It does not cancel your Anthropic subscription, and it does not change billing. Sign in again at any time to recreate the profile.

Claude subscription or Anthropic API, both first class

Claude subscription

  • Sign in with the accounts you already pay for
  • Usage follows your plan windows, shown in app
  • Many accounts connected at once, switched per tab
  • Best when work and personal billing must stay apart

Anthropic API key

  • Usage billed to your Anthropic organisation
  • Model choice independent of a plan
  • Stored in local preferences, masked in the app, and excluded from history
  • Best for scripted work and shared team budgets

Both at once

  • The two connections are fully independent
  • Power chat with the API and keep every subscription account connected
  • Terminal sessions and usage tracking carry on either way
  • Choose the provider once, change it whenever
Anatomy of a command block

Every command carries its own context.

Pick a record to inspect. The same fields that make a block readable are the fields that make it searchable, and they are the only thing the assistant is ever handed.

{{ blockCmd }}
Directory
{{ blockPath }}
Host / env
{{ blockHost }} · {{ blockEnv }}
Exit status
{{ blockExit }}
Duration
{{ blockDur }}
Timestamp
{{ blockTime }}
Record id
{{ blockId }}
{{ blockOut }}
{{ actionMsg }}

Why structure matters

  • Search by outcome. “Show every migration that failed on staging last week.”
  • Replay with confidence. Rerun restores the recorded directory and environment, not just the string.
  • Explain with evidence. The assistant reads the record (command, output, exit code, working directory) instead of guessing from a fragment.
Stored shape
{
  "command":  "pnpm test --filter api",
  "cwd":      "~/work/api-gateway",
  "host":     "ada-mbp.local",
  "env":      "LOCAL",
  "exit":     0,
  "duration": 8.42,
  "started":  "2026-07-24T14:02:11Z",
  "redacted": true
}
Execution by permission

The assistant proposes. You grant.

Every command the AI writes lands in a proposal, never in your shell. Choose the narrowest grant that gets you moving: paste it, run it once, or allow a class of read only commands for this session.

{{ permGlyph }} {{ permTitle }} {{ permRisk }}
Proposed command
{{ permCmd }}
runs in {{ permCwd }}env {{ permEnv }}

{{ permNote }}

Type {{ permPhrase }} to confirm
{{ permPhraseTyped }}
{{ permResult }}
Escalation ladder
read onlyOne click. ls, git status, lsof. “Allow similar” can cover the class for this session.
writesRun once only, with the target paths listed. Never covered by a session grant.
delete / sudoTyped confirmation, an explicit diff of what disappears, and a five second hold before the button arms.
productionEnvironment badge turns coral, the window gains a border, and the environment name must be typed.
unknownAnything the classifier can't place is treated as a write: single run, no session grant, full argument breakdown shown.
Grants are per session, per project, and revocable from the permissions inspector. Nothing persists to the next launch unless you pin it.
Explain / fix this failure

A failure comes with its own evidence.

The assistant receives exactly what you see below, nothing more. The repair it proposes is a proposal, subject to the same permission ladder.

alembic upgrade head
~/work/api-gateway/dbexit 13.1s14:19:04STAGING
sqlalchemy.exc.ProgrammingError:
(psycopg2.errors.DuplicateTable) relation
"orders_idx_created" already exists

[SQL: CREATE INDEX orders_idx_created ON orders (created_at)]
alembic revision: 4f2ab91c7d10 (head 4f2ab91c7d10)
Copy output
Diagnosis context: 1 block · 0 files
Revision 4f2ab91c7d10 creates an index that already exists on staging. It was applied manually at 09:41 by psql -f hotfix.sql, recorded in this database. Alembic's version table was never advanced, so the migration replays.
Proposed repair
alembic stamp 4f2ab91c7d10
alembic current

Marks the revision applied without running its DDL again, then verifies. This one writes, on STAGING, so it is offered as a single run, with the version table row shown before and after.

Paste Run once (confirm) Allow similar (unavailable)
The local database

Search what you ran, not what you remember.

Filter by command, path, environment or outcome. Context chips show exactly which records would travel with a question. Secrets are redacted at write time, before they hit disk.

⌘K
Context sent with a question {{ c.label }}×
{{ r.cmd }}
{{ r.path }}
{{ r.env }} {{ r.exit }}{{ r.dur }}{{ r.when }}
No records match {{ query }}. Try exit:1 or drop a filter.
{{ dbFooter }}
Private session

Nothing is written to the database. The window keeps a dim cyan hairline so you always know which mode you're in.

Secret redaction

Tokens, keys, connection strings and .env values are masked before storage. Patterns are editable and additive.

Explicit context

Chips are the whole payload. Remove one and it is not sent. There is no hidden background collection.

Project aware work

Built for the whole loop, not just the prompt.

Coding tools with a paper trail

Edits arrive as reviewable diffs. Run the project's tests from the same pane, and revert the whole change set in one action if they fail.

src/gateway/ports.ts
- const PORT = 8080
+ const PORT = Number(env.PORT ?? 8081)
148 passed  · revert available

Environment badges

Each tab is labelled from your shell, host and profile. The badge colour follows you into every proposal and confirmation.

LOCAL STAGING PRODUCTION

Monitored long runs

Builds, syncs and deploys keep a live block with elapsed time and a native notification on exit, even when the window is behind another app.

xcodebuild archive04:12 elapsed

Runbooks

Promote a sequence of blocks that worked into a named, parameterised runbook. It replays step by step, pausing at any step that writes.

1. reset-local-db  3 steps
2. rotate-staging-keys  2 confirmations

Restorable workspaces

Tabs, directories, environments, scrollback and the AI thread come back exactly as you left them, per project and across restarts.

api-gateway · 3 tabs · restored 09:02

Native, not a web wrapper

A real macOS app: system menus, Services, search in the style of Spotlight, full keyboard control, and window restoration on relaunch.

⌘K search · ⌘⇧A ask · ⌘↩ rerun
Claude integration

Two independent ways to power AI.

Sign in with a Claude subscription, or supply an Anthropic API key. They are separate connections: if both exist you choose which one answers, and subscription account management, terminal sessions and usage tracking carry on either way. See Claude account management for per tab switching.

{{ p.title }}

{{ p.state }}

{{ p.body }}

{{ p.meta }}
Claude accounts 3 signed in
Add account Sign out
Usage for {{ activeEmail }}
{{ u.label }} {{ u.pctLabel }}
resets {{ u.reset }}

Windows and limits are read from the account you are signed in to. Switching the active account switches these figures; switching the provider does not sign anyone out.

Currently powering AI: {{ providerSummary }}
Privacy, security, open source

Auditable by design.

History stays local

The database is a file in your home directory. No account is required to use the terminal, and history never leaves the machine on its own.

Explicit context

Claude receives a bounded terminal snapshot plus the visible context chips attached to your question. Remove a chip before sending whenever it should stay local.

Permission controls

No command written by the AI runs without a grant. Grants are scoped, listed, and revocable at any time.

Secret redaction

Matching values are masked before the record is stored, so redaction protects the database as well as the request.

MIT license

Use it, fork it, ship it. The full source tree, build scripts and release workflow are public.

No analytics

The current build has no analytics, tracking, telemetry, or crash reporting.

Report a vulnerability Threat model MIT license
Download & install

One build. Both architectures.

The download always points at the latest asset on GitHub Releases, so it stays valid whatever the final domain turns out to be.

{{ dlGlyph }} {{ dlTitle }} {{ dlMeta }}

{{ dlBody }}

Preview the download states used by this design. The published site links to GitHub Releases, which remains the source of truth for assets and checksums.

Requirements
macOS13.0 Ventura or later
ArchitectureUniversal, Apple Silicon and Intel
Shellzsh
Updatesdaily and on demand
Verify the download
 shasum -a 256 TerminalDB-macOS.zip
4f2ab91c7d10e8c5…  TerminalDB-macOS.zip
 codesign --verify --deep --strict TerminalDB.app
 valid on disk

Every release publishes SHA 256 checksums and a universal bundle. The current prerelease is not notarized.

Recent changes on maincommit log ↗
  • Permissions inspector lists active session grants
  • Redaction patterns are now per project
  • Runbooks pause on steps that write
Edge states

Designed for the days it doesn't work.

No release available

The button becomes an inert, clearly labelled notice pointing at the source and the build instructions. It is never a dead link.

Unsupported macOS

Detected version is named, the requirement is stated, and the last compatible release is offered instead of a silent failure.

Download failed

Retry keeps the same asset URL, with a direct mirror link and the checksum shown so a partial file can be identified.

Offline

The page is fully readable without a network. Live release data falls back to the build time snapshot with its date.

Reduced motion

The one animation here (the terminal caret) stops under prefers-reduced-motion, along with smooth scrolling. Nothing else moves.

Keyboard and no JavaScript

Every control is a real button, link or <details> with a 2px cyan focus ring. All copy is in the HTML, so the site is crawlable and usable with scripting off.

Responsive behaviour
DESKTOP 1024 AND UP: two column hero, inline nav
TerminalDBProductFeaturesSecurityDocsGitHubDownload
TABLET 640 TO 1023: stacked hero, nav wraps
TerminalDBDownload
ProductFeaturesSecurityDocsGitHub
MOBILE UNDER 640: single column, sticky CTA
TerminalDB
Download for macOS

Layouts are fluid rather than locked to breakpoints. Every grid on this page collapses at its own natural minimum, type scales with the viewport, and the app mockups keep their proportions down to 320px. On phones the primary download persists as a bottom bar.

Contribute & docs

Build it yourself in four commands.

 git clone https://github.com/danb235/TerminalDB.git
 cd TerminalDB
 make bootstrap
 make test && make app

Xcode 16 and the pinned toolchain are all you need; make bootstrap fetches the rest and prints what it installed.

Build time tokens

GitHub Releases is the canonical source for every application asset and checksum. The stable asset name is TerminalDB-macOS.zip, so the website can always point to the current published tag.

FAQ

Questions worth answering plainly.

Do I need an API key, or is a Claude subscription enough?
Either works, and they are independent. Sign in with a Claude subscription, paste an Anthropic API key, or set up both. With both configured you pick which one powers AI, and subscription account management stays available regardless of the choice.
How many Claude accounts can I connect, and how do I switch?
As many as you use. There is no artificial limit. Each connected account becomes a profile with its own Claude configuration directory and its own macOS Keychain credential. Open the AI menu, pick a profile, and the current terminal tab switches to it. Other tabs are untouched, and a fresh conversation starts so identity and billing context never cross.
What happens when I remove a Claude profile?
TerminalDB deletes that profile directory and the credential it created for it in the Keychain. Nothing else changes: your Anthropic subscription stays active, billing is not modified, and you can sign in again to recreate the profile at any time.
What can Claude actually see?
Only the context chips attached to the question you send: usually specific command blocks and, if you add them, specific files. Values matching your redaction patterns are already masked in the stored record. Nothing is streamed in the background, and the payload can be inspected before it leaves.
Can the AI run commands on its own?
No. Proposals are inert until you grant them. Read only commands can be allowed as a class for the current session. Writes, deletions, sudo, production targets and anything unclassified run a single time only and require an explicit confirmation.
Where does my history live?
In a local database under ~/Library/Application Support/TerminalDB. You can export it, prune it by project or age, or delete it. Private sessions write nothing at all.
Which shells are supported?
zsh is supported in the current build. Block capture uses temporary shell integration hooks that are available to inspect in the source.
How do updates work?
The app checks GitHub Releases once per day and whenever you choose Check for Updates. Before installation it verifies the published SHA 256 checksum, archive paths, architectures, bundle identity, version, code signature, and release signing certificate. You can always download the same asset manually.

Keep the command that worked.

Structured command history, assistance that asks permission, and every Claude account a click away. Install the current build, or read the source first. Both take about a minute.

Download v0.1.0 for macOS View source on GitHub