Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

Meith is a desktop AI workbench for building web apps.

It puts the pieces of web app work in one desktop window: project folders, code files, terminals, run commands, dev-server logs, a built-in browser, plugins, and agent chats. A shared tool system connects them. The visual app, CLI, plugins, and agents all work against the same project state, so an agent can edit code, start your dev server, open the app in the browser, click through the UI, read console output, and show you the diff.
It puts the pieces of web app work in one desktop window: project folders, code files, terminals, run commands, dev-server logs, a built-in browser, plugins, and agent chats. A shared tool system connects them. The visual app, CLI, plugins, and agents all work against the same project state, so an agent can edit code, start your dev server, open the app in the browser, click through the UI, read console output, and surface Git changes.

Codex and Claude Code can write code. Meith gives them a place to work: the browser, terminal, logs, files, diffs, and permissions all sit in the same workbench the agent can use.
Codex and Claude Code can write code. Meith gives them a place to work: the browser, terminal, logs, files, Git changes, and permissions all sit in the same workbench the agent can use.

Meith doesn't lock you into one AI provider. The agent runtime uses an adapter interface and connects to external agents via ACP (Agent Client Protocol), keeping the desktop app independent of any specific model vendor or SDK.

Expand All @@ -20,7 +20,7 @@ The name comes from the Irish *meitheal*: a group of people coming together to w
* Watch browser state and dev-server logs in the same window.
* Split panes to arrange your browser, editor, terminal, or agent side by side.
* Ask an agent to build features in the context of your current project: editing files, running the dev server, and checking the app in the browser.
* Review working-tree changes in the built-in Diff tab, with summary counts in the top bar and patches loaded only when you select a file.
* Review and manage working-tree changes in the built-in Git panel, with a top-bar branch switcher, staged and unstaged sections, stage-all, inline diffs, AI commit message suggestions, commit identity switching, commits, and guarded restore actions.
* Install web-app plugins and explicitly approve the APIs they can use.
* Use the `meith` terminal command to inspect and control a running app instance.

Expand Down Expand Up @@ -146,7 +146,7 @@ pnpm cli call app_health

The CLI covers the registered desktop tool catalog: browser tabs
and automation, spaces/workspace tabs, projects/templates, workspace files,
git diff, terminals/dev servers, settings, storage, plugins, and runtime
git status/diff, terminals/dev servers, settings, storage, plugins, and runtime
diagnostics. `pnpm cli call <toolName>` is the fallback for scripts and tools
without a named CLI command yet.

