@tekmidian/pai 0.11.0 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/README.md +84 -10
  2. package/dist/{auto-route-D54Kv7yI.mjs → auto-route-CLYcToZ5.mjs} +4 -4
  3. package/dist/{auto-route-D54Kv7yI.mjs.map → auto-route-CLYcToZ5.mjs.map} +1 -1
  4. package/dist/cli/index.mjs +20 -10275
  5. package/dist/cli/index.mjs.map +1 -1
  6. package/dist/cli/program.d.mts +11 -0
  7. package/dist/cli/program.d.mts.map +1 -0
  8. package/dist/cli/program.mjs +249 -0
  9. package/dist/cli/program.mjs.map +1 -0
  10. package/dist/{clusters-BwmdKB-V.mjs → clusters-BYPw7vfW.mjs} +2 -2
  11. package/dist/{clusters-BwmdKB-V.mjs.map → clusters-BYPw7vfW.mjs.map} +1 -1
  12. package/dist/{config-DqBY3aT0.mjs → config-BuhHWyOK.mjs} +1 -1
  13. package/dist/{config-DqBY3aT0.mjs.map → config-BuhHWyOK.mjs.map} +1 -1
  14. package/dist/daemon/index.mjs +16 -18
  15. package/dist/daemon/index.mjs.map +1 -1
  16. package/dist/{daemon-CSKj8Xm9.mjs → daemon-BldK8-57.mjs} +197 -43
  17. package/dist/daemon-BldK8-57.mjs.map +1 -0
  18. package/dist/daemon-mcp/index.mjs +2 -2
  19. package/dist/{db-CYmBWcjh.mjs → db-CmYbAVCD.mjs} +1 -1
  20. package/dist/{db-CYmBWcjh.mjs.map → db-CmYbAVCD.mjs.map} +1 -1
  21. package/dist/{detect-CdaA48EI.mjs → detect-KjycLtXM.mjs} +1 -1
  22. package/dist/{detect-CdaA48EI.mjs.map → detect-KjycLtXM.mjs.map} +1 -1
  23. package/dist/{detector-Q_lVXtj-.mjs → detector-ZiOhHszd.mjs} +2 -2
  24. package/dist/{detector-Q_lVXtj-.mjs.map → detector-ZiOhHszd.mjs.map} +1 -1
  25. package/dist/{embeddings-DGRAPAYb.mjs → embeddings-BJPOcbik.mjs} +1 -1
  26. package/dist/{embeddings-DGRAPAYb.mjs.map → embeddings-BJPOcbik.mjs.map} +1 -1
  27. package/dist/factory-Q88X1bAN.mjs +69 -0
  28. package/dist/factory-Q88X1bAN.mjs.map +1 -0
  29. package/dist/{helpers-crDEr6S2.mjs → helpers-IjZkXBhj.mjs} +1 -1
  30. package/dist/{helpers-crDEr6S2.mjs.map → helpers-IjZkXBhj.mjs.map} +1 -1
  31. package/dist/hooks/observe.mjs +21 -0
  32. package/dist/hooks/observe.mjs.map +2 -2
  33. package/dist/index.mjs +9 -10
  34. package/dist/{indexer-backend-DcYThufd.mjs → indexer-backend-Cm5RS7y0.mjs} +3 -3
  35. package/dist/{indexer-backend-DcYThufd.mjs.map → indexer-backend-Cm5RS7y0.mjs.map} +1 -1
  36. package/dist/{ipc-client-C3pjwy2m.mjs → ipc-client-CoyUHPod.mjs} +1 -1
  37. package/dist/{ipc-client-C3pjwy2m.mjs.map → ipc-client-CoyUHPod.mjs.map} +1 -1
  38. package/dist/{kg-entity-DVzTsy6G.mjs → kg-entity-LXblD7LZ.mjs} +1 -1
  39. package/dist/{kg-entity-DVzTsy6G.mjs.map → kg-entity-LXblD7LZ.mjs.map} +1 -1
  40. package/dist/{kg-extraction-iR1BKKWK.mjs → kg-extraction-C8DEUHTS.mjs} +17 -6
  41. package/dist/kg-extraction-C8DEUHTS.mjs.map +1 -0
  42. package/dist/{latent-ideas-dWVuI_dg.mjs → latent-ideas-RyC6eyqI.mjs} +4 -4
  43. package/dist/{latent-ideas-dWVuI_dg.mjs.map → latent-ideas-RyC6eyqI.mjs.map} +1 -1
  44. package/dist/main-resolver-uFxNiDy7.mjs +1339 -0
  45. package/dist/main-resolver-uFxNiDy7.mjs.map +1 -0
  46. package/dist/{migrate-fLD6rAdO.mjs → migrate-B02wDDgS.mjs} +2 -2
  47. package/dist/{migrate-fLD6rAdO.mjs.map → migrate-B02wDDgS.mjs.map} +1 -1
  48. package/dist/{neighborhood-DixmpfPT.mjs → neighborhood-CklGIB8r.mjs} +2 -2
  49. package/dist/{neighborhood-DixmpfPT.mjs.map → neighborhood-CklGIB8r.mjs.map} +1 -1
  50. package/dist/{note-context-BY7rfGdl.mjs → note-context-qvZlVXVO.mjs} +1 -1
  51. package/dist/{note-context-BY7rfGdl.mjs.map → note-context-qvZlVXVO.mjs.map} +1 -1
  52. package/dist/{pai-marker-CXQPX2P6.mjs → pai-marker-HVBwwBW-.mjs} +1 -1
  53. package/dist/{pai-marker-CXQPX2P6.mjs.map → pai-marker-HVBwwBW-.mjs.map} +1 -1
  54. package/dist/pick-7Kg9DX7S.mjs +8250 -0
  55. package/dist/pick-7Kg9DX7S.mjs.map +1 -0
  56. package/dist/{postgres-Cp25xZes.mjs → postgres-B451Hnkm.mjs} +2 -2
  57. package/dist/{postgres-Cp25xZes.mjs.map → postgres-B451Hnkm.mjs.map} +1 -1
  58. package/dist/{query-feedback-C0hKUHVz.mjs → query-feedback-fapbqRgh.mjs} +1 -1
  59. package/dist/{query-feedback-C0hKUHVz.mjs.map → query-feedback-fapbqRgh.mjs.map} +1 -1
  60. package/dist/{reranker-CMNZcfVx.mjs → reranker-C08R99zn.mjs} +1 -1
  61. package/dist/{reranker-CMNZcfVx.mjs.map → reranker-C08R99zn.mjs.map} +1 -1
  62. package/dist/{search-i2nlQ-JM.mjs → search-HcdKtMla.mjs} +3 -3
  63. package/dist/{search-i2nlQ-JM.mjs.map → search-HcdKtMla.mjs.map} +1 -1
  64. package/dist/{sqlite-B3JHfJc2.mjs → sqlite-DQpY1Esi.mjs} +3 -3
  65. package/dist/{sqlite-B3JHfJc2.mjs.map → sqlite-DQpY1Esi.mjs.map} +1 -1
  66. package/dist/{state-BHZAhLou.mjs → state-BIlxNRUn.mjs} +1 -1
  67. package/dist/{state-BHZAhLou.mjs.map → state-BIlxNRUn.mjs.map} +1 -1
  68. package/dist/{stop-words-BaMEGVeY.mjs → stop-words-BwplsQ3z.mjs} +1 -1
  69. package/dist/{stop-words-BaMEGVeY.mjs.map → stop-words-BwplsQ3z.mjs.map} +1 -1
  70. package/dist/{sync-CmBKOL3K.mjs → sync-uPR4g438.mjs} +205 -6
  71. package/dist/sync-uPR4g438.mjs.map +1 -0
  72. package/dist/{themes-DO8mUVwD.mjs → themes-Cg8oG9Ra.mjs} +3 -3
  73. package/dist/{themes-DO8mUVwD.mjs.map → themes-Cg8oG9Ra.mjs.map} +1 -1
  74. package/dist/{tools-C1JNgya7.mjs → tools-Op3C2Nm6.mjs} +26 -26
  75. package/dist/{tools-C1JNgya7.mjs.map → tools-Op3C2Nm6.mjs.map} +1 -1
  76. package/dist/{trace-TYCLMCkY.mjs → trace-CLK-NPkb.mjs} +1 -1
  77. package/dist/{trace-TYCLMCkY.mjs.map → trace-CLK-NPkb.mjs.map} +1 -1
  78. package/dist/{utils-BAxjW3j8.mjs → utils-CqqgB0dH.mjs} +1 -1
  79. package/dist/{utils-BAxjW3j8.mjs.map → utils-CqqgB0dH.mjs.map} +1 -1
  80. package/dist/{vault-indexer-vNnL3Azb.mjs → vault-indexer-Dn_BccVK.mjs} +2 -2
  81. package/dist/{vault-indexer-vNnL3Azb.mjs.map → vault-indexer-Dn_BccVK.mjs.map} +1 -1
  82. package/dist/{work-queue-worker-BxsBtz6j.mjs → work-queue-worker-DHOIVVQ7.mjs} +5 -5
  83. package/dist/{work-queue-worker-BxsBtz6j.mjs.map → work-queue-worker-DHOIVVQ7.mjs.map} +1 -1
  84. package/dist/{zettelkasten-B-94vghH.mjs → zettelkasten-NwBD1NsT.mjs} +4 -4
  85. package/dist/{zettelkasten-B-94vghH.mjs.map → zettelkasten-NwBD1NsT.mjs.map} +1 -1
  86. package/docs/commands/README.md +151 -0
  87. package/docs/commands/_examples/kg.md +13 -0
  88. package/docs/commands/_examples/memory.md +13 -0
  89. package/docs/commands/_examples/observation.md +13 -0
  90. package/docs/commands/_examples/projects.md +16 -0
  91. package/docs/commands/_examples/skill.md +13 -0
  92. package/docs/commands/_examples/zettel.md +13 -0
  93. package/docs/commands/backup.md +24 -0
  94. package/docs/commands/clear-names.md +27 -0
  95. package/docs/commands/daemon.md +78 -0
  96. package/docs/commands/db.md +74 -0
  97. package/docs/commands/end.md +24 -0
  98. package/docs/commands/help.md +30 -0
  99. package/docs/commands/kg.md +89 -0
  100. package/docs/commands/mcp.md +35 -0
  101. package/docs/commands/memory.md +125 -0
  102. package/docs/commands/notify.md +83 -0
  103. package/docs/commands/observation.md +80 -0
  104. package/docs/commands/obsidian.md +60 -0
  105. package/docs/commands/pause.md +35 -0
  106. package/docs/commands/project.md +345 -0
  107. package/docs/commands/projects.md +364 -0
  108. package/docs/commands/registry.md +68 -0
  109. package/docs/commands/restore.md +31 -0
  110. package/docs/commands/sessions.md +25 -0
  111. package/docs/commands/setup.md +20 -0
  112. package/docs/commands/shell-init.md +18 -0
  113. package/docs/commands/skill.md +54 -0
  114. package/docs/commands/topic.md +46 -0
  115. package/docs/commands/update.md +18 -0
  116. package/docs/commands/zettel.md +151 -0
  117. package/docs/mcp-skill-guide.md +292 -0
  118. package/package.json +4 -2
  119. package/scripts/build-docs.mjs +371 -0
  120. package/src/hooks/ts/post-tool-use/observe.ts +43 -0
  121. package/dist/daemon-CSKj8Xm9.mjs.map +0 -1
  122. package/dist/db-BtuN768f.mjs +0 -206
  123. package/dist/db-BtuN768f.mjs.map +0 -1
  124. package/dist/factory-BufouUQ1.mjs +0 -44
  125. package/dist/factory-BufouUQ1.mjs.map +0 -1
  126. package/dist/indexer-D7MvSQPY.mjs +0 -1
  127. package/dist/kg-extraction-iR1BKKWK.mjs.map +0 -1
  128. package/dist/sync-CmBKOL3K.mjs.map +0 -1
