detached 42775eb

docs: document the vev cmd control API

commit
42775ebe43e47b7009fe6e1d9079b82dcd8bcac6
author
brice · · 2026-07-23 22:36 UTC
committer
brice · · 2026-07-23 22:36 UTC
parent
8b4f298
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
2 files · +14 -2
M AGENTS.md +2 -2
@@ -64,9 +64,9 @@ Before touching daemon teardown paths, read the lock-ordering notes at the top o
6464 Wire payload types/codecs live in `internal/ports/frame.go` and `internal/ports/wire.go`. Connection framing lives in `internal/adapters/ipc/transport.go`.
6565
6666 - IPC frames on a connection are 4-byte big-endian length, 1 type byte, then payload.
67-- Client message types are `1–15`; server message types are `16+`.
67+- Client message types currently occupy `1–12` (`MsgCommand` is `12`); server types currently occupy `16–22` (`MsgCommandResult` is `22`). The reserved bands are `1–15` and `16+` respectively.
6868 - Version negotiation requires strict equality.
69-- `Hello.Version` must stay first so `PeekHelloVersion` works.
69+- `Hello.Version` and `CommandRequest.Version` must stay first so their version peekers work.
7070 - Bump `ProtocolVersion` for any message layout change.
7171
7272 ## Session flow
@@ -64,9 +64,9 @@ Before touching daemon teardown paths, read the lock-ordering notes at the top o
64 Wire payload types/codecs live in `internal/ports/frame.go` and `internal/ports/wire.go`. Connection framing lives in `internal/adapters/ipc/transport.go`.64 Wire payload types/codecs live in `internal/ports/frame.go` and `internal/ports/wire.go`. Connection framing lives in `internal/adapters/ipc/transport.go`.
65 65
66 - IPC frames on a connection are 4-byte big-endian length, 1 type byte, then payload.66 - IPC frames on a connection are 4-byte big-endian length, 1 type byte, then payload.
67-- Client message types are `1–15`; server message types are `16+`.67+- Client message types currently occupy `1–12` (`MsgCommand` is `12`); server types currently occupy `16–22` (`MsgCommandResult` is `22`). The reserved bands are `1–15` and `16+` respectively.
68 - Version negotiation requires strict equality.68 - Version negotiation requires strict equality.
69-- `Hello.Version` must stay first so `PeekHelloVersion` works.69+- `Hello.Version` and `CommandRequest.Version` must stay first so their version peekers work.
70 - Bump `ProtocolVersion` for any message layout change.70 - Bump `ProtocolVersion` for any message layout change.
71 71
72 ## Session flow72 ## Session flow
M README.md +12 -0
@@ -40,6 +40,18 @@ vev kill <name> kill a session (--all kills everything)
4040
4141 The daemon starts on first use and exits with the last session. Ephemeral sessions are numbered, survive detach, and disappear with the daemon. Named sessions persist across daemon restarts and come back with their layout, scrollback, and allowlisted processes.
4242
43+## Scripting
44+
45+`vev cmd` runs control commands against a running daemon; it never starts one. For example:
46+
47+```sh
48+vev cmd split-right
49+vev cmd toast -l warn "build failed"
50+vev cmd list-panes --json
51+```
52+
53+Target a session explicitly with `-s` (`vev cmd -s work new-tab`). Otherwise vev uses `$VEV` inside a pane, then the only live session; ambiguous targets fail. Run `vev cmd --help` for the scriptable command list and `vev cmd <command> --help` for command usage.
54+
4355 ## Keys
4456
4557 No prefix key; everything is Alt.
@@ -40,6 +40,18 @@ vev kill <name> kill a session (--all kills everything)
40 40
41 The daemon starts on first use and exits with the last session. Ephemeral sessions are numbered, survive detach, and disappear with the daemon. Named sessions persist across daemon restarts and come back with their layout, scrollback, and allowlisted processes.41 The daemon starts on first use and exits with the last session. Ephemeral sessions are numbered, survive detach, and disappear with the daemon. Named sessions persist across daemon restarts and come back with their layout, scrollback, and allowlisted processes.
42 42
43+## Scripting
44+
45+`vev cmd` runs control commands against a running daemon; it never starts one. For example:
46+
47+```sh
48+vev cmd split-right
49+vev cmd toast -l warn "build failed"
50+vev cmd list-panes --json
51+```
52+
53+Target a session explicitly with `-s` (`vev cmd -s work new-tab`). Otherwise vev uses `$VEV` inside a pane, then the only live session; ambiguous targets fail. Run `vev cmd --help` for the scriptable command list and `vev cmd <command> --help` for command usage.
54+
43 ## Keys55 ## Keys
44 56
45 No prefix key; everything is Alt.57 No prefix key; everything is Alt.

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 12

Tags 11

↑↓ moveenter openesc close