Skip to content

The VS Code of video editing, built for agents.

TypeScript

Update CLI documentation to include new `logs` command and clarify output formats

konstantin-paulusa5644b44b4c0
diff --git a/apps/cli/reference/README.md b/apps/cli/reference/README.md
index 63e06c72..5b713c28 100644
--- a/apps/cli/reference/README.md
+++ b/apps/cli/reference/README.md
@@ -6,7 +6,7 @@ Each feature command has its own file (linked below). The JSX code syntax consum
## Groups
-**Top-level:** [`open`](./open.md), [`whoami`](./whoami.md), [`context`](./context.md) (alias `ctx`), [`mount`](./mount.md), [`models`](./models.md), [`voices`](./voices.md), [`fonts`](./fonts.md), [`fetch`](./fetch.md).
+**Top-level:** [`open`](./open.md), [`whoami`](./whoami.md), [`logs`](./logs.md), [`context`](./context.md) (alias `ctx`), [`mount`](./mount.md), [`models`](./models.md), [`voices`](./voices.md), [`fonts`](./fonts.md), [`fetch`](./fetch.md).
| Group | Alias | Scope |
| ----- | ----- | ----- |
@@ -30,6 +30,7 @@ How the surface is divided:
- [`dapi open`](./open.md): launch the app, or open a file, folder, or deep link
- [`dapi whoami`](./whoami.md): print the authenticated account
+- [`dapi logs`](./logs.md): recent console output from the running app
### Document
@@ -115,7 +116,7 @@ Time inputs take the `Time` format unless noted otherwise. Times in **outputs**
## Conventions
-- **Stdout is JSON.** Commands that return a single record emit one JSON value. Commands that return a collection emit JSON Lines (one object per line, no surrounding array) so per-item results stay streamable. `node tree` and `asset tree` emit one nested object per root. Exceptions: `open` for file / URL / no-target writes nothing; `fonts --names-only` writes plain family names; `mount` and `node insert` write nothing.
+- **Stdout is JSON.** Commands that return a single record emit one JSON value. Commands that return a collection emit JSON Lines (one object per line, no surrounding array) so per-item results stay streamable. `node tree` and `asset tree` emit one nested object per root. Exceptions: `open` for file / URL / no-target writes nothing; `fonts --names-only` writes plain family names; `logs` writes plain formatted log lines; `mount` and `node insert` write nothing.
- **Batch commands are fail-fast** (`node rm`, `node patch`, `asset add`, …): one invalid input fails the whole command with a single stderr message and exit `1`. Ids are validated before anything changes, so a failed `rm`/`mv`/`cp` changes nothing; there are no per-item partial results.
- **Unix-style names are canonical:** list/read is `ls`, delete is `rm`, duplicate is `cp`, move/reparent is `mv`, search is `grep`. The longer English forms (`list`, `remove`, `duplicate`, `move`) are aliases of the Unix forms, not the other way around. `get` is a universal alias for `ls`. Commands without a natural Unix equivalent (`tree`, `rename`, `patch`, `add`, `create`, `active`, `context`, `whoami`, `open`, `focus`, `set`) keep their descriptive names.
- **Stderr:** human-readable error messages.
diff --git a/apps/cli/reference/logs.md b/apps/cli/reference/logs.md
new file mode 100644
index 00000000..5f8a39e8
--- /dev/null
+++ b/apps/cli/reference/logs.md
@@ -0,0 +1,22 @@
+# `dapi logs`
+
+Prints recent console output from the running app: everything the devtools console shows, including page logs, worker logs, uncaught errors, and Chromium warnings. Oldest first. The app buffers the last 2000 entries in its main process, so the log survives page reloads and project switches; use this instead of relaunching with `ELECTRON_ENABLE_LOGGING=1` to see renderer-side errors.
+
+## Options
+
+- `-n, --tail <n>`: output only the last `<n>` entries (positive integer)
+- `-l, --level <level>`: minimum level to include: `"debug"`, `"info"`, `"warning"`, or `"error"`
+
+## Output
+
+Plain text (no JSON), one line per entry:
+
+```
+HH:MM:SS.mmm [level] message (source:line)
+```
+
+Timestamps are local time. `source:line` is the logging call site (a URL in dev builds); omitted for synthetic entries such as renderer crashes and preload errors.
+
+## Errors
+
+Exits non-zero on an invalid `--tail` or `--level`, or if the app is not running.