@@ -0,0 +1,13 @@
1
+ ```bash
2
+ # Recent classified tool-call observations
3
+ pai observation list
4
+
5
+ # Only this project's decisions
6
+ pai observation list --project pai --type decision
7
+
8
+ # Search observations by text
9
+ pai observation search "daemon socket"
10
+
11
+ # Totals, by type, by project
12
+ pai observation stats
13
+ ```
@@ -0,0 +1,16 @@
1
+ ```bash
2
+ # Jump into a project directory (with the shell wrapper installed)
3
+ pai cd pai
4
+
5
+ # Register the current directory as a project
6
+ pai projects add .
7
+
8
+ # Show everything known about a project
9
+ pai projects info pai
10
+
11
+ # Repair a project whose folder moved on disk
12
+ pai projects rebind pai /new/path/to/pai
13
+
14
+ # Audit all registered projects for dead / moved paths
15
+ pai projects health --fix
16
+ ```
@@ -0,0 +1,13 @@
1
+ ```bash
2
+ # Which skills have actually been triggered, most-used first
3
+ pai skill telemetry
4
+
5
+ # Only skills still in trial (quarantined, not yet promoted)
6
+ pai skill telemetry --status trial
7
+
8
+ # Machine-readable output for dashboards
9
+ pai skill telemetry --json
10
+ ```
11
+
12
+ See `Notes/swarm/skills-self-educating.md` for the full self-educating loop
13
+ (discovery, sandbox trial, telemetry, adaptation).
@@ -0,0 +1,13 @@
1
+ ```bash
2
+ # Explore the neighbourhood of a note
3
+ pai zettel explore "token factory"
4
+
5
+ # Surface an unexpected connection
6
+ pai zettel surprise
7
+
8
+ # Emergent themes across the vault
9
+ pai zettel themes
10
+
11
+ # Vault connectivity health (orphans, dead links)
12
+ pai zettel health
13
+ ```
@@ -0,0 +1,24 @@
1
+ <!-- GENERATED by scripts/build-docs.mjs from the live Commander tree (src/cli/program.ts). Do not edit by hand. -->
2
+
3
+ # pai backup
4
+
5
+ > Backup registry, config, and Postgres database to ~/.pai/backups/
6
+
7
+ ## Synopsis
8
+
9
+ ```
10
+ pai backup [options]
11
+ ```
12
+
13
+ ## Options
14
+
15
+ | Option | Description | Default |
16
+ |--------|-------------|---------|
17
+ | `--no-postgres` | Skip the Postgres pg_dump (faster, registry+config only) | |
18
+
19
+ ## See also
20
+
21
+ [`pai clear-names`](clear-names.md) · [`pai daemon`](daemon.md) · [`pai db`](db.md) · [`pai end`](end.md) · [`pai help`](help.md) · [`pai kg`](kg.md) · [`pai mcp`](mcp.md) · [`pai memory`](memory.md) · [`pai notify`](notify.md) · [`pai observation`](observation.md) · [`pai obsidian`](obsidian.md) · [`pai pause`](pause.md) · [`pai project`](project.md) · [`pai projects`](projects.md) · [`pai registry`](registry.md) · [`pai restore`](restore.md) · [`pai sessions`](sessions.md) · [`pai setup`](setup.md) · [`pai shell-init`](shell-init.md) · [`pai skill`](skill.md) · [`pai topic`](topic.md) · [`pai update`](update.md) · [`pai zettel`](zettel.md)
22
+
23
+ Run `pai help <area>` to read any of these in the terminal.
24
+
@@ -0,0 +1,27 @@
1
+ <!-- GENERATED by scripts/build-docs.mjs from the live Commander tree (src/cli/program.ts). Do not edit by hand. -->
2
+
3
+ # pai clear-names
4
+
5
+ > Recovery: wipe corrupted iTerm2 session name state.
6
+
7
+ Clears ~/.aibroker/session-names.json AND user.paiName from all live iTerm2 sessions.
8
+ After running this, use /Name to re-label each tab.
9
+
10
+ ## Synopsis
11
+
12
+ ```
13
+ pai clear-names [options]
14
+ ```
15
+
16
+ ## Options
17
+
18
+ | Option | Description | Default |
19
+ |--------|-------------|---------|
20
+ | `--dry-run` | Preview what would be cleared without making changes | |
21
+
22
+ ## See also
23
+
24
+ [`pai backup`](backup.md) · [`pai daemon`](daemon.md) · [`pai db`](db.md) · [`pai end`](end.md) · [`pai help`](help.md) · [`pai kg`](kg.md) · [`pai mcp`](mcp.md) · [`pai memory`](memory.md) · [`pai notify`](notify.md) · [`pai observation`](observation.md) · [`pai obsidian`](obsidian.md) · [`pai pause`](pause.md) · [`pai project`](project.md) · [`pai projects`](projects.md) · [`pai registry`](registry.md) · [`pai restore`](restore.md) · [`pai sessions`](sessions.md) · [`pai setup`](setup.md) · [`pai shell-init`](shell-init.md) · [`pai skill`](skill.md) · [`pai topic`](topic.md) · [`pai update`](update.md) · [`pai zettel`](zettel.md)
25
+
26
+ Run `pai help <area>` to read any of these in the terminal.
27
+
@@ -0,0 +1,78 @@
1
+ <!-- GENERATED by scripts/build-docs.mjs from the live Commander tree (src/cli/program.ts). Do not edit by hand. -->
2
+
3
+ # pai daemon
4
+
5
+ > PAI daemon management: serve, status, restart, install, uninstall, logs
6
+
7
+ ## Synopsis
8
+
9
+ ```
10
+ pai daemon <subcommand> [options]
11
+ ```
12
+
13
+ ## Subcommands
14
+
15
+ | Command | Description |
16
+ |---------|-------------|
17
+ | [`pai daemon serve`](#pai-daemon-serve) | Start the PAI daemon in the foreground |
18
+ | [`pai daemon migrate`](#pai-daemon-migrate) | Migrate federation data from SQLite to PostgreSQL |
19
+ | [`pai daemon status`](#pai-daemon-status) | Query the running daemon status |
20
+ | [`pai daemon restart`](#pai-daemon-restart) | Send SIGTERM to the running daemon (launchd will restart it) |
21
+ | [`pai daemon install`](#pai-daemon-install) | Install daemon as a launchd service and update ~/.claude.json to use the shim |
22
+ | [`pai daemon uninstall`](#pai-daemon-uninstall) | Remove the launchd service and revert to direct MCP |
23
+ | [`pai daemon logs`](#pai-daemon-logs) | Tail the daemon log (/tmp/pai-daemon.log) |
24
+
25
+ ### pai daemon serve
26
+
27
+ Start the PAI daemon in the foreground
28
+
29
+
30
+ ### pai daemon migrate
31
+
32
+ Migrate federation data from SQLite to PostgreSQL
33
+
34
+ **Options**
35
+
36
+ | Option | Description | Default |
37
+ |--------|-------------|---------|
38
+ | `--connection-string <url>` | Postgres connection string (default: from config or postgresql://pai:pai@localhost:5432/pai) | |
39
+
40
+
41
+ ### pai daemon status
42
+
43
+ Query the running daemon status
44
+
45
+
46
+ ### pai daemon restart
47
+
48
+ Send SIGTERM to the running daemon (launchd will restart it)
49
+
50
+
51
+ ### pai daemon install
52
+
53
+ Install daemon as a launchd service and update ~/.claude.json to use the shim
54
+
55
+
56
+ ### pai daemon uninstall
57
+
58
+ Remove the launchd service and revert to direct MCP
59
+
60
+
61
+ ### pai daemon logs
62
+
63
+ Tail the daemon log (/tmp/pai-daemon.log)
64
+
65
+ **Options**
66
+
67
+ | Option | Description | Default |
68
+ |--------|-------------|---------|
69
+ | `-n, --lines <n>` | Number of lines to show | `50` |
70
+ | `-f, --follow` | Follow log output (like tail -f) | |
71
+
72
+
73
+ ## See also
74
+
75
+ [`pai backup`](backup.md) · [`pai clear-names`](clear-names.md) · [`pai db`](db.md) · [`pai end`](end.md) · [`pai help`](help.md) · [`pai kg`](kg.md) · [`pai mcp`](mcp.md) · [`pai memory`](memory.md) · [`pai notify`](notify.md) · [`pai observation`](observation.md) · [`pai obsidian`](obsidian.md) · [`pai pause`](pause.md) · [`pai project`](project.md) · [`pai projects`](projects.md) · [`pai registry`](registry.md) · [`pai restore`](restore.md) · [`pai sessions`](sessions.md) · [`pai setup`](setup.md) · [`pai shell-init`](shell-init.md) · [`pai skill`](skill.md) · [`pai topic`](topic.md) · [`pai update`](update.md) · [`pai zettel`](zettel.md)
76
+
77
+ Run `pai help <area>` to read any of these in the terminal.
78
+
@@ -0,0 +1,74 @@
1
+ <!-- GENERATED by scripts/build-docs.mjs from the live Commander tree (src/cli/program.ts). Do not edit by hand. -->
2
+
3
+ # pai db
4
+
5
+ > Database inspection: query, tables, schema (sqlite or postgres)
6
+
7
+ ## Synopsis
8
+
9
+ ```
10
+ pai db <subcommand> [options]
11
+ ```
12
+
13
+ ## Subcommands
14
+
15
+ | Command | Description |
16
+ |---------|-------------|
17
+ | [`pai db query <sql>`](#pai-db-query-sql) | Run a SQL query against the selected database |
18
+ | [`pai db tables`](#pai-db-tables) | List all tables in the selected database |
19
+ | [`pai db schema <table>`](#pai-db-schema-table) | Show column schema for a table |
20
+
21
+ ### pai db query <sql>
22
+
23
+ Run a SQL query against the selected database
24
+
25
+ **Arguments**
26
+
27
+ | Argument | Kind |
28
+ |----------|------|
29
+ | `<sql>` | required |
30
+
31
+ **Options**
32
+
33
+ | Option | Description | Default |
34
+ |--------|-------------|---------|
35
+ | `--db <target>` | Database target: sqlite (default) or postgres | `sqlite` |
36
+ | `--json` | Output results as JSON array | |
37
+
38
+
39
+ ### pai db tables
40
+
41
+ List all tables in the selected database
42
+
43
+ **Options**
44
+
45
+ | Option | Description | Default |
46
+ |--------|-------------|---------|
47
+ | `--db <target>` | Database target: sqlite (default) or postgres | `sqlite` |
48
+ | `--json` | Output as JSON array | |
49
+
50
+
51
+ ### pai db schema <table>
52
+
53
+ Show column schema for a table
54
+
55
+ **Arguments**
56
+
57
+ | Argument | Kind |
58
+ |----------|------|
59
+ | `<table>` | required |
60
+
61
+ **Options**
62
+
63
+ | Option | Description | Default |
64
+ |--------|-------------|---------|
65
+ | `--db <target>` | Database target: sqlite (default) or postgres | `sqlite` |
66
+ | `--json` | Output as JSON array | |
67
+
68
+
69
+ ## See also
70
+
71
+ [`pai backup`](backup.md) · [`pai clear-names`](clear-names.md) · [`pai daemon`](daemon.md) · [`pai end`](end.md) · [`pai help`](help.md) · [`pai kg`](kg.md) · [`pai mcp`](mcp.md) · [`pai memory`](memory.md) · [`pai notify`](notify.md) · [`pai observation`](observation.md) · [`pai obsidian`](obsidian.md) · [`pai pause`](pause.md) · [`pai project`](project.md) · [`pai projects`](projects.md) · [`pai registry`](registry.md) · [`pai restore`](restore.md) · [`pai sessions`](sessions.md) · [`pai setup`](setup.md) · [`pai shell-init`](shell-init.md) · [`pai skill`](skill.md) · [`pai topic`](topic.md) · [`pai update`](update.md) · [`pai zettel`](zettel.md)
72
+
73
+ Run `pai help <area>` to read any of these in the terminal.
74
+
@@ -0,0 +1,24 @@
1
+ <!-- GENERATED by scripts/build-docs.mjs from the live Commander tree (src/cli/program.ts). Do not edit by hand. -->
2
+
3
+ # pai end
4
+
5
+ > Finalize a session: save state, mark note Completed, display safe-exit instructions.
6
+
7
+ ## Synopsis
8
+
9
+ ```
10
+ pai end [options]
11
+ ```
12
+
13
+ ## Options
14
+
15
+ | Option | Description | Default |
16
+ |--------|-------------|---------|
17
+ | `--dry-run` | Preview all changes without writing them | |
18
+
19
+ ## See also
20
+
21
+ [`pai backup`](backup.md) · [`pai clear-names`](clear-names.md) · [`pai daemon`](daemon.md) · [`pai db`](db.md) · [`pai help`](help.md) · [`pai kg`](kg.md) · [`pai mcp`](mcp.md) · [`pai memory`](memory.md) · [`pai notify`](notify.md) · [`pai observation`](observation.md) · [`pai obsidian`](obsidian.md) · [`pai pause`](pause.md) · [`pai project`](project.md) · [`pai projects`](projects.md) · [`pai registry`](registry.md) · [`pai restore`](restore.md) · [`pai sessions`](sessions.md) · [`pai setup`](setup.md) · [`pai shell-init`](shell-init.md) · [`pai skill`](skill.md) · [`pai topic`](topic.md) · [`pai update`](update.md) · [`pai zettel`](zettel.md)
22
+
23
+ Run `pai help <area>` to read any of these in the terminal.
24
+
@@ -0,0 +1,30 @@
1
+ <!-- GENERATED by scripts/build-docs.mjs from the live Commander tree (src/cli/program.ts). Do not edit by hand. -->
2
+
3
+ # pai help
4
+
5
+ > Show the man page for a command area (pai help <area>), or list all areas
6
+
7
+ ## Synopsis
8
+
9
+ ```
10
+ pai help [area] [options]
11
+ ```
12
+
13
+ ## Arguments
14
+
15
+ | Argument | Kind |
16
+ |----------|------|
17
+ | `[area]` | optional |
18
+
19
+ ## Options
20
+
21
+ | Option | Description | Default |
22
+ |--------|-------------|---------|
23
+ | `--raw` | Print raw markdown without terminal styling | |
24
+
25
+ ## See also
26
+
27
+ [`pai backup`](backup.md) · [`pai clear-names`](clear-names.md) · [`pai daemon`](daemon.md) · [`pai db`](db.md) · [`pai end`](end.md) · [`pai kg`](kg.md) · [`pai mcp`](mcp.md) · [`pai memory`](memory.md) · [`pai notify`](notify.md) · [`pai observation`](observation.md) · [`pai obsidian`](obsidian.md) · [`pai pause`](pause.md) · [`pai project`](project.md) · [`pai projects`](projects.md) · [`pai registry`](registry.md) · [`pai restore`](restore.md) · [`pai sessions`](sessions.md) · [`pai setup`](setup.md) · [`pai shell-init`](shell-init.md) · [`pai skill`](skill.md) · [`pai topic`](topic.md) · [`pai update`](update.md) · [`pai zettel`](zettel.md)
28
+
29
+ Run `pai help <area>` to read any of these in the terminal.
30
+
@@ -0,0 +1,89 @@
1
+ <!-- GENERATED by scripts/build-docs.mjs from the live Commander tree (src/cli/program.ts). Do not edit by hand. -->
2
+
3
+ # pai kg
4
+
5
+ > Temporal knowledge graph: backfill, query, list, stats
6
+
7
+ ## Synopsis
8
+
9
+ ```
10
+ pai kg <subcommand> [options]
11
+ ```
12
+
13
+ ## Subcommands
14
+
15
+ | Command | Description |
16
+ |---------|-------------|
17
+ | [`pai kg backfill`](#pai-kg-backfill) | Populate the KG from existing session notes (idempotent) |
18
+ | [`pai kg query`](#pai-kg-query) | Query KG triples by subject, predicate, object, time, or project |
19
+ | [`pai kg list`](#pai-kg-list) | List currently-valid triples |
20
+ | [`pai kg stats`](#pai-kg-stats) | Show triple counts and contradiction count |
21
+
22
+ ### pai kg backfill
23
+
24
+ Populate the KG from existing session notes (idempotent)
25
+
26
+ **Options**
27
+
28
+ | Option | Description | Default |
29
+ |--------|-------------|---------|
30
+ | `--project <slug>` | Restrict backfill to a single project | |
31
+ | `--limit <n>` | Maximum number of notes to process | |
32
+ | `--dry-run` | List notes that would be processed without extracting | |
33
+
34
+
35
+ ### pai kg query
36
+
37
+ Query KG triples by subject, predicate, object, time, or project
38
+
39
+ **Options**
40
+
41
+ | Option | Description | Default |
42
+ |--------|-------------|---------|
43
+ | `--subject <s>` | Filter by subject | |
44
+ | `--predicate <p>` | Filter by predicate | |
45
+ | `--object <o>` | Filter by object | |
46
+ | `--as-of <date>` | Point-in-time query (YYYY-MM-DD or ISO 8601) | |
47
+ | `--project <slug>` | Restrict to a project slug | |
48
+ | `--json` | Output raw JSON | |
49
+
50
+
51
+ ### pai kg list
52
+
53
+ List currently-valid triples
54
+
55
+ **Options**
56
+
57
+ | Option | Description | Default |
58
+ |--------|-------------|---------|
59
+ | `--project <slug>` | Restrict to a project slug | |
60
+ | `--limit <n>` | Maximum triples to print | `50` |
61
+
62
+
63
+ ### pai kg stats
64
+
65
+ Show triple counts and contradiction count
66
+
67
+
68
+ ## Examples
69
+
70
+ ```bash
71
+ # Build the temporal knowledge graph from existing memory
72
+ pai kg backfill
73
+
74
+ # Ask the graph about an entity
75
+ pai kg query "Talan"
76
+
77
+ # List known entities
78
+ pai kg list
79
+
80
+ # Graph size and entity-type breakdown
81
+ pai kg stats
82
+ ```
83
+
84
+ ## See also
85
+
86
+ [`pai backup`](backup.md) · [`pai clear-names`](clear-names.md) · [`pai daemon`](daemon.md) · [`pai db`](db.md) · [`pai end`](end.md) · [`pai help`](help.md) · [`pai mcp`](mcp.md) · [`pai memory`](memory.md) · [`pai notify`](notify.md) · [`pai observation`](observation.md) · [`pai obsidian`](obsidian.md) · [`pai pause`](pause.md) · [`pai project`](project.md) · [`pai projects`](projects.md) · [`pai registry`](registry.md) · [`pai restore`](restore.md) · [`pai sessions`](sessions.md) · [`pai setup`](setup.md) · [`pai shell-init`](shell-init.md) · [`pai skill`](skill.md) · [`pai topic`](topic.md) · [`pai update`](update.md) · [`pai zettel`](zettel.md)
87
+
88
+ Run `pai help <area>` to read any of these in the terminal.
89
+
@@ -0,0 +1,35 @@
1
+ <!-- GENERATED by scripts/build-docs.mjs from the live Commander tree (src/cli/program.ts). Do not edit by hand. -->
2
+
3
+ # pai mcp
4
+
5
+ > MCP server management: install and status
6
+
7
+ ## Synopsis
8
+
9
+ ```
10
+ pai mcp <subcommand> [options]
11
+ ```
12
+
13
+ ## Subcommands
14
+
15
+ | Command | Description |
16
+ |---------|-------------|
17
+ | [`pai mcp install`](#pai-mcp-install) | Register the PAI MCP server in ~/.claude.json (restart Claude Code to activate) |
18
+ | [`pai mcp status`](#pai-mcp-status) | Show whether the PAI MCP server is registered and the binary exists |
19
+
20
+ ### pai mcp install
21
+
22
+ Register the PAI MCP server in ~/.claude.json (restart Claude Code to activate)
23
+
24
+
25
+ ### pai mcp status
26
+
27
+ Show whether the PAI MCP server is registered and the binary exists
28
+
29
+
30
+ ## See also
31
+
32
+ [`pai backup`](backup.md) · [`pai clear-names`](clear-names.md) · [`pai daemon`](daemon.md) · [`pai db`](db.md) · [`pai end`](end.md) · [`pai help`](help.md) · [`pai kg`](kg.md) · [`pai memory`](memory.md) · [`pai notify`](notify.md) · [`pai observation`](observation.md) · [`pai obsidian`](obsidian.md) · [`pai pause`](pause.md) · [`pai project`](project.md) · [`pai projects`](projects.md) · [`pai registry`](registry.md) · [`pai restore`](restore.md) · [`pai sessions`](sessions.md) · [`pai setup`](setup.md) · [`pai shell-init`](shell-init.md) · [`pai skill`](skill.md) · [`pai topic`](topic.md) · [`pai update`](update.md) · [`pai zettel`](zettel.md)
33
+
34
+ Run `pai help <area>` to read any of these in the terminal.
35
+
@@ -0,0 +1,125 @@
1
+ <!-- GENERATED by scripts/build-docs.mjs from the live Commander tree (src/cli/program.ts). Do not edit by hand. -->
2
+
3
+ # pai memory
4
+
5
+ > Memory engine: index, search, and status
6
+
7
+ ## Synopsis
8
+
9
+ ```
10
+ pai memory <subcommand> [options]
11
+ ```
12
+
13
+ ## Subcommands
14
+
15
+ | Command | Description |
16
+ |---------|-------------|
17
+ | [`pai memory index [project-slug]`](#pai-memory-index-project-slug) | Index memory files for one project or all projects |
18
+ | [`pai memory embed [project-slug]`](#pai-memory-embed-project-slug) | Generate embeddings for un-embedded chunks (Phase 2.5) |
19
+ | [`pai memory search <query>`](#pai-memory-search-query) | Search indexed memory (BM25 keyword, semantic, or hybrid) |
20
+ | [`pai memory status [project-slug]`](#pai-memory-status-project-slug) | Show memory index statistics |
21
+ | [`pai memory settings [key] [value]`](#pai-memory-settings-key-value) | View or modify search settings in ~/.config/pai/config.json |
22
+
23
+ ### pai memory index [project-slug]
24
+
25
+ Index memory files for one project or all projects
26
+
27
+ **Arguments**
28
+
29
+ | Argument | Kind |
30
+ |----------|------|
31
+ | `[project-slug]` | optional |
32
+
33
+ **Options**
34
+
35
+ | Option | Description | Default |
36
+ |--------|-------------|---------|
37
+ | `--all` | Index all active projects (default when no slug given) | |
38
+ | `--embed` | Also generate embeddings for newly indexed chunks (Phase 2.5) | |
39
+ | `--direct` | Skip daemon IPC and run index directly (for debugging) | |
40
+
41
+
42
+ ### pai memory embed [project-slug]
43
+
44
+ Generate embeddings for un-embedded chunks (Phase 2.5)
45
+
46
+ **Arguments**
47
+
48
+ | Argument | Kind |
49
+ |----------|------|
50
+ | `[project-slug]` | optional |
51
+
52
+ **Options**
53
+
54
+ | Option | Description | Default |
55
+ |--------|-------------|---------|
56
+ | `--batch-size <n>` | Chunks to embed per batch | `50` |
57
+
58
+
59
+ ### pai memory search <query>
60
+
61
+ Search indexed memory (BM25 keyword, semantic, or hybrid)
62
+
63
+ **Arguments**
64
+
65
+ | Argument | Kind |
66
+ |----------|------|
67
+ | `<query>` | required |
68
+
69
+ **Options**
70
+
71
+ | Option | Description | Default |
72
+ |--------|-------------|---------|
73
+ | `--project <slug>` | Restrict search to a specific project | |
74
+ | `--source <source>` | Restrict to 'memory' or 'notes' | |
75
+ | `--limit <n>` | Maximum results to return | |
76
+ | `--mode <mode>` | Search mode: keyword (default), semantic, hybrid | |
77
+ | `--no-rerank` | Skip cross-encoder reranking (reranking is on by default) | |
78
+ | `--recency <days>` | Apply recency boost: score halves every N days. 0 = off | |
79
+
80
+
81
+ ### pai memory status [project-slug]
82
+
83
+ Show memory index statistics
84
+
85
+ **Arguments**
86
+
87
+ | Argument | Kind |
88
+ |----------|------|
89
+ | `[project-slug]` | optional |
90
+
91
+
92
+ ### pai memory settings [key] [value]
93
+
94
+ View or modify search settings in ~/.config/pai/config.json
95
+
96
+ **Arguments**
97
+
98
+ | Argument | Kind |
99
+ |----------|------|
100
+ | `[key]` | optional |
101
+ | `[value]` | optional |
102
+
103
+
104
+ ## Examples
105
+
106
+ ```bash
107
+ # Search federated memory across all projects
108
+ pai memory search "cross-encoder reranker"
109
+
110
+ # Semantic (vector) search with recency boost (reranking is on by default)
111
+ pai memory search "token factory" --mode semantic --recency 90
112
+
113
+ # Re-index a project's memory/ and Notes/ directories
114
+ pai memory index
115
+
116
+ # Show index size and embedding coverage
117
+ pai memory status
118
+ ```
119
+
120
+ ## See also
121
+
122
+ [`pai backup`](backup.md) · [`pai clear-names`](clear-names.md) · [`pai daemon`](daemon.md) · [`pai db`](db.md) · [`pai end`](end.md) · [`pai help`](help.md) · [`pai kg`](kg.md) · [`pai mcp`](mcp.md) · [`pai notify`](notify.md) · [`pai observation`](observation.md) · [`pai obsidian`](obsidian.md) · [`pai pause`](pause.md) · [`pai project`](project.md) · [`pai projects`](projects.md) · [`pai registry`](registry.md) · [`pai restore`](restore.md) · [`pai sessions`](sessions.md) · [`pai setup`](setup.md) · [`pai shell-init`](shell-init.md) · [`pai skill`](skill.md) · [`pai topic`](topic.md) · [`pai update`](update.md) · [`pai zettel`](zettel.md)
123
+
124
+ Run `pai help <area>` to read any of these in the terminal.
125
+
@@ -0,0 +1,83 @@
1
+ <!-- GENERATED by scripts/build-docs.mjs from the live Commander tree (src/cli/program.ts). Do not edit by hand. -->
2
+
3
+ # pai notify
4
+
5
+ > Notification config: status, get, set, test, send
6
+
7
+ ## Synopsis
8
+
9
+ ```
10
+ pai notify <subcommand> [options]
11
+ ```
12
+
13
+ ## Subcommands
14
+
15
+ | Command | Description |
16
+ |---------|-------------|
17
+ | [`pai notify status`](#pai-notify-status) | Show current notification mode and active channels |
18
+ | [`pai notify get`](#pai-notify-get) | Show current notification config (alias for status) |
19
+ | [`pai notify set`](#pai-notify-set) | Update notification mode or channel configuration |
20
+ | [`pai notify test`](#pai-notify-test) | Send a test notification through configured channels |
21
+ | [`pai notify send <event> <message>`](#pai-notify-send-event-message) | Send a notification with an explicit event type and message |
22
+
23
+ ### pai notify status
24
+
25
+ Show current notification mode and active channels
26
+
27
+
28
+ ### pai notify get
29
+
30
+ Show current notification config (alias for status)
31
+
32
+
33
+ ### pai notify set
34
+
35
+ Update notification mode or channel configuration
36
+
37
+ **Options**
38
+
39
+ | Option | Description | Default |
40
+ |--------|-------------|---------|
41
+ | `--mode <mode>` | Notification mode: auto \| voice \| whatsapp \| ntfy \| macos \| cli \| off | |
42
+ | `--enable <channel...>` | Enable one or more channels | |
43
+ | `--disable <channel...>` | Disable one or more channels | |
44
+ | `--ntfy-url <url>` | Set the ntfy.sh topic URL | |
45
+ | `--ntfy-priority <level>` | Set ntfy priority: min \| low \| default \| high \| urgent | |
46
+ | `--whatsapp-recipient <contact>` | Set WhatsApp recipient | |
47
+
48
+
49
+ ### pai notify test
50
+
51
+ Send a test notification through configured channels
52
+
53
+ **Options**
54
+
55
+ | Option | Description | Default |
56
+ |--------|-------------|---------|
57
+ | `--event <event>` | Event type to test: error \| progress \| completion \| info \| debug | `info` |
58
+
59
+
60
+ ### pai notify send <event> <message>
61
+
62
+ Send a notification with an explicit event type and message
63
+
64
+ **Arguments**
65
+
66
+ | Argument | Kind |
67
+ |----------|------|
68
+ | `<event>` | required |
69
+ | `<message>` | required |
70
+
71
+ **Options**
72
+
73
+ | Option | Description | Default |
74
+ |--------|-------------|---------|
75
+ | `--title <title>` | Optional notification title | |
76
+
77
+
78
+ ## See also
79
+
80
+ [`pai backup`](backup.md) · [`pai clear-names`](clear-names.md) · [`pai daemon`](daemon.md) · [`pai db`](db.md) · [`pai end`](end.md) · [`pai help`](help.md) · [`pai kg`](kg.md) · [`pai mcp`](mcp.md) · [`pai memory`](memory.md) · [`pai observation`](observation.md) · [`pai obsidian`](obsidian.md) · [`pai pause`](pause.md) · [`pai project`](project.md) · [`pai projects`](projects.md) · [`pai registry`](registry.md) · [`pai restore`](restore.md) · [`pai sessions`](sessions.md) · [`pai setup`](setup.md) · [`pai shell-init`](shell-init.md) · [`pai skill`](skill.md) · [`pai topic`](topic.md) · [`pai update`](update.md) · [`pai zettel`](zettel.md)
81
+
82
+ Run `pai help <area>` to read any of these in the terminal.
83
+