jpmschweitzerandClaude 42955b6417 T-126: C clide shell client + _argv unwrap in the dispatcher
Third slice of T-99. After this `clide status` actually does
something when typed in a shell.

* native/clide-cli/clide.c — ~250 LOC C. Walks CWD up to .git,
  hashes the workspace root with FNV-1a 64-bit (byte-for-byte
  identical to the Dart side, pinned via reference vectors in
  paths_test.dart), opens the per-workspace socket, and ships argv
  across the wire as `{cmd:"_argv", args:{argv:[...]}}`.
* lib/src/cli/argv_dispatch.dart — registers the `_argv` sentinel
  command on the dispatcher. The handler runs the T-125 parser on
  the embedded argv and either re-dispatches the unwrapped request
  through the same dispatcher or returns the pre-built error
  response. Keeps the parser in Dart so the C side stays dumb.
* lib/src/ipc/paths.dart — fnv1a64Hex hoisted to a public helper +
  fixed to format as unsigned (Dart `int` is signed int64; the high
  bit lit a leading minus that broke the cross-language compare).
  Reference-vector tests added against the FNV reference.
* `make clide-cli` builds it via the host `cc`; output lands at
  native/<platform>/clide and is gitignored. Test
  test/cli/clide_cli_e2e_test.dart compiles + exercises the full
  round-trip; skips cleanly when no cc is on PATH.
* CONTRIBUTING.md gets a "C clide shell client" section.

T-128 (delete legacy IPC) unblocked.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-18 18:04:50 +02:00
2026-04-20 20:30:51 +02:00
2026-04-23 00:37:20 +02:00

clide

An IDE for Claude Code CLI. Native rendering, terminal-first interaction, pql-powered queries, canvas and graph surfaces. Linux and macOS.

Architecture

Single Flutter package at the repo root. The app hosts everything in-process: IPC server, subsystem handlers (pane, files, editor, git, pql), and the extension framework. tmux owns Claude session persistence (D-41).

  • lib/ — all Dart code. Core subsystems (lib/src/), kernel services (lib/kernel/), UI widgets (lib/widgets/), built-in extensions (lib/builtin/), the extension framework (lib/extension/).
  • PTYlib/src/pty/ spawns child processes via Dart FFI posix_openpt() + posix_spawn() directly; no external helper binary.
  • native/ — vendored native libraries (libtree-sitter.so with wasmtime embedded). Linux only today.
  • pql — external supporter tool. Clide wraps it for every query surface; never re-implements it.

Claude drives the UI through a clide CLI surface (Bash, not MCP). Every CLI subcommand has a UI affordance and every UI action has a CLI equivalent (D-6).

Built-in extensions

canvas, claude, claude_control, decisions, diff, editor, extensions_ui, files, git, graph, grammars_core, ipc_status, keybindings_ui, markdown, pql, problems, settings_ui, terminal, theme_picker, tickets, todos, welcome.

Building

Requires Flutter (stable channel) on the host. One-time setup:

make hooks && flutter pub get

Then:

make run              # launch the desktop app
make test             # fast suite: analyze + format + unit + widget + golden
make test-core        # core subsystem tests (IPC, PTY, git, pane registry)
make test-a11y        # accessibility contract tests
make test-integration # real app boot integration tests
make build-linux      # flutter build linux
make build-macos      # flutter build macos
make push-check       # pre-push gate: decisions + core + fast + a11y + coverage + changelog

Status

Pre-v2.0 (2.0.0-dev). Interaction model and panel system landed. The Python Textual v1.2.0 predecessor is archived under legacy/.

Documentation

  • docs/architecture.md — current architecture (read this first).
  • CONTRIBUTING.md — how to clone, build, test, file tickets, and write D-records.
  • docs/initial-plan.md — historical design doc; preserved as a snapshot of the 2026-04 plan, much of it now superseded.
  • governance/decisions/ — confirmed decisions (D-NNN), open questions (Q-NNN), rejected alternatives (R-NNN).
  • CLAUDE.md — Claude-addressed working notes (guardrails, repo layout).

License

MIT. See LICENSE.

S
Description
CLI Claude
Readme MIT
32 MiB
Languages
Dart 86.3%
Python 8.2%
Tree-sitter Query 1.7%
Shell 0.8%
C 0.6%
Other 2.2%