Expand Down
256 changes: 168 additions & 88 deletions apps/web/components/mockups/workbench-mockup.tsx

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/web/components/sections/cta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function Cta() {
</h2>
<p className="mt-4 text-pretty leading-relaxed text-muted-foreground">
Free and open source. Use meith to give your agent the editor, terminal,
browser, logs, and diffs it needs to build and check the app.
browser, logs, and Git panel it needs to build and check the app.
</p>
<div className="mt-8 flex flex-wrap items-center justify-center gap-3">
<Link
Expand Down
8 changes: 4 additions & 4 deletions apps/web/components/sections/features.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ const features = [
},
{
icon: GitCompare,
title: "Reviewable diffs",
body: "See working-tree counts and per-file patches before you keep a change.",
title: "Built-in Git panel",
body: "Switch or create branches, stage all changes, inspect staged and unstaged diffs, and draft commit messages from the full patch.",
},
{
icon: LayoutGrid,
Expand All @@ -49,8 +49,8 @@ export function Features() {
More than a coding agent
</h2>
<p className="mt-4 text-pretty text-lg leading-relaxed text-muted-foreground">
AI agents can write code. meith gives them the rest of the loop:
files, terminal, a browser they can control, logs, diffs, and permissions in
AI agents can write code. meith gives them the rest of the loop: files,
terminal, a browser they can control, logs, Git changes, and permissions in
one desktop app.
</p>
</div>
Expand Down
7 changes: 6 additions & 1 deletion apps/web/components/sections/how-it-works.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ export function HowItWorks() {
</div>

<div className="mt-4 grid grid-cols-2 gap-2 text-center sm:grid-cols-4">
{["app state", "files and diffs", "browser control", "permissions & audit"].map((label) => (
{[
"app state",
"files and Git",
"browser control",
"permissions & audit",
].map((label) => (
<div
key={label}
className="rounded-md border border-border bg-background px-2 py-2 font-mono text-[11px] text-muted-foreground"
Expand Down
2 changes: 1 addition & 1 deletion apps/web/lib/site.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const siteConfig = {
name: "meith",
tagline: "AI workbench for web apps.",
description:
"A desktop AI workbench where agents can edit code, run commands, use the browser, read logs, and show you the diff.",
"A desktop AI workbench where agents can edit code, run commands, use the browser, read logs, and manage Git changes.",
url: "https://meith.dev",
repo: "https://github.com/meith-dev/meith",
releases: "https://github.com/meith-dev/meith/releases",
Expand Down
2 changes: 1 addition & 1 deletion docs/developer/AGENT_RUNTIME.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The runtime keeps provider-specific code out of the core app.
Adapters know how to talk to a specific backend or protocol.

The composed system prompt includes the live registry catalog plus bounded
session context: cwd, space name, active editor file, selected diff file, open
session context: cwd, space name, active editor file, selected Git file, open
browser tabs, terminal status, running dev-server URLs, recent browser console
errors, current git summary, and project instruction files discovered from the
session cwd (`AGENTS.md`, `.cursorrules`, `CLAUDE.md`, and GitHub Copilot
Expand Down
13 changes: 8 additions & 5 deletions docs/developer/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ use, discovery data lives under `~/.meith`:
- `~/.meith/instances/<pid>.json` records live runtime instances so the CLI can
list, target, or kill them.
- `<userData>/state.json` stores spaces, projects, browser tabs, workspace tabs
(including editor file focus and diff-tab selected file), file edit events,
(including editor file focus and git-tab selected file), file edit events,
plugins, and app settings.
- `<userData>/logs.jsonl` stores app logs.
- `<userData>/audit.jsonl` stores tool authorization/audit records.
Expand Down Expand Up @@ -177,16 +177,19 @@ Major surfaces:
- `TerminalView` for PTY sessions.
- `AgentView` for session list, transcript, composer, stop button, and
permission cards.
- `DiffView` for a working-tree diff tab with a folder tree, refreshed summary
counts, persisted selected-file state, and lazy patch loading for the selected
file.
- `GitPanel` for the Git tab with staged/unstaged trees, commit
controls, stage-all, guarded restore actions, AI commit-message suggestions
via the renderer completion bridge, refreshed summary counts, persisted
selected-file state, and lazy patch loading for the selected file.
- `SettingsView` for app preferences, per-project run commands, agent config,
plugin management, and about info.
- `DebugPanel` for tool runner, state, logs, and output diagnostics.
- `StatusBar` for connection, tab counts, running process count, and active port.

The renderer does not mutate services directly. It calls tools or dedicated IPC
stream channels, then re-renders from pushed app state.
stream channels, then re-renders from pushed app state. Short AI-assisted UI
features use `window.meith.ai.complete`, a one-shot completion bridge backed by
the configured agent adapter rather than a chat transcript.

High-frequency app-state and dev-server updates are scheduled with React
transitions so process logs, status updates, and large state pushes do not block
Expand Down
52 changes: 44 additions & 8 deletions docs/developer/TOOL_PROTOCOL.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,33 +238,69 @@ The current agent approval gate prompts for `writes-files`, `controls-browser`,
declared capability model and audit trail, and plugins still need approved
capabilities that cover the tools they call.

## Diff Tool Shape
## Git Tool Shape

`git_diff` is the built-in read-only working-tree diff tool. It reports staged
and unstaged changes against `HEAD` plus untracked files:
and unstaged changes against `HEAD` plus untracked files. Pass `scope:
"staged"` or `scope: "unstaged"` to fetch a section-specific diff:

```json
{
"cwd": "/work/project",
"includePatches": false
"includePatches": false,
"scope": "all"
}
```

`includePatches: false` returns file status and line-count summaries without
patch bodies. The renderer uses that cheap summary for the top-bar diff chip and
visible diff tab, refreshing while they are shown. The diff tab then requests a
patch bodies. `git_status` returns the corresponding branch, ahead/behind, and
staged/unstaged/untracked sections used by the Git panel. The renderer uses
these cheap summaries for the top-bar Git changes chip and visible Git tab,
refreshing while they are shown. The tab then requests a
selected file on demand:

```json
{
"cwd": "/work/project",
"includePatches": true,
"path": "src/app/page.tsx"
"path": "src/app/page.tsx",
"scope": "unstaged"
}
```

This keeps large repositories responsive while preserving the same structured
tool result for the CLI, renderer, plugins, and agents.
Mutating git tools are capability-gated. `git_stage`, `git_unstage`,
`git_commit`, `git_branch`, and `git_worktree` declare `writes-files`.
`git_restore` and `git_checkpoint_restore` declare `destructive` and require a
literal `confirm: true` argument.

The Git panel stages individual files and its **Stage all** control by calling
`git_stage` with repository-relative paths. Its commit-message suggestion flow
first loads the full staged diff (`includePatches: true`, `scope: "staged"`),
or the full working-tree diff when nothing is staged, then sends that patch
through the renderer `ai.complete` bridge for a one-line Conventional Commit
subject. The deterministic filename heuristic is only a fallback when no real
agent completion is available.

The top-header branch switcher uses `git_branch` with `action: "list"` to show
the current branch, `action: "switch"` to change branches, and `action:
"create"` followed by `switch` when creating a new branch.

`git_commit` reads the active Git identity profile from app settings. When a
profile is selected, Meith passes that profile as the commit author and
committer for commits created through the tool. When no profile is selected,
Git's repository/global config decides the identity.

`git_identity_detect` is read-only. It proposes commit identity profiles from
repo/effective Git config, global Git config, and installed provider CLI account
state such as `gh auth status` or `glab auth status`. It does not read credential
helper secrets, tokens, or private key material; the renderer only saves a
suggestion after the user explicitly adds it.

Checkpoints are hidden git commit objects stored under
`refs/meith/checkpoints/*` with metadata in `.git/meith/checkpoints.json`.
`AgentService` creates a `git_checkpoint_create` snapshot before each agent run
and records the agent `sessionId`; callers can later list, compare, or restore
those checkpoints without moving the current branch ref.

## Caller Identity

Expand Down
10 changes: 9 additions & 1 deletion docs/user/CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,15 @@ available with `meith --help`; common groups include:
`meith create-project <template>`: manage projects and templates.
- `meith files <cwd>`, `meith read <cwd> <path>`, `meith search <cwd> <query>`,
and `meith diagnostics <cwd> [path]`: inspect workspace files.
- `meith diff <cwd>`: summarize the git working tree.
- `meith status <cwd>`, `meith diff <cwd>`, `meith stage <cwd>`,
`meith unstage <cwd>`, `meith commit <cwd> <message>`, `meith branch <cwd>`,
`meith log <cwd>`, `meith blame <cwd> <path>`, and `meith worktree <cwd>`:
inspect and manage git state.
- `meith git-accounts <cwd>`: detect local Git commit identity suggestions from
Git config and installed provider CLIs.
- `meith checkpoint <cwd>`, `meith checkpoints <cwd>`,
`meith checkpoint-compare <cwd> <left>`, and
`meith checkpoint-restore <cwd> <id>`: manage Meith git checkpoints.
- `meith app list`: inspect running app instances.
- `meith health`: print runtime service health.
- `meith dev-servers`: list managed dev servers and their port.
Expand Down
5 changes: 3 additions & 2 deletions docs/user/INTRODUCTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ gather around a single workspace.
- Split panes to arrange your preview, editor, terminal, or agent side by side.
- Ask an agent to build features in your project's context: editing files,
running the dev server, and checking the live preview.
- Review working-tree changes in a Diff tab with top-bar summary counts and
lazy-loaded file patches.
- Review and commit working-tree changes in a Git panel with top-bar branch
switching, summary counts, staged/unstaged sections, stage-all, AI commit
message suggestions, and lazy-loaded file patches.
- Install web-app plugins and explicitly approve the APIs they can use.
- Use the `meith` terminal command to inspect and control a running app
instance.
Expand Down
6 changes: 3 additions & 3 deletions docs/user/SPACES.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Within each workspace you can have:

- browser tabs for previewing localhost or research,
- editor tabs for project files,
- diff tabs for reviewing git working-tree changes,
- git tabs for reviewing and committing working-tree changes,
- terminal tabs,
- agent chat tabs,
- run commands and environment configurations,
Expand All @@ -35,8 +35,8 @@ other. A common layout is an agent chat on the left with a live localhost previe
on the right, so you can watch changes land as the agent works.

Clicking inside a pane makes that pane active and highlights its active tab in
orange. Opening the git diff from the top bar defaults to the right pane,
creating split view from a single-pane layout; you can still drag the diff tab
orange. Opening git changes from the top bar defaults to the right pane,
creating split view from a single-pane layout; you can still drag the Git tab
elsewhere.

## Run commands & preview
Expand Down
6 changes: 3 additions & 3 deletions docs/user/TOOLS.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ they can request immediately.
| --- | --- | --- |
| App diagnostics | Inspect app state, logs, health, instances, screenshots, debug mode, and bug reports. | `app_get_state`, `app_get_logs`, `app_list_instances`, `app_health`, `app_screenshot`, `app_set_debug_mode`, `app_export_bug_report` |
| Browser control | Open, focus, navigate, inspect, automate, screenshot, and debug browser tabs. | `get_tabs`, `get_active_tab`, `open_browser_tab`, `navigate`, `go_back`, `go_forward`, `refresh`, `focus_browser_tab`, `close_browser_tab`, `browser_use_start`, `browser_use_end`, `get_browser_state`, `click_element`, `type_text`, `scroll_page`, `send_keys`, `cdp_command`, `get_console_logs`, `get_network_logs`, `take_screenshot` |
| Spaces & workspace tabs | Manage spaces plus editor, terminal, agent, preview, and diff tabs inside them. `set_workspace_tab_file` tracks editor focus/open files and the selected file in a diff tab. | `list_spaces`, `create_space`, `update_space`, `switch_space`, `close_space`, `open_workspace_tab`, `set_workspace_tab_file`, `set_workspace_tab_terminal`, `focus_workspace_tab`, `close_workspace_tab` |
| Spaces & workspace tabs | Manage spaces plus editor, terminal, agent, preview, and git tabs inside them. `set_workspace_tab_file` tracks editor focus/open files and the selected file in a git tab. | `list_spaces`, `create_space`, `update_space`, `switch_space`, `close_space`, `open_workspace_tab`, `set_workspace_tab_file`, `set_workspace_tab_terminal`, `focus_workspace_tab`, `close_workspace_tab` |
| Projects | Detect, open, generate, prewarm, allocate, configure, run, and stop projects. | `project_list`, `project_detect`, `project_open`, `project_start_dev_server`, `project_stop_dev_server`, `project_run`, `project_set_run_config`, `project_list_templates`, `project_create`, `project_create_plugin`, `project_prewarm`, `project_prewarm_status`, `project_allocate` |
| Files & diagnostics | List, read, search, edit, undo, and inspect TypeScript or JavaScript diagnostics. | `workspace_list_files`, `workspace_read_file`, `workspace_search`, `workspace_write_file`, `workspace_apply_patch`, `workspace_undo`, `get_diagnostics` |
| Git | Inspect a project's working-tree changes as refreshed summaries, per-file counts, and lazy-loaded patches. | `git_diff` |
| Git | Inspect and manage source-control state: status, branches, commits, account identity suggestions, staging, restore, log, blame, worktrees, diffs, and Meith checkpoints. | `git_diff`, `git_status`, `git_identity_detect`, `git_branch`, `git_commit`, `git_stage`, `git_unstage`, `git_restore`, `git_log`, `git_blame`, `git_worktree`, `git_checkpoint_create`, `git_checkpoint_list`, `git_checkpoint_restore`, `git_checkpoint_compare` |
| Processes & terminals | Create terminals, manage dev servers, inspect process trees, and read or stream logs. | `create_terminal`, `list_terminals`, `write_terminal`, `resize_terminal`, `kill_terminal`, `close_terminal`, `get_terminal_snapshot`, `start_dev_server`, `list_dev_servers`, `stop_dev_server`, `get_process_tree`, `get_process_logs`, `attach_process_logs` |
| Storage | Inspect durable storage collections and export persisted state for backup or debugging. | `storage_list_collections`, `storage_read_collection`, `storage_export_state` |
| Plugins | Install, grant, enable, open, list, and uninstall controlled plugin tabs. | `list_plugins`, `install_plugin`, `approve_plugin_grants`, `set_plugin_enabled`, `open_plugin_tab`, `uninstall_plugin` |
| Settings | Read and patch global app settings such as auto-run and the default package manager. | `get_app_settings`, `set_app_settings` |
| Settings | Read and patch global app settings such as auto-run, Git panel behavior, Git commit identities, checkpoints, and the default package manager. | `get_app_settings`, `set_app_settings` |

> **Plugin tools do not expand the host catalog**
>
Expand Down
26 changes: 23 additions & 3 deletions docs/user/USING_MEITH.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,31 @@ project's working-tree changes, including staged, unstaged, and brand-new files,
and presents them as per-file diffs with added and removed line counts. You can
see exactly what was rewritten before you keep it.

The git diff view opens on the right by default. From a single-pane layout,
opening the diff starts split view; from an existing split layout, it focuses or
moves the diff tab into the right pane. The tab remains draggable if you want a
The Git panel opens on the right by default. From a single-pane layout, opening
Git changes starts split view; from an existing split layout, it focuses or
moves the Git tab into the right pane. The tab remains draggable if you want a
different arrangement.

Use **Stage all** to move every visible unstaged or untracked file into the
index, or stage and unstage individual files from the selected file header. The
commit composer can ask the configured ACP agent for a Conventional Commit
subject using the full staged diff; if nothing is staged, it uses the full
working-tree diff and falls back to a local heuristic when no real agent is
configured.

The top header shows the current branch for the active workspace. Open it to
switch to another local branch or create a new branch and switch to it. The
current branch stays pinned at the top of the menu, long branch lists scroll,
and the create-branch action remains visible at the bottom.

Git settings include saved commit identities for switching between accounts.
Choose **Use Git config** to keep repository/global `user.name` and `user.email`
behavior, or select a saved profile so commits made from Meith use that name and
email as both author and committer. The settings panel can detect profile
suggestions from effective repo config, global Git config, and installed
provider CLIs such as `gh` and `glab`; it saves a suggestion only after you add
it.

> **Edits are reversible**
>
> File edits land as reviewable diffs, and a workspace-level undo lets you roll
Expand Down
Loading
Loading