Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Scope docs heading anchors under each subcommand section (#4079)
Maximilian Roos10315349f4da
diff --git a/docs/CLAUDE.md b/docs/CLAUDE.mdindex 618c179bd..f1ab17aec 100644--- a/docs/CLAUDE.md+++ b/docs/CLAUDE.md@@ -95,8 +95,9 @@ Use root-relative links in canonical Markdown:The sync pipeline expands them to full `https://worktrunk.dev/...` URLs forREADME and agent-skill copies. Do not add framework-specific link syntax.-`stable-heading-ids.mjs` preserves the site's established anchor scheme, and-`test:site` verifies every built internal page link and fragment.+`stable-heading-ids.mjs` defines the heading-anchor scheme, including the ids+scoped under each subcommand section, and `test:site` verifies every built+internal page link and fragment.Images and demos use root-relative paths into `public/`:diff --git a/docs/src/content/docs/config.md b/docs/src/content/docs/config.mdindex d9cfc8a00..f5bde00c8 100644--- a/docs/src/content/docs/config.md+++ b/docs/src/content/docs/config.md@@ -851,7 +851,7 @@ Manage command approvals.Project hooks and project aliases prompt for approval on first run to prevent untrusted projects from running arbitrary commands. Approvals from both flows are stored together.-### Approval examples+### ExamplesList commands and their approval status for current project:```console@@ -936,7 +936,7 @@ Inspect and preview aliases.Aliases are command templates configured in user (`~/.config/worktrunk/config.toml`) or project (`.config/wt.toml`) config and run as `wt <name>`. See the [Extending Worktrunk guide](/extending/#aliases) for the configuration format.-### Alias examples+### ExamplesShow every configured alias's template:```console@@ -984,7 +984,7 @@ State is stored in `.git/` (config entries and log files), separate from configu- **vars**: [Custom variables per branch](/config/#wt-config-state-vars)- **logs**: [Operation and debug logs](/config/#wt-config-state-logs)-### State examples+### ExamplesGet the default branch:```console@@ -1060,7 +1060,7 @@ View or drop worktrunk's regenerable caches in one place. Everything here is rebWithout a subcommand, runs `get`.-### Cache examples+### ExamplesShow cache contents:```console@@ -1201,7 +1201,7 @@ All logs are stored in `.git/wt/logs/` (in the main worktree's git directory). A`wt config state logs --format=json` emits three arrays — `command_log`, `hook_output`, `diagnostic`. Each entry carries a `file` (relative), `path` (absolute), `size`, and `modified_at` (unix seconds). Hook-output entries additionally expose `branch`, `source` (`user` / `project` / `internal`), `hook_type` (the `post-*` kind, or `null` for internal ops), and `name`. Filter with `jq` to pick out a specific entry.-### Log examples+### ExamplesList all log files:```console@@ -1343,7 +1343,7 @@ Custom variables per branch.Store custom variables per branch. Values are stored as-is — plain strings or JSON.-### Variable examples+### ExamplesSet and get values:```consolediff --git a/docs/src/content/docs/faq.md b/docs/src/content/docs/faq.mdindex e9e765d74..fd9039f49 100644--- a/docs/src/content/docs/faq.md+++ b/docs/src/content/docs/faq.md@@ -59,7 +59,7 @@ Git TUIs operate on a single repository. Worktrunk manages multiple worktrees, rWorktrees share one `.git`. Each adds a checkout of the tracked files, plus whatever gitignored build output you copy in.-On APFS, btrfs, and XFS (not ext4 or NTFS), [`wt step copy-ignored`](/step/#copy-on-write) reflinks that output, so a new worktree shares the primary worktree's disk blocks. A later build rewrites only what changed, and the rest stays shared. On one machine, 56 worktrees of a Rust repository with a 40GB `target/` came to 2.6TB by `du` and 0.7TB on disk.+On APFS, btrfs, and XFS (not ext4 or NTFS), [`wt step copy-ignored`](/step/#wt-step-copy-ignored--copy-on-write) reflinks that output, so a new worktree shares the primary worktree's disk blocks. A later build rewrites only what changed, and the rest stays shared. On one machine, 56 worktrees of a Rust repository with a 40GB `target/` came to 2.6TB by `du` and 0.7TB on disk.## Does Worktrunk support stacked branches?diff --git a/docs/src/plugins/pagefind-command-references.mjs b/docs/src/plugins/pagefind-command-references.mjsindex eccdc8f78..27b58603b 100644--- a/docs/src/plugins/pagefind-command-references.mjs+++ b/docs/src/plugins/pagefind-command-references.mjs@@ -1,13 +1,6 @@-const fragmentTitleClass = 'wt-pagefind-fragment-title';--function nodeText(node) {- if (node.type === 'text') return node.value;- return node.children?.map(nodeText).join('') ?? '';-}+import { isCommandHeading, nodeText } from './stable-heading-ids.mjs';-function isCommandHeading(text) {- return /^wt\s+\S/u.test(text.trim());-}+const fragmentTitleClass = 'wt-pagefind-fragment-title';function escapeHtml(text) {return text.replaceAll('&', '&').replaceAll('<', '<').replaceAll('>', '>');diff --git a/docs/src/plugins/stable-heading-ids.mjs b/docs/src/plugins/stable-heading-ids.mjsindex 3560fcd2a..22762d653 100644--- a/docs/src/plugins/stable-heading-ids.mjs+++ b/docs/src/plugins/stable-heading-ids.mjs@@ -1,8 +1,13 @@-function nodeText(node) {+export function nodeText(node) {if (node.type === 'text') return node.value;return node.children?.map(nodeText).join('') ?? '';}+/** Whether a heading opens a generated subcommand section, such as "wt step commit". */+export function isCommandHeading(text) {+ return /^wt\s+\S/u.test(text.trim());+}+/** Preserve the heading-anchor scheme used by Worktrunk's original site. */export function slugHeading(text) {return text@@ -12,17 +17,36 @@ export function slugHeading(text) {.replace(/^-|-$/g, '');}+/**+ * Gives every heading a public anchor id: its slug.+ *+ * Command pages append each subcommand's help under an H2 such as "wt step push",+ * so headings like "Examples" and "Command reference" repeat down the page. Below+ * a subcommand's H2, until the next H1 or H2, ids are scoped by that section:+ * "Examples" under "wt step push" is `wt-step-push--examples`. The id then depends+ * only on the heading and its subcommand, not on how many same-named headings+ * precede it, and the help text keeps its unqualified headings for the terminal.+ * A slug never contains `--`, so a scoped id cannot equal another heading's slug:+ * "Cache" under "wt config state" and the "wt config state cache" section differ.+ *+ * A heading that still repeats within one scope takes `-1`, `-2`, … in page order.+ */export function rehypeStableHeadingIds() {return (tree) => {const slugs = new Map();+ let scope;function visit(node) {if (node.type === 'element' && /^h[1-6]$/.test(node.tagName)) {- const base = slugHeading(nodeText(node));+ const text = nodeText(node);+ const level = Number(node.tagName[1]);+ if (level <= 2) scope = undefined;+ const base = scope ? `${scope}--${slugHeading(text)}` : slugHeading(text);const occurrence = slugs.get(base) ?? 0;slugs.set(base, occurrence + 1);node.properties ??= {};node.properties.id = occurrence === 0 ? base : `${base}-${occurrence}`;+ if (level === 2 && isCommandHeading(text)) scope = node.properties.id;}node.children?.forEach(visit);}diff --git a/docs/tests/built-site.test.mjs b/docs/tests/built-site.test.mjsindex aec684c98..c89d74ec6 100644--- a/docs/tests/built-site.test.mjs+++ b/docs/tests/built-site.test.mjs@@ -239,7 +239,7 @@ test('build preserves the public route contract', async () => {);}assert.doesNotMatch(configToc, /href="#claude-code"/);- assert.doesNotMatch(configToc, /href="#command-reference-1"/);+ assert.doesNotMatch(configToc, /href="#wt-config-[^"]*--command-reference"/);const structuralSections = new Map([['/hook/', ['hook-types', 'security', 'configuration', 'running-hooks-manually', 'recipes']],@@ -276,9 +276,12 @@ test('nested command references expose unique search-only fragment titles', asynassert.match(stepPage, /<h2 id="command-reference">Command reference<\/h2>/);const references = [...stepPage.matchAll(- /<h3 id="command-reference-\d+"><span class="wt-pagefind-fragment-title" hidden aria-hidden="true">(wt step [^<]+) — <\/span>Command reference<\/h3>/g,- )].map((match) => match[1]);- assert.deepEqual(references, [+ /<h3 id="([^"]+)"><span class="wt-pagefind-fragment-title" hidden aria-hidden="true">(wt step [^<]+) — <\/span>Command reference<\/h3>/g,+ )];+ for (const [, id, command] of references) {+ assert.equal(id, `${command.replaceAll(' ', '-')}--command-reference`);+ }+ assert.deepEqual(references.map((match) => match[2]), ['wt step commit','wt step squash','wt step rebase',@@ -296,7 +299,7 @@ test('nested command references expose unique search-only fragment titles', asynconst listPage = await readFile(routeFile('/list/'), 'utf8');assert.match(listPage,- /<h3 id="command-reference-1"><span class="wt-pagefind-fragment-title" hidden aria-hidden="true">wt list statusline — <\/span>Command reference<\/h3>/,+ /<h3 id="wt-list-statusline--command-reference"><span class="wt-pagefind-fragment-title" hidden aria-hidden="true">wt list statusline — <\/span>Command reference<\/h3>/,);});diff --git a/docs/tests/plugins.test.mjs b/docs/tests/plugins.test.mjsindex 7ac68053e..158867f6e 100644--- a/docs/tests/plugins.test.mjs+++ b/docs/tests/plugins.test.mjs@@ -89,6 +89,34 @@ test('duplicate heading slugs are unique', () => {assert.deepEqual(headings.map((heading) => heading.properties.id), ['demo', 'demo-1']);});+test('subcommand sections scope the ids of their headings', () => {+ const headings = [+ heading('h2', 'Examples'),+ heading('h1', 'Subcommands'),+ heading('h2', 'wt config state'),+ heading('h3', 'Examples'),+ heading('h3', 'Cache'),+ heading('h4', 'Examples'),+ heading('h2', 'wt config state cache'),+ heading('h3', 'Examples'),+ heading('h1', 'Other'),+ heading('h2', 'Examples'),+ ];+ rehypeStableHeadingIds()({ type: 'root', children: headings });+ assert.deepEqual(headings.map((heading) => heading.properties.id), [+ 'examples',+ 'subcommands',+ 'wt-config-state',+ 'wt-config-state--examples',+ 'wt-config-state--cache',+ 'wt-config-state--examples-1',+ 'wt-config-state-cache',+ 'wt-config-state-cache--examples',+ 'other',+ 'examples-1',+ ]);+});+function heading(tagName, value) {return {type: 'element',diff --git a/plugins/worktrunk/skills/worktrunk/reference/config.md b/plugins/worktrunk/skills/worktrunk/reference/config.mdindex 4ea1746bf..a4b31cc6f 100644--- a/plugins/worktrunk/skills/worktrunk/reference/config.md+++ b/plugins/worktrunk/skills/worktrunk/reference/config.md@@ -843,7 +843,7 @@ Manage command approvals.Project hooks and project aliases prompt for approval on first run to prevent untrusted projects from running arbitrary commands. Approvals from both flows are stored together.-### Approval examples+### ExamplesList commands and their approval status for current project:```console@@ -928,7 +928,7 @@ Inspect and preview aliases.Aliases are command templates configured in user (`~/.config/worktrunk/config.toml`) or project (`.config/wt.toml`) config and run as `wt <name>`. See the [Extending Worktrunk guide](https://worktrunk.dev/extending/#aliases) for the configuration format.-### Alias examples+### ExamplesShow every configured alias's template:```console@@ -976,7 +976,7 @@ State is stored in `.git/` (config entries and log files), separate from configu- **vars**: [Custom variables per branch](https://worktrunk.dev/config/#wt-config-state-vars)- **logs**: [Operation and debug logs](https://worktrunk.dev/config/#wt-config-state-logs)-### State examples+### ExamplesGet the default branch:```console@@ -1052,7 +1052,7 @@ View or drop worktrunk's regenerable caches in one place. Everything here is rebWithout a subcommand, runs `get`.-### Cache examples+### ExamplesShow cache contents:```console@@ -1193,7 +1193,7 @@ All logs are stored in `.git/wt/logs/` (in the main worktree's git directory). A`wt config state logs --format=json` emits three arrays — `command_log`, `hook_output`, `diagnostic`. Each entry carries a `file` (relative), `path` (absolute), `size`, and `modified_at` (unix seconds). Hook-output entries additionally expose `branch`, `source` (`user` / `project` / `internal`), `hook_type` (the `post-*` kind, or `null` for internal ops), and `name`. Filter with `jq` to pick out a specific entry.-### Log examples+### ExamplesList all log files:```console@@ -1335,7 +1335,7 @@ Custom variables per branch.Store custom variables per branch. Values are stored as-is — plain strings or JSON.-### Variable examples+### ExamplesSet and get values:```consolediff --git a/plugins/worktrunk/skills/worktrunk/reference/faq.md b/plugins/worktrunk/skills/worktrunk/reference/faq.mdindex 38d7dbfd5..011546c03 100644--- a/plugins/worktrunk/skills/worktrunk/reference/faq.md+++ b/plugins/worktrunk/skills/worktrunk/reference/faq.md@@ -55,7 +55,7 @@ Git TUIs operate on a single repository. Worktrunk manages multiple worktrees, rWorktrees share one `.git`. Each adds a checkout of the tracked files, plus whatever gitignored build output you copy in.-On APFS, btrfs, and XFS (not ext4 or NTFS), [`wt step copy-ignored`](https://worktrunk.dev/step/#copy-on-write) reflinks that output, so a new worktree shares the primary worktree's disk blocks. A later build rewrites only what changed, and the rest stays shared. On one machine, 56 worktrees of a Rust repository with a 40GB `target/` came to 2.6TB by `du` and 0.7TB on disk.+On APFS, btrfs, and XFS (not ext4 or NTFS), [`wt step copy-ignored`](https://worktrunk.dev/step/#wt-step-copy-ignored--copy-on-write) reflinks that output, so a new worktree shares the primary worktree's disk blocks. A later build rewrites only what changed, and the rest stays shared. On one machine, 56 worktrees of a Rust repository with a 40GB `target/` came to 2.6TB by `du` and 0.7TB on disk.## Does Worktrunk support stacked branches?diff --git a/skills/worktrunk/reference/config.md b/skills/worktrunk/reference/config.mdindex 4ea1746bf..a4b31cc6f 100644--- a/skills/worktrunk/reference/config.md+++ b/skills/worktrunk/reference/config.md@@ -843,7 +843,7 @@ Manage command approvals.Project hooks and project aliases prompt for approval on first run to prevent untrusted projects from running arbitrary commands. Approvals from both flows are stored together.-### Approval examples+### ExamplesList commands and their approval status for current project:```console@@ -928,7 +928,7 @@ Inspect and preview aliases.Aliases are command templates configured in user (`~/.config/worktrunk/config.toml`) or project (`.config/wt.toml`) config and run as `wt <name>`. See the [Extending Worktrunk guide](https://worktrunk.dev/extending/#aliases) for the configuration format.-### Alias examples+### ExamplesShow every configured alias's template:```console@@ -976,7 +976,7 @@ State is stored in `.git/` (config entries and log files), separate from configu- **vars**: [Custom variables per branch](https://worktrunk.dev/config/#wt-config-state-vars)- **logs**: [Operation and debug logs](https://worktrunk.dev/config/#wt-config-state-logs)-### State examples+### ExamplesGet the default branch:```console@@ -1052,7 +1052,7 @@ View or drop worktrunk's regenerable caches in one place. Everything here is rebWithout a subcommand, runs `get`.-### Cache examples+### ExamplesShow cache contents:```console@@ -1193,7 +1193,7 @@ All logs are stored in `.git/wt/logs/` (in the main worktree's git directory). A`wt config state logs --format=json` emits three arrays — `command_log`, `hook_output`, `diagnostic`. Each entry carries a `file` (relative), `path` (absolute), `size`, and `modified_at` (unix seconds). Hook-output entries additionally expose `branch`, `source` (`user` / `project` / `internal`), `hook_type` (the `post-*` kind, or `null` for internal ops), and `name`. Filter with `jq` to pick out a specific entry.-### Log examples+### ExamplesList all log files:```console@@ -1335,7 +1335,7 @@ Custom variables per branch.Store custom variables per branch. Values are stored as-is — plain strings or JSON.-### Variable examples+### ExamplesSet and get values:```consolediff --git a/skills/worktrunk/reference/faq.md b/skills/worktrunk/reference/faq.mdindex 38d7dbfd5..011546c03 100644--- a/skills/worktrunk/reference/faq.md+++ b/skills/worktrunk/reference/faq.md@@ -55,7 +55,7 @@ Git TUIs operate on a single repository. Worktrunk manages multiple worktrees, rWorktrees share one `.git`. Each adds a checkout of the tracked files, plus whatever gitignored build output you copy in.-On APFS, btrfs, and XFS (not ext4 or NTFS), [`wt step copy-ignored`](https://worktrunk.dev/step/#copy-on-write) reflinks that output, so a new worktree shares the primary worktree's disk blocks. A later build rewrites only what changed, and the rest stays shared. On one machine, 56 worktrees of a Rust repository with a 40GB `target/` came to 2.6TB by `du` and 0.7TB on disk.+On APFS, btrfs, and XFS (not ext4 or NTFS), [`wt step copy-ignored`](https://worktrunk.dev/step/#wt-step-copy-ignored--copy-on-write) reflinks that output, so a new worktree shares the primary worktree's disk blocks. A later build rewrites only what changed, and the rest stays shared. On one machine, 56 worktrees of a Rust repository with a 40GB `target/` came to 2.6TB by `du` and 0.7TB on disk.## Does Worktrunk support stacked branches?diff --git a/src/cli/config.rs b/src/cli/config.rsindex 3021ecc9c..6af4f9d08 100644--- a/src/cli/config.rs+++ b/src/cli/config.rs@@ -277,7 +277,7 @@ pub enum ApprovalsCommand {#[command(after_long_help = r#"Shows every command the project config declares — hooks, aliases, and commit-message guidance — grouped into APPROVED and UNAPPROVED sections. Approvals recorded for commands no longer in the project config (edited or removed since approval) are listed separately.-Reading is all it does: no prompt, no write. `--format=json` emits the same four distinctions as a structured payload — see [Reading approval state](/config/#reading-approval-state).+Reading is all it does: no prompt, no write. `--format=json` emits the same four distinctions as a structured payload — see [Reading approval state](/config/#wt-config-approvals--reading-approval-state).## Examples@@ -303,7 +303,7 @@ $ wt config approvals list --format=json | jq -r .stateBy default, shows only unapproved commands. Use `--all` to review all commandsincluding previously approved ones.-`--yes` writes the approvals without prompting, which is how a container or CI job pre-approves a project it has just cloned. It trusts every command the project config declares, including one whose template changed since an earlier approval. A caller that wants to look before granting them can list those first — see [Reading approval state](/config/#reading-approval-state).+`--yes` writes the approvals without prompting, which is how a container or CI job pre-approves a project it has just cloned. It trusts every command the project config declares, including one whose template changed since an earlier approval. A caller that wants to look before granting them can list those first — see [Reading approval state](/config/#wt-config-approvals--reading-approval-state).## Examples@@ -638,7 +638,7 @@ $ wt config update --output=-#[command(after_long_help = r#"Project hooks and project aliases prompt for approval on first run to prevent untrusted projects from running arbitrary commands. Approvals from both flows are stored together.-## Approval examples+## ExamplesList commands and their approval status for current project:```console@@ -709,7 +709,7 @@ Approved commands are saved to `~/.config/worktrunk/approvals.toml`. Re-approval#[command(after_long_help = r#"Aliases are command templates configured in user (`~/.config/worktrunk/config.toml`) or project (`.config/wt.toml`) config and run as `wt <name>`. See the [Extending Worktrunk guide](/extending/#aliases) for the configuration format.-## Alias examples+## ExamplesShow every configured alias's template:```console@@ -769,7 +769,7 @@ $ wt config plugins pi install- **vars**: [Custom variables per branch](/config/#wt-config-state-vars)- **logs**: [Operation and debug logs](/config/#wt-config-state-logs)-## State examples+## ExamplesGet the default branch:```console@@ -889,7 +889,7 @@ untouched."#)]Without a subcommand, runs `get`.-## Cache examples+## ExamplesShow cache contents:```console@@ -1022,7 +1022,7 @@ All logs are stored in `.git/wt/logs/` (in the main worktree's git directory). A`wt config state logs --format=json` emits three arrays — `command_log`, `hook_output`, `diagnostic`. Each entry carries a `file` (relative), `path` (absolute), `size`, and `modified_at` (unix seconds). Hook-output entries additionally expose `branch`, `source` (`user` / `project` / `internal`), `hook_type` (the `post-*` kind, or `null` for internal ops), and `name`. Filter with `jq` to pick out a specific entry.-## Log examples+## ExamplesList all log files:```console@@ -1148,7 +1148,7 @@ Without a subcommand, runs `get` for the current branch. For `--branch`, use `gename = "vars",after_long_help = r#"Store custom variables per branch. Values are stored as-is — plain strings or JSON.-## Variable examples+## ExamplesSet and get values:```consolediff --git a/tests/snapshots/integration__integration_tests__help__help_config_approvals.snap b/tests/snapshots/integration__integration_tests__help__help_config_approvals.snapindex 01adbcfda..aa57b17fd 100644--- a/tests/snapshots/integration__integration_tests__help__help_config_approvals.snap+++ b/tests/snapshots/integration__integration_tests__help__help_config_approvals.snap@@ -74,7 +74,7 @@ Usage: [1m[36mwt config approvals[0m [36m[OPTIONS][0m [36m<COMMAND>[0mProject hooks and project aliases prompt for approval on first run to prevent untrusted projects from running arbitrary commands. Approvals from both flows are stored together.-[1m[32mApproval examples[0m+[1m[32mExamples[0mList commands and their approval status for current project:[107m [0m [2m[0m[2m[34mwt[0m[2m config approvals list[0mdiff --git a/tests/snapshots/integration__integration_tests__help__help_config_state.snap b/tests/snapshots/integration__integration_tests__help__help_config_state.snapindex 47c5dddeb..481553df7 100644--- a/tests/snapshots/integration__integration_tests__help__help_config_state.snap+++ b/tests/snapshots/integration__integration_tests__help__help_config_state.snap@@ -86,7 +86,7 @@ State is stored in [2m.git/[0m (config entries and log files), separate from c- [1mvars[0m: Custom variables per branch- [1mlogs[0m: Operation and debug logs-[1m[32mState examples[0m+[1m[32mExamples[0mGet the default branch:[107m [0m [2m[0m[2m[34mwt[0m[2m config state default-branch[0mdiff --git a/tests/snapshots/integration__integration_tests__help__help_config_state_cache.snap b/tests/snapshots/integration__integration_tests__help__help_config_state_cache.snapindex 11b711e33..2b416189c 100644--- a/tests/snapshots/integration__integration_tests__help__help_config_state_cache.snap+++ b/tests/snapshots/integration__integration_tests__help__help_config_state_cache.snap@@ -90,7 +90,7 @@ View or drop worktrunk's regenerable caches in one place. Everything here is rebWithout a subcommand, runs [2mget[0m.-[1m[32mCache examples[0m+[1m[32mExamples[0mShow cache contents:[107m [0m [2m[0m[2m[34mwt[0m[2m config state cache[0mdiff --git a/tests/snapshots/integration__integration_tests__help__help_config_state_logs.snap b/tests/snapshots/integration__integration_tests__help__help_config_state_logs.snapindex ba41bc828..4ba55b992 100644--- a/tests/snapshots/integration__integration_tests__help__help_config_state_logs.snap+++ b/tests/snapshots/integration__integration_tests__help__help_config_state_logs.snap@@ -129,7 +129,7 @@ All logs are stored in [2m.git/wt/logs/[0m (in the main worktree's git directo[2mwt config state logs --format=json[0m emits three arrays — [2mcommand_log[0m, [2mhook_output[0m, [2mdiagnostic[0m. Each entry carries a [2mfile[0m (relative), [2mpath[0m (absolute), [2msize[0m, and [2mmodified_at[0m (unix seconds). Hook-output entries additionally expose [2mbranch[0m, [2msource[0m ([2muser[0m / [2mproject[0m / [2minternal[0m), [2mhook_type[0m (the [2mpost-*[0m kind, or [2mnull[0m for internal ops), and [2mname[0m. Filter with [2mjq[0m to pick out a specific entry.-[1m[32mLog examples[0m+[1m[32mExamples[0mList all log files:[107m [0m [2m[0m[2m[34mwt[0m[2m config state logs[0m