lsd-pi 1.1.6 → 1.1.9

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 (226) hide show
  1. package/README.md +477 -290
  2. package/dist/app-paths.js +1 -1
  3. package/dist/cli.js +25 -25
  4. package/dist/headless-context.d.ts +3 -2
  5. package/dist/headless-context.js +7 -5
  6. package/dist/headless-ui.js +2 -2
  7. package/dist/headless.d.ts +3 -2
  8. package/dist/headless.js +30 -21
  9. package/dist/help-text.js +46 -45
  10. package/dist/models-resolver.d.ts +7 -6
  11. package/dist/models-resolver.js +11 -10
  12. package/dist/onboarding.js +5 -5
  13. package/dist/remote-questions-config.js +10 -4
  14. package/dist/resources/agents/scout.md +1 -0
  15. package/dist/resources/extensions/ask-user-questions.js +3 -1
  16. package/dist/resources/extensions/async-jobs/await-tool.js +28 -5
  17. package/dist/resources/extensions/bg-shell/bg-shell-command.js +27 -3
  18. package/dist/resources/extensions/bg-shell/bg-shell-lifecycle.js +27 -60
  19. package/dist/resources/extensions/bg-shell/bg-shell-tool.js +1 -6
  20. package/dist/resources/extensions/bg-shell/process-manager.js +4 -42
  21. package/dist/resources/extensions/bg-shell/utilities.js +0 -13
  22. package/dist/resources/extensions/get-secrets-from-user.js +24 -4
  23. package/dist/resources/extensions/mcp-client/index.js +257 -41
  24. package/dist/resources/extensions/memory/auto-extract.js +11 -3
  25. package/dist/resources/extensions/memory/dream.js +381 -13
  26. package/dist/resources/extensions/remote-questions/index.js +35 -0
  27. package/dist/resources/extensions/remote-questions/remote-command.js +10 -2
  28. package/dist/resources/extensions/remote-questions/telegram-live-relay.js +273 -11
  29. package/dist/resources/extensions/search-the-web/provider.js +2 -2
  30. package/dist/resources/extensions/shared/confirm-ui.js +8 -3
  31. package/dist/resources/extensions/shared/interview-ui.js +41 -2
  32. package/dist/resources/extensions/shared/remote-questions-config.js +10 -4
  33. package/dist/resources/extensions/slash-commands/audit.js +5 -5
  34. package/dist/resources/extensions/slash-commands/context.js +198 -0
  35. package/dist/resources/extensions/slash-commands/extension-manifest.json +3 -2
  36. package/dist/resources/extensions/slash-commands/index.js +4 -0
  37. package/dist/resources/extensions/slash-commands/plan.js +206 -44
  38. package/dist/resources/extensions/slash-commands/tools.js +183 -0
  39. package/dist/resources/extensions/subagent/approval-proxy.js +57 -12
  40. package/dist/resources/extensions/subagent/index.js +11 -100
  41. package/dist/resources/extensions/universal-config/scanners.js +2 -2
  42. package/dist/resources/extensions/usage/index.js +82 -2
  43. package/dist/resources/extensions/usage-tips/extension-manifest.json +12 -0
  44. package/dist/resources/extensions/usage-tips/index.js +12 -0
  45. package/dist/resources/skills/lsd-guide/INSTALLATION.md +202 -0
  46. package/dist/resources/skills/lsd-guide/README.md +264 -0
  47. package/dist/resources/skills/lsd-guide/SKILL.md +197 -0
  48. package/dist/resources/skills/lsd-guide/metadata.json +30 -0
  49. package/dist/resources/skills/lsd-guide/references/auto-mode.md +322 -0
  50. package/dist/resources/skills/lsd-guide/references/commands.md +373 -0
  51. package/dist/resources/skills/lsd-guide/references/configuration.md +505 -0
  52. package/dist/resources/skills/lsd-guide/references/getting-started.md +214 -0
  53. package/dist/resources/skills/lsd-guide/references/skills.md +357 -0
  54. package/dist/resources/skills/lsd-guide/references/subagents.md +359 -0
  55. package/dist/resources/skills/lsd-guide/references/troubleshooting.md +617 -0
  56. package/dist/resources/skills/lsd-models/README.md +279 -0
  57. package/dist/resources/skills/lsd-models/SKILL.md +502 -0
  58. package/dist/resources/skills/lsd-models/metadata.json +19 -0
  59. package/dist/rtk.js +1 -1
  60. package/dist/shared-preferences.d.ts +1 -0
  61. package/dist/worktree-cli.d.ts +1 -1
  62. package/dist/worktree-cli.js +16 -15
  63. package/package.json +1 -1
  64. package/packages/daemon/src/config.ts +14 -4
  65. package/packages/daemon/src/orchestrator.ts +8 -5
  66. package/packages/daemon/src/project-scanner.ts +2 -1
  67. package/packages/mcp-server/src/server.ts +7 -6
  68. package/packages/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
  69. package/packages/pi-coding-agent/dist/core/agent-session.js +24 -0
  70. package/packages/pi-coding-agent/dist/core/agent-session.js.map +1 -1
  71. package/packages/pi-coding-agent/dist/core/extensions/types.d.ts +40 -1
  72. package/packages/pi-coding-agent/dist/core/extensions/types.d.ts.map +1 -1
  73. package/packages/pi-coding-agent/dist/core/extensions/types.js.map +1 -1
  74. package/packages/pi-coding-agent/dist/core/lsp/lsp.md +1 -1
  75. package/packages/pi-coding-agent/dist/core/model-registry.d.ts.map +1 -1
  76. package/packages/pi-coding-agent/dist/core/model-registry.js +8 -0
  77. package/packages/pi-coding-agent/dist/core/model-registry.js.map +1 -1
  78. package/packages/pi-coding-agent/dist/core/sdk.d.ts.map +1 -1
  79. package/packages/pi-coding-agent/dist/core/sdk.js +29 -18
  80. package/packages/pi-coding-agent/dist/core/sdk.js.map +1 -1
  81. package/packages/pi-coding-agent/dist/core/sdk.test.d.ts +2 -0
  82. package/packages/pi-coding-agent/dist/core/sdk.test.d.ts.map +1 -0
  83. package/packages/pi-coding-agent/dist/core/sdk.test.js +73 -0
  84. package/packages/pi-coding-agent/dist/core/sdk.test.js.map +1 -0
  85. package/packages/pi-coding-agent/dist/core/settings-manager.d.ts +12 -0
  86. package/packages/pi-coding-agent/dist/core/settings-manager.d.ts.map +1 -1
  87. package/packages/pi-coding-agent/dist/core/settings-manager.js +56 -0
  88. package/packages/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
  89. package/packages/pi-coding-agent/dist/core/slash-commands.d.ts.map +1 -1
  90. package/packages/pi-coding-agent/dist/core/slash-commands.js +1 -0
  91. package/packages/pi-coding-agent/dist/core/slash-commands.js.map +1 -1
  92. package/packages/pi-coding-agent/dist/core/system-prompt.d.ts.map +1 -1
  93. package/packages/pi-coding-agent/dist/core/system-prompt.js +20 -1
  94. package/packages/pi-coding-agent/dist/core/system-prompt.js.map +1 -1
  95. package/packages/pi-coding-agent/dist/core/tool-approval.d.ts +4 -0
  96. package/packages/pi-coding-agent/dist/core/tool-approval.d.ts.map +1 -1
  97. package/packages/pi-coding-agent/dist/core/tool-approval.js +30 -0
  98. package/packages/pi-coding-agent/dist/core/tool-approval.js.map +1 -1
  99. package/packages/pi-coding-agent/dist/index.d.ts +1 -1
  100. package/packages/pi-coding-agent/dist/index.d.ts.map +1 -1
  101. package/packages/pi-coding-agent/dist/index.js +1 -1
  102. package/packages/pi-coding-agent/dist/index.js.map +1 -1
  103. package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/extension-selector.test.d.ts +2 -0
  104. package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/extension-selector.test.d.ts.map +1 -0
  105. package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/extension-selector.test.js +32 -0
  106. package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/extension-selector.test.js.map +1 -0
  107. package/packages/pi-coding-agent/dist/modes/interactive/components/embedded-terminal.d.ts +1 -0
  108. package/packages/pi-coding-agent/dist/modes/interactive/components/embedded-terminal.d.ts.map +1 -1
  109. package/packages/pi-coding-agent/dist/modes/interactive/components/embedded-terminal.js +10 -2
  110. package/packages/pi-coding-agent/dist/modes/interactive/components/embedded-terminal.js.map +1 -1
  111. package/packages/pi-coding-agent/dist/modes/interactive/components/extension-selector.d.ts +6 -1
  112. package/packages/pi-coding-agent/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
  113. package/packages/pi-coding-agent/dist/modes/interactive/components/extension-selector.js +36 -5
  114. package/packages/pi-coding-agent/dist/modes/interactive/components/extension-selector.js.map +1 -1
  115. package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js +2 -2
  116. package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js.map +1 -1
  117. package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts +11 -0
  118. package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  119. package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +42 -0
  120. package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -1
  121. package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  122. package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +23 -5
  123. package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
  124. package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.d.ts +2 -0
  125. package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.d.ts.map +1 -1
  126. package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js +1 -0
  127. package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js.map +1 -1
  128. package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +10 -0
  129. package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  130. package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js +274 -30
  131. package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
  132. package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.d.ts.map +1 -1
  133. package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.js +157 -0
  134. package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.js.map +1 -1
  135. package/packages/pi-coding-agent/dist/modes/print-mode.d.ts.map +1 -1
  136. package/packages/pi-coding-agent/dist/modes/print-mode.js +6 -2
  137. package/packages/pi-coding-agent/dist/modes/print-mode.js.map +1 -1
  138. package/packages/pi-coding-agent/package.json +1 -1
  139. package/packages/pi-coding-agent/src/core/agent-session.ts +28 -0
  140. package/packages/pi-coding-agent/src/core/extensions/types.ts +46 -0
  141. package/packages/pi-coding-agent/src/core/lsp/lsp.md +1 -1
  142. package/packages/pi-coding-agent/src/core/model-registry.ts +10 -0
  143. package/packages/pi-coding-agent/src/core/sdk.test.ts +82 -0
  144. package/packages/pi-coding-agent/src/core/sdk.ts +378 -368
  145. package/packages/pi-coding-agent/src/core/settings-manager.ts +74 -0
  146. package/packages/pi-coding-agent/src/core/slash-commands.ts +1 -0
  147. package/packages/pi-coding-agent/src/core/system-prompt.ts +29 -1
  148. package/packages/pi-coding-agent/src/core/tool-approval.ts +37 -0
  149. package/packages/pi-coding-agent/src/index.ts +7 -0
  150. package/packages/pi-coding-agent/src/modes/interactive/components/__tests__/extension-selector.test.ts +50 -0
  151. package/packages/pi-coding-agent/src/modes/interactive/components/embedded-terminal.ts +11 -2
  152. package/packages/pi-coding-agent/src/modes/interactive/components/extension-selector.ts +38 -7
  153. package/packages/pi-coding-agent/src/modes/interactive/components/footer.ts +2 -2
  154. package/packages/pi-coding-agent/src/modes/interactive/components/settings-selector.ts +54 -0
  155. package/packages/pi-coding-agent/src/modes/interactive/components/tool-execution.ts +24 -6
  156. package/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.ts +4 -0
  157. package/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +339 -32
  158. package/packages/pi-coding-agent/src/modes/interactive/slash-command-handlers.ts +185 -0
  159. package/packages/pi-coding-agent/src/modes/print-mode.ts +8 -1
  160. package/packages/pi-tui/dist/components/editor.d.ts +2 -0
  161. package/packages/pi-tui/dist/components/editor.d.ts.map +1 -1
  162. package/packages/pi-tui/dist/components/editor.js +17 -0
  163. package/packages/pi-tui/dist/components/editor.js.map +1 -1
  164. package/packages/pi-tui/src/components/editor.ts +17 -0
  165. package/pkg/package.json +1 -1
  166. package/src/resources/agents/scout.md +1 -0
  167. package/src/resources/extensions/ask-user-questions.ts +3 -1
  168. package/src/resources/extensions/async-jobs/await-tool.test.ts +143 -115
  169. package/src/resources/extensions/async-jobs/await-tool.ts +144 -124
  170. package/src/resources/extensions/bg-shell/bg-shell-command.ts +26 -3
  171. package/src/resources/extensions/bg-shell/bg-shell-lifecycle.ts +26 -68
  172. package/src/resources/extensions/bg-shell/bg-shell-tool.ts +0 -8
  173. package/src/resources/extensions/bg-shell/process-manager.ts +5 -45
  174. package/src/resources/extensions/bg-shell/types.ts +0 -15
  175. package/src/resources/extensions/bg-shell/utilities.ts +0 -14
  176. package/src/resources/extensions/get-secrets-from-user.ts +24 -4
  177. package/src/resources/extensions/mcp-client/index.ts +677 -434
  178. package/src/resources/extensions/memory/auto-extract.ts +11 -3
  179. package/src/resources/extensions/memory/dream.ts +408 -15
  180. package/src/resources/extensions/memory/tests/auto-extract.test.ts +9 -1
  181. package/src/resources/extensions/memory/tests/dream.test.ts +69 -5
  182. package/src/resources/extensions/remote-questions/index.ts +92 -52
  183. package/src/resources/extensions/remote-questions/remote-command.ts +12 -2
  184. package/src/resources/extensions/remote-questions/telegram-live-relay.ts +309 -12
  185. package/src/resources/extensions/search-the-web/provider.ts +2 -2
  186. package/src/resources/extensions/shared/confirm-ui.ts +11 -4
  187. package/src/resources/extensions/shared/interview-ui.ts +61 -2
  188. package/src/resources/extensions/shared/preferences.ts +1 -0
  189. package/src/resources/extensions/shared/remote-questions-config.ts +13 -4
  190. package/src/resources/extensions/shared/tests/custom-ui-fallbacks.test.ts +147 -0
  191. package/src/resources/extensions/slash-commands/audit.ts +5 -5
  192. package/src/resources/extensions/slash-commands/context.ts +245 -0
  193. package/src/resources/extensions/slash-commands/extension-manifest.json +3 -2
  194. package/src/resources/extensions/slash-commands/index.ts +7 -3
  195. package/src/resources/extensions/slash-commands/plan.ts +256 -46
  196. package/src/resources/extensions/slash-commands/tools.ts +198 -0
  197. package/src/resources/extensions/subagent/approval-proxy.ts +71 -23
  198. package/src/resources/extensions/subagent/index.ts +10 -117
  199. package/src/resources/extensions/universal-config/scanners.ts +527 -527
  200. package/src/resources/extensions/usage/index.ts +92 -2
  201. package/src/resources/extensions/usage-tips/extension-manifest.json +12 -0
  202. package/src/resources/extensions/usage-tips/index.ts +16 -0
  203. package/src/resources/skills/lsd-guide/INSTALLATION.md +202 -0
  204. package/src/resources/skills/lsd-guide/README.md +264 -0
  205. package/src/resources/skills/lsd-guide/SKILL.md +197 -0
  206. package/src/resources/skills/lsd-guide/metadata.json +30 -0
  207. package/src/resources/skills/lsd-guide/references/auto-mode.md +322 -0
  208. package/src/resources/skills/lsd-guide/references/commands.md +373 -0
  209. package/src/resources/skills/lsd-guide/references/configuration.md +505 -0
  210. package/src/resources/skills/lsd-guide/references/getting-started.md +214 -0
  211. package/src/resources/skills/lsd-guide/references/skills.md +357 -0
  212. package/src/resources/skills/lsd-guide/references/subagents.md +359 -0
  213. package/src/resources/skills/lsd-guide/references/troubleshooting.md +617 -0
  214. package/src/resources/skills/lsd-models/README.md +279 -0
  215. package/src/resources/skills/lsd-models/SKILL.md +502 -0
  216. package/src/resources/skills/lsd-models/metadata.json +19 -0
  217. package/dist/resources/skills/teams-debug/SKILL.md +0 -129
  218. package/dist/resources/skills/teams-document/SKILL.md +0 -122
  219. package/dist/resources/skills/teams-plan/SKILL.md +0 -305
  220. package/dist/resources/skills/teams-run/SKILL.md +0 -230
  221. package/dist/resources/skills/teams-verify/SKILL.md +0 -122
  222. package/src/resources/skills/teams-debug/SKILL.md +0 -129
  223. package/src/resources/skills/teams-document/SKILL.md +0 -122
  224. package/src/resources/skills/teams-plan/SKILL.md +0 -305
  225. package/src/resources/skills/teams-run/SKILL.md +0 -230
  226. package/src/resources/skills/teams-verify/SKILL.md +0 -122
package/README.md CHANGED
@@ -1,33 +1,25 @@
1
- <div align="center">
2
-
3
1
  # LSD
4
2
 
5
- **Lucent Software Developer** — a standalone coding-agent CLI built on the Pi SDK.
6
-
7
- [![npm version](https://img.shields.io/npm/v/lsd-pi?style=for-the-badge&logo=npm&logoColor=white&color=CB3837)](https://www.npmjs.com/package/lsd-pi)
8
- [![npm downloads](https://img.shields.io/npm/dm/lsd-pi?style=for-the-badge&logo=npm&logoColor=white&color=CB3837)](https://www.npmjs.com/package/lsd-pi)
9
- [![License](https://img.shields.io/badge/license-MIT-blue?style=for-the-badge)](LICENSE)
10
-
11
- LSD is a local-first agent shell for software work: coding, shell execution, browser automation, web research, MCP integrations, worktrees, sessions, and autonomous task execution.
3
+ **Looks Sort of Done** — a standalone coding-agent CLI built on the Pi SDK. Use all your AI providers and all your loved features from Claude Code, Codex, and Gemini in one place.
12
4
 
13
- It is a **fork of GSD 2**, but positioned differently:
14
-
15
- - the heavy **GSD workflow/orchestration layer** was stripped away
16
- - LSD focuses on the **agent shell, tools, sessions, worktrees, and execution surface**
17
- - LSD keeps useful compatibility where practical, but it is **not presented as GSD**
18
- - LSD adds and emphasizes **permission modes**, where **auto mode** is treated as a special permission/execution style rather than the center of the whole product
5
+ ![LSD Screenshot](./lsd.png)
19
6
 
20
7
  ```bash
21
8
  npm install -g lsd-pi@latest
22
9
  ```
23
10
 
24
- </div>
25
-
26
11
  ---
27
12
 
28
13
  ## What LSD is
29
14
 
30
- LSD is the product and CLI.
15
+ LSD is a general-purpose coding agent CLI. It combines:
16
+
17
+ - **Interactive TUI** inspired by Gemini CLI — including an embedded interactive terminal inside the LSD CLI that both you and the agent can use, so the agent is not blocked by commands or tools that require terminal interaction
18
+ - **Memory system and permission modes** inspired by Claude Code
19
+ - **Sandbox isolation** inspired by Codex
20
+ - **Auto mode** — a classifier-based autonomous execution mode
21
+ - **Remote questions** — relay agent prompts to Telegram, Discord, or Slack so you can respond from your phone
22
+ - **Background subagents, skills, worktrees, sessions, usage tracking, and more**
31
23
 
32
24
  - **Package:** `lsd-pi`
33
25
  - **Binary:** `lsd`
@@ -35,53 +27,9 @@ LSD is the product and CLI.
35
27
  - **Project config dir:** `.lsd/`
36
28
  - **User config dir:** `~/.lsd/`
37
29
 
38
- It is built on the Pi SDK and ships with a rich tool/runtime layer for:
39
-
40
- - code editing and file operations
41
- - shell execution (`bash`, `async_bash`, `bg_shell`)
42
- - browser automation and verification
43
- - web search and page extraction
44
- - MCP integrations
45
- - sessions and resumability
46
- - worktree-based parallel work
47
- - interactive and headless execution
48
- - configurable permission modes
49
-
50
30
  ### Fork lineage
51
31
 
52
- LSD is a fork of **GSD 2**.
53
-
54
- What changed:
55
-
56
- - the old GSD-specific project workflow layer is no longer the identity of the tool
57
- - LSD is centered on being a **general-purpose coding agent CLI**
58
- - the agent shell, tools, TUI, browser tools, sessions, worktrees, and integrations remain the core
59
- - auto execution still exists, but it is treated as **one operating mode among several**
60
-
61
- ### Permission modes
62
-
63
- LSD supports different permission modes for how aggressively it can act in your environment.
64
-
65
- A key point of the LSD model is:
66
-
67
- - **auto** is a special permission mode / execution style
68
- - it is not the whole product
69
- - you can use LSD interactively, cautiously, or autonomously depending on the task
70
-
71
- ## Important note on naming
72
-
73
- LSD has evolved from earlier GSD-branded work and is a fork of GSD 2. Some internal commands, docs, or compatibility surfaces may still use names like `/gsd`.
74
-
75
- **For users, the tool is LSD.**
76
-
77
- That means:
78
-
79
- - install with `npm install -g lsd-pi`
80
- - launch with `lsd`
81
- - use `.lsd/` for project state
82
- - use `~/.lsd/` for global LSD state
83
-
84
- Inside the interactive session, some slash commands still use the legacy `/gsd ...` namespace for compatibility, but the LSD direction is broader than the old workflow-centric GSD model.
32
+ LSD is a fork of **GSD 2**. The GSD-specific project workflow layer was stripped out. LSD is centered on being a general-purpose coding agent CLI — the agent shell, tools, TUI, browser tools, sessions, worktrees, and integrations remain core.
85
33
 
86
34
  ---
87
35
 
@@ -89,12 +37,10 @@ Inside the interactive session, some slash commands still use the legacy `/gsd .
89
37
 
90
38
  ### Requirements
91
39
 
92
- - Node.js **>= 22**
40
+ - Node.js **>= 22** (Node 24 LTS recommended)
93
41
  - Git
94
42
  - macOS, Linux, or Windows
95
43
 
96
- Node 24 LTS is recommended.
97
-
98
44
  ### Global install
99
45
 
100
46
  ```bash
@@ -111,354 +57,614 @@ Then ensure `$(npm prefix -g)/bin` is on your `PATH`.
111
57
 
112
58
  ### Local development build
113
59
 
114
- From this repo:
115
-
116
60
  ```bash
117
61
  npm install
118
62
  npm run build
119
63
  npm link
120
64
  ```
121
65
 
122
- That makes the local build available as `lsd` on your machine.
123
-
124
66
  ---
125
67
 
126
68
  ## Quick start
127
69
 
128
- ### Start an interactive session
129
-
130
70
  ```bash
131
- lsd
71
+ lsd # start interactive session
72
+ lsd -c # resume last session
73
+ lsd --print "summarize repo" # one-shot mode
74
+ lsd -w # start in an isolated git worktree
75
+ lsd config # re-run setup wizard
132
76
  ```
133
77
 
134
- ### Resume the last session for the current directory
78
+ ---
135
79
 
136
- ```bash
137
- lsd --continue
138
- # or
139
- lsd -c
140
- ```
80
+ ## First launch
141
81
 
142
- ### One-shot prompt mode
82
+ On first run, LSD opens an interactive setup wizard for:
143
83
 
144
- ```bash
145
- lsd --print "summarize this repository"
146
- ```
84
+ - LLM provider login or API key (Anthropic, OpenAI, Google, GitHub Copilot, and others)
85
+ - Web search provider (Brave, Tavily, built-in)
86
+ - Remote questions channel (Telegram, Discord, Slack)
87
+ - Tool API keys (Context7, Jina, Groq for voice)
147
88
 
89
+ Re-run setup any time:
148
90
 
149
91
  ```bash
92
+ lsd config
150
93
  ```
151
94
 
152
- ### Start in a git worktree
95
+ ---
96
+
97
+ ## Permission modes
98
+
99
+ LSD supports different permission modes controlling how aggressively it acts in your environment:
100
+
101
+ | Mode | Behaviour |
102
+ |------|-----------|
103
+ | **interactive** (default) | Asks for approval before write/edit/shell operations |
104
+ | **auto** | Uses a classifier model to approve low-risk tool calls automatically; still asks for high-risk ones |
105
+ | **bypass** | Runs without asking (used internally by headless/subagent workers) |
106
+
107
+ Switch modes with `/permission` inside a session or pass flags to headless commands.
108
+
109
+ ---
110
+
111
+ ## Sandbox
112
+
113
+ LSD supports filesystem sandboxing:
153
114
 
154
115
  ```bash
155
- lsd -w
156
- lsd -w my-feature
116
+ lsd --sandbox workspace-write # restrict writes to the current directory tree
117
+ lsd --sandbox none # no sandbox (default)
118
+ lsd --no-sandbox # explicit no-sandbox
157
119
  ```
158
120
 
121
+ `workspace-write` prevents the agent from writing outside the project directory.
122
+
159
123
  ---
160
124
 
161
- ## First launch
125
+ ## Context files (lsd.md / CLAUDE.md / AGENTS.md)
162
126
 
163
- On first run, LSD opens a setup flow for:
127
+ LSD automatically loads project instructions from these files (in order of preference):
164
128
 
165
- - LLM provider login or API key setup
166
- - optional web search provider setup
167
- - optional tool/API credentials
168
- - optional remote-question integrations
129
+ - `lsd.md` LSD-native project instructions
130
+ - `CLAUDE.md` Claude Code-compatible instructions
131
+ - `AGENTS.md` Codex-compatible instructions
169
132
 
170
- LSD supports multiple providers including Anthropic, OpenAI, Google, GitHub Copilot, and others depending on configuration and installed extensions.
133
+ Place one of these files at the project root (or in `.lsd/`) to give the agent persistent per-project context, coding conventions, and rules.
171
134
 
172
- Re-run setup any time with:
135
+ The `--bare` flag suppresses all of these (useful for CI):
173
136
 
174
137
  ```bash
175
- lsd config
138
+ lsd headless --bare auto
176
139
  ```
177
140
 
178
141
  ---
179
142
 
143
+ ## Interactive TUI
144
+ LSD comes with an embedded interactive terminal inspired by the gemini cli
145
+ - user interaction with that terminal directly from the TUI
146
+ - agent interaction with terminal programs and commands that require prompts, input, or other interactive flows without getting blocked
147
+
148
+ ![Interactive TUI Terminal](./docs/images/interactive-tui-terminal.png)
149
+
150
+ ### TUI slash commands
151
+
152
+ Use `/help` inside LSD to see the live command list for your current session, including built-ins, extension commands, prompt templates, and skill commands.
153
+
154
+ | Command | Description |
155
+ |---------|-------------|
156
+ | `/help [command]` | Show available commands or details for one command |
157
+ | `/model` | Switch model |
158
+ | `/login` | Add or switch provider credentials |
159
+ | `/settings` | Open settings panel |
160
+ | `/hotkeys` | Show keyboard shortcut reference |
161
+ | `/cache-timer` | Toggle the prompt-cache countdown in the footer |
162
+ | `/thinking` | Toggle extended thinking |
163
+ | `/voice` | Toggle voice input mode |
164
+ | `/clear` | Clear the current conversation |
165
+ | `/exit` | Exit LSD |
166
+
167
+ ### Memory commands
168
+
169
+ | Command | Description |
170
+ |---------|-------------|
171
+ | `/memories` | Browse saved memories for this project |
172
+ | `/remember <text>` | Save a memory immediately |
173
+ | `/forget <topic>` | Remove a memory |
174
+ | `/dream` | Run a memory consolidation pass manually |
175
+
176
+ ### Remote questions commands
177
+
178
+ | Command | Description |
179
+ |---------|-------------|
180
+ | `/lsd remote` | Show remote questions menu |
181
+ | `/lsd remote telegram` | Connect Telegram |
182
+ | `/lsd remote discord` | Connect Discord |
183
+ | `/lsd remote slack` | Connect Slack |
184
+ | `/lsd remote status` | Show current connection status |
185
+ | `/lsd remote disconnect` | Disconnect and remove saved token |
186
+
187
+ ### Background process commands
188
+
189
+ | Command | Description |
190
+ |---------|-------------|
191
+ | `/bg <cmd>` | Start a background shell process |
192
+ | `/jobs` | List running async jobs |
193
+
194
+ ### Codex account commands
195
+
196
+ | Command | Description |
197
+ |---------|-------------|
198
+ | `/codex add` | Add a ChatGPT/Codex OAuth account |
199
+ | `/codex list` | List configured accounts |
200
+ | `/codex status` | Show rotation state and token expiry |
201
+ | `/codex remove <n>` | Remove an account |
202
+ | `/codex enable <n>` | Re-enable a disabled account |
203
+ | `/codex disable <n>` | Temporarily disable an account |
204
+ | `/codex import` | Import from `~/.codex/auth.json` |
205
+ | `/codex import-cockpit` | Import from Cockpit Tools |
206
+ | `/codex sync` | Force refresh all tokens |
207
+
208
+ ### Other commands
209
+
210
+ | Command | Description |
211
+ |---------|-------------|
212
+ | `/usage [today\|7d\|YYYY-MM-DD]` | Show token and cost usage |
213
+ | `/subagents` | List background subagent jobs |
214
+ | `/subagent` | Manage a specific subagent |
215
+ | `/configs` | Discover config files from other AI tools (Claude Code, Cursor, Copilot, etc.) |
216
+ | `/plan` | Create and run a multi-step plan |
217
+ | `/audit` | Run a codebase audit |
218
+ | `/search-provider` | Switch web search provider |
219
+
220
+ ### Compatibility note
221
+
222
+ LSD is LSD-first. Some legacy `/gsd` aliases may still exist for compatibility, but the recommended commands and docs use `/lsd` and the standard slash commands shown above.
223
+
224
+ ### TUI settings
225
+
226
+ The settings panel (`/settings`) includes toggles for:
227
+
228
+ - **Codex rotate** — enable multi-account OAuth rotation
229
+ - **Cache timer** — show a prompt-cache countdown in the footer
230
+ - **Pin last prompt** — keep your most recent non-command prompt visible above the editor
231
+ - **RTK shell compression** — compress repetitive shell output to save tokens
232
+ - **Main accent** — change the accent color across the UI and thinking-level indicators
233
+
234
+ ---
235
+
180
236
  ## Persistent memory
181
237
 
182
- LSD includes a bundled **persistent memory** extension.
238
+ LSD includes a built-in **persistent memory** extension.
183
239
 
184
- What it does:
240
+ - Stores durable facts under `~/.lsd/projects/<project>/memory/`
241
+ - Injects `MEMORY.md` into future sessions for the same project
242
+ - Runs an **auto-extract** pass on session shutdown (detached worker, uses `budgetSubagentModel` if configured)
185
243
 
186
- - stores durable user/project memories under `~/.lsd/projects/<project>/memory/`
187
- - injects `MEMORY.md` into future turns for the same project
188
- - supports explicit memory commands:
189
- - `/memories`
190
- - `/remember <text>`
191
- - `/forget <topic>`
192
- - runs an **auto-extract** pass on session shutdown to save durable facts from the transcript
244
+ Debug files written to the project memory directory:
193
245
 
194
- Auto-extract notes:
246
+ - `.last-auto-extract.txt` — latest status (`saved_memory`, `nothing_worth_saving`, etc.)
247
+ - `.last-auto-extract.log` — extractor stdout/stderr
195
248
 
196
- - it runs in a detached `lsd headless --bare ...` worker after you exit a session
197
- - if `budgetSubagentModel` is configured in settings, auto-extract uses that model
198
- - otherwise it falls back to the normal default model resolution
199
- - it may decide that a transcript contains **nothing worth saving**
249
+ ---
200
250
 
201
- For debugging auto-extract, LSD writes two files in the project memory directory:
251
+ ## Codex multi-account rotation
202
252
 
203
- - `.last-auto-extract.txt` latest status/result summary
204
- - `.last-auto-extract.log` — extractor stdout/stderr
253
+ LSD bundles a Codex OAuth rotation extension for managing multiple ChatGPT/Codex accounts.
205
254
 
206
- Typical results in `.last-auto-extract.txt` include:
255
+ - Round-robin credential selection across accounts
256
+ - Background token refresh every 10 minutes
257
+ - Automatic quota/rate-limit detection and per-account backoff
258
+ - Import from `~/.codex/auth.json` or Cockpit Tools
207
259
 
208
- - `status: finished`
209
- - `result: saved_memory`
210
- - `result: nothing_worth_saving`
211
- - `completionReason: child_exit` or `completionReason: session_end_detected`
260
+ See `/codex` commands above. Stored in `~/.lsd/agent/codex-accounts.json`.
212
261
 
213
262
  ---
214
263
 
215
- ## Core ways to use LSD
264
+ ## Voice input
216
265
 
217
- ## 1. Interactive TUI
266
+ LSD supports voice input via microphone:
218
267
 
219
- The default `lsd` experience is an interactive terminal UI with:
268
+ - **macOS** uses a compiled Swift speech recognizer (built automatically on first use via `swiftc`)
269
+ - **Linux** — uses a Python speech recognizer (requires `GROQ_API_KEY` and `python3` with `sounddevice`)
220
270
 
221
- - message history
222
- - tool execution rendering
223
- - slash commands
224
- - model switching
225
- - sessions
226
- - background process management
227
- - settings
271
+ Toggle with `/voice` or the keyboard shortcut `Ctrl+Alt+V`.
228
272
 
229
- Useful built-in commands include:
273
+ ---
230
274
 
231
- - `/model`
232
- - `/login`
233
- - `/settings`
234
- - `/hotkeys`
235
- - `/cache-timer`
236
- - `/clear`
237
- - `/exit`
238
- - `/thinking`
239
- - `/voice`
275
+ ## Usage tracking
240
276
 
241
- A few quality-of-life touches in the TUI:
277
+ Track token consumption and cost across sessions:
242
278
 
243
- - the footer can show a live cache timer for the current prompt-cache window
244
- - `/hotkeys` gives you a full shortcut reference on demand
245
- - `/settings` now includes toggles for Codex rotate, the cache timer, **Pin last prompt**, RTK shell-command compression, and a configurable **Main accent** preset
246
- - changing the main accent also updates accent-driven UI elements and the text input border across thinking levels
247
- - when **Pin last prompt** is enabled, LSD keeps your most recent non-command prompt visible above the editor as a lightweight reminder
279
+ ```bash
280
+ /usage # today, grouped by model
281
+ /usage 7d # last 7 days
282
+ /usage 2024-03-01 # specific date
283
+ /usage today --by project-model # by project + model
284
+ /usage --all-projects # across all projects
285
+ /usage --json # machine-readable output
286
+ ```
248
287
 
249
- Some workflow/automation commands still use the legacy namespace:
288
+ ---
250
289
 
251
- - `/gsd`
252
- - `/gsd auto`
253
- - `/gsd status`
254
- - `/gsd config`
255
- - `/gsd doctor`
256
- - `/gsd update`
290
+ ## Telegram integration
257
291
 
258
- ## 2. Headless mode
292
+ LSD can relay permission prompts and questions to a Telegram chat while running autonomously. Reply from your phone and LSD continues.
259
293
 
260
- Run LSD without the TUI for CI, scripts, or automation:
294
+ ### Step 1 create a Telegram bot
261
295
 
262
- ```bash
263
- lsd headless
264
- lsd headless next
265
- lsd headless status
266
- ```
296
+ 1. Open Telegram and search for **@BotFather**
297
+ 2. Send `/newbot` and follow the prompts
298
+ 3. Copy the **bot token** (looks like `123456789:ABCdefGHI...`)
267
299
 
268
- Examples:
300
+ ### Step 2 — get your chat ID
269
301
 
270
- ```bash
271
- lsd headless --timeout 60000 auto
272
- lsd headless --output-format json auto
273
- lsd headless --json status
274
- ```
302
+ **Easiest:** forward any message to **@userinfobot** — it replies with your chat ID.
303
+
304
+ **Alternative:** open `https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates` after sending your bot a message — look for `"chat":{"id":...}` in the response.
275
305
 
276
- ## 3. Web UI
306
+ Group chat IDs are negative numbers starting with `-100` (e.g. `-1001234567890`).
277
307
 
278
- Run LSD with a browser interface:
308
+ ### Step 3 connect
279
309
 
280
310
  ```bash
311
+ /lsd remote telegram
281
312
  ```
282
313
 
283
- This is useful for local dashboards, session monitoring, and browser-based interaction.
314
+ LSD prompts for your bot token and chat ID, validates both, and sends a test message.
284
315
 
285
- ## 4. Worktree workflow
316
+ You can also connect during initial setup with `lsd config`.
286
317
 
287
- LSD supports isolated git worktrees for parallel streams of work:
318
+ ### Step 4 verify
288
319
 
289
320
  ```bash
290
- lsd -w my-feature
291
- lsd worktree list
292
- lsd worktree merge my-feature
293
- lsd worktree clean
321
+ /lsd remote status
294
322
  ```
295
323
 
296
- ---
324
+ ### Disconnect
297
325
 
298
- ## Features
326
+ ```bash
327
+ /lsd remote disconnect
328
+ ```
299
329
 
300
- ## Coding + shell tools
330
+ ### PREFERENCES.md reference
301
331
 
302
- LSD includes file and shell tools such as:
332
+ ```yaml
333
+ remote_questions:
334
+ channel: telegram
335
+ channel_id: "-1001234567890"
336
+ timeout_minutes: 5 # 1–30, how long LSD waits for a reply
337
+ poll_interval_seconds: 5 # 2–30, how often LSD polls
338
+ ```
303
339
 
304
- - `read`, `write`, `edit`
305
- - `bash`
306
- - `async_bash`
307
- - `bg_shell`
308
- - LSP-backed navigation and diagnostics (hover, definition, references, rename, code actions, formatting)
309
- - Language server auto-detection — run `/setup` to install missing servers for your project (TypeScript, Python, Go, Rust, and more)
340
+ Stored in `~/.lsd/PREFERENCES.md`. Project-level overrides go in `.lsd/PREFERENCES.md`.
310
341
 
311
- ## Browser automation
312
-
313
- Browser tools support:
342
+ ---
314
343
 
315
- - local app verification
316
- - screenshots
317
- - assertions
318
- - form filling
319
- - DOM inspection
320
- - interaction recording and debug bundles
344
+ ## Discord & Slack integration
321
345
 
322
- ## Web research
346
+ Same flow as Telegram — run `/lsd remote discord` or `/lsd remote slack`. Both support:
323
347
 
324
- LSD supports:
348
+ - bot token validation
349
+ - channel auto-discovery (Discord lists your servers and channels; Slack lists channels)
350
+ - manual channel ID entry as fallback
351
+ - test message on connect
325
352
 
326
- - Google-backed search (`google_search`)
327
- - Brave/Tavily-style web search flows
328
- - page extraction
329
- - combined search-and-read workflows
330
- - Context7 library docs lookup
353
+ ---
331
354
 
332
355
  ## MCP integrations
333
356
 
334
- LSD can discover and connect to MCP servers configured in the project:
357
+ LSD discovers and connects to MCP servers configured in:
335
358
 
336
359
  - `.mcp.json`
337
360
  - `.lsd/mcp.json`
338
361
 
362
+ Use `/configs` inside a session to scan for MCP servers from other AI tools (Claude Code, Cursor, Copilot, etc.) and import them.
363
+
364
+ ---
365
+
339
366
  ## Sessions
340
367
 
341
368
  LSD stores per-project sessions and can resume prior work.
342
369
 
343
- Browse sessions with:
370
+ ```bash
371
+ lsd sessions # browse and pick a session to resume
372
+ lsd -c # resume the most recent session automatically
373
+ ```
374
+
375
+ ---
376
+
377
+ ## Worktrees
378
+
379
+ LSD supports isolated git worktrees for parallel streams of work:
344
380
 
345
381
  ```bash
346
- lsd sessions
382
+ lsd -w # auto-named worktree
383
+ lsd -w my-feature # named worktree
384
+ lsd worktree list # list with status
385
+ lsd worktree merge my-feature # squash-merge into main
386
+ lsd worktree clean # remove merged/empty worktrees
387
+ lsd worktree remove NAME # remove specific worktree
347
388
  ```
348
389
 
349
- ## Extensions, themes, and skills
390
+ Lifecycle:
391
+ 1. `lsd -w` — creates worktree, starts session inside it
392
+ 2. Work normally — all changes stay on the worktree branch
393
+ 3. Exit — dirty work is auto-committed
394
+ 4. `lsd -w` — resume where you left off
395
+ 5. `lsd worktree merge` — squash-merge into main when done
396
+
397
+ ---
398
+
399
+ ## Headless mode
400
+
401
+ Run LSD without the TUI for CI, scripts, or automation:
350
402
 
351
- LSD supports:
403
+ ```bash
404
+ lsd headless # run auto mode
405
+ lsd headless next # run one unit
406
+ lsd headless status # show queue status
407
+ lsd headless --json auto # JSONL event stream
408
+ lsd headless --output-format json auto # structured JSON result
409
+ lsd headless --timeout 60000 auto # with 1-minute timeout
410
+ lsd headless --bare auto # skip lsd.md/CLAUDE.md/settings
411
+ lsd headless --resume abc123 auto # resume a prior session
412
+ lsd headless --supervised auto # orchestrator mode
413
+ lsd headless --answers answers.json auto # pre-supply answers/secrets
414
+ lsd headless new-milestone --context spec.md # create milestone from file
415
+ lsd headless new-milestone --context spec.md --auto # create + execute
416
+ ```
352
417
 
353
- - extensions
354
- - themes
355
- - skills
356
- - prompt templates
357
- - package-like installs from supported sources
418
+ Exit codes: `0` success, `1` error/timeout, `10` blocked, `11` cancelled.
358
419
 
359
420
  ---
360
421
 
361
- ## Configuration paths
422
+ ## Browser automation
423
+
424
+ LSD includes full browser automation via Playwright:
425
+
426
+ - local app verification and screenshots
427
+ - form filling and interaction
428
+ - DOM inspection and accessibility tree
429
+ - assertions and debug bundles
430
+ - network request inspection
431
+ - device emulation
432
+
433
+ ---
434
+
435
+ ## LSP code intelligence
436
+
437
+ LSD includes a first-class `lsp` tool for semantic code navigation in typed codebases.
438
+
439
+ Use it for:
440
+
441
+ - go-to-definition
442
+ - find references and implementations
443
+ - hover/type info
444
+ - workspace and file symbols
445
+ - incoming/outgoing calls
446
+ - diagnostics and quick fixes
447
+ - formatting and safe rename operations
362
448
 
363
- ### User-level
449
+ ### Why LSP is good
364
450
 
365
- LSD stores global state under:
451
+ Unlike raw text search, LSP understands symbols, types, scopes, and project structure. That means the agent can:
452
+
453
+ - jump to the right definition instead of matching the wrong string
454
+ - find real references across the codebase
455
+ - inspect function signatures and docs without reading huge files
456
+ - catch type errors immediately after edits
457
+ - apply safer refactors like rename and format
458
+
459
+ In practice this makes the agent faster, more accurate, and less likely to break typed projects during navigation or refactors.
460
+
461
+ ### Typical LSP usage
366
462
 
367
463
  ```text
368
- ~/.lsd/
464
+ lsp definition # jump to a symbol definition
465
+ lsp references # find where a symbol is used
466
+ lsp hover # inspect type/docs at a position
467
+ lsp diagnostics # check errors in a file or workspace
468
+ lsp rename # perform a semantic rename
469
+ lsp format # format a file with the language server
470
+ lsp status # show installed/active language servers
369
471
  ```
370
472
 
371
- Typical contents include:
473
+ ### In LSD sessions
474
+
475
+ LSD prefers `lsp` over grep/find for typed codebases when a language server is available.
476
+
477
+ If a server is missing, run:
478
+
479
+ ```bash
480
+ /setup
481
+ ```
482
+
483
+ or inspect status with:
372
484
 
373
485
  ```text
374
- ~/.lsd/
375
- agent/
376
- auth.json
377
- settings.json
378
- extensions/
379
- agents/
380
- sessions/
486
+ lsp status
381
487
  ```
382
488
 
383
- ### Project-level
489
+ ---
384
490
 
385
- Per-project state lives in:
491
+ ## RTK shell compression
386
492
 
387
- ```text
388
- .lsd/
493
+ LSD supports **RTK** for shell-command compression.
494
+
495
+ RTK rewrites certain shell commands into a more compact representation before they run, which helps reduce repetitive terminal output in agent context.
496
+
497
+ ### Why RTK is good
498
+
499
+ RTK is useful when the agent or a background shell runs lots of repetitive commands like:
500
+
501
+ - `git status`
502
+ - `git diff`
503
+ - test runs
504
+ - package-manager commands
505
+ - other high-noise shell commands
506
+
507
+ Benefits:
508
+
509
+ - saves context tokens
510
+ - reduces noisy terminal output
511
+ - keeps long sessions cleaner
512
+ - lets the agent spend more context on code and reasoning instead of duplicated shell text
513
+
514
+ When active, LSD can also surface session savings like how many tokens RTK saved.
515
+
516
+ ### Enable RTK
517
+
518
+ Turn it on in `/settings` by enabling **RTK**.
519
+
520
+ You can also enable it in preferences:
521
+
522
+ ```yaml
523
+ experimental:
524
+ rtk: true
389
525
  ```
390
526
 
391
- Depending on your workflow, this may contain plan files, state files, generated artifacts, and project-local config.
527
+ RTK requires a restart after toggling.
528
+
529
+ ### Where RTK helps most
530
+
531
+ RTK is most valuable in long-running sessions, background shell workflows, and repos where the agent repeatedly checks git state, runs tests, or invokes build tooling.
392
532
 
393
533
  ---
394
534
 
395
- ## Common commands
535
+ ## Web research
396
536
 
397
- ### Main CLI
537
+ - Google-backed search (`google_search`)
538
+ - Brave / Tavily web search
539
+ - Page extraction via Jina
540
+ - Context7 library docs lookup (`/context7`)
398
541
 
399
- ```bash
400
- lsd # start interactive session
401
- lsd -c # resume last session
402
- lsd --print "..." # one-shot mode
403
- lsd --list-models # list available models
404
- lsd --mode mcp # run as MCP server
405
- ```
542
+ ---
406
543
 
407
- ### Setup + maintenance
544
+ ## Extensions, themes, and skills
545
+
546
+ LSD supports a package-like extension system:
408
547
 
409
548
  ```bash
410
- lsd config # re-run setup wizard
411
- lsd update # update LSD
412
- lsd sessions # browse saved sessions
549
+ lsd install <source> # install extension/theme/skill
550
+ lsd remove <source> # remove
551
+ lsd list # list installed packages
413
552
  ```
414
553
 
415
- ### Worktrees
554
+ Sources: `npm:@scope/pkg`, `git:github.com/user/repo`, `https://...`, local paths.
416
555
 
417
- ```bash
418
- lsd -w # create/resume worktree session
419
- lsd worktree list
420
- lsd worktree merge NAME
421
- lsd worktree clean
422
- lsd worktree remove NAME
556
+ Bundled extensions include: memory, remote-questions, browser-tools, subagent, codex-rotate, usage, voice, bg-shell, async-jobs, context7, universal-config, search-the-web, cache-timer, mac-tools, aws-auth.
557
+
558
+ ---
559
+
560
+ ## Configuration reference
561
+
562
+ ### PREFERENCES.md
563
+
564
+ Stored in `~/.lsd/PREFERENCES.md` (global) or `.lsd/PREFERENCES.md` (project). YAML frontmatter:
565
+
566
+ ```yaml
567
+ ---
568
+ search_provider: tavily # tavily | brave | ollama | native | auto
569
+ remote_questions:
570
+ channel: telegram # telegram | discord | slack
571
+ channel_id: "-1001234567890"
572
+ timeout_minutes: 5
573
+ poll_interval_seconds: 5
574
+ experimental:
575
+ rtk: true # RTK shell-command compression
576
+ codex_rotate: true # Codex multi-account rotation
577
+ subagent:
578
+ budget_model: claude-haiku-4 # model used for memory/subagent background work
579
+ cmux:
580
+ enabled: false
581
+ notifications: false
582
+ ---
423
583
  ```
424
584
 
425
- ### Headless
585
+ ### settings.json
426
586
 
427
- ```bash
428
- lsd headless
429
- lsd headless next
430
- lsd headless status
431
- lsd headless --json auto
587
+ Located at `~/.lsd/agent/settings.json`. Editable via `/settings` in the TUI. Includes model preferences, UI toggles (cache timer, pin last prompt, accent color), and `budgetSubagentModel`.
588
+
589
+ ### auth.json
590
+
591
+ Located at `~/.lsd/agent/auth.json`. Stores provider API keys and OAuth tokens. Modified by `/login` and `/codex add`.
592
+
593
+ ### Configuration paths
594
+
595
+ ```text
596
+ ~/.lsd/
597
+ agent/
598
+ auth.json API keys + OAuth tokens
599
+ settings.json UI + model preferences
600
+ extensions/ Installed extensions
601
+ agents/ Custom agent definitions
602
+ sessions/ Saved sessions (all projects)
603
+ projects/
604
+ <project>/
605
+ memory/ Persistent memory files
606
+ PREFERENCES.md Global preferences
607
+ ```
608
+
609
+ ```text
610
+ .lsd/ Per-project state
611
+ PREFERENCES.md Project-level preference overrides
612
+ mcp.json Project MCP servers
432
613
  ```
433
614
 
434
615
  ---
435
616
 
436
- ## Slash-command compatibility
617
+ ## Full CLI reference
437
618
 
438
- Inside the session, you may still see legacy commands such as:
619
+ ```bash
620
+ lsd # interactive session
621
+ lsd -c # resume last session
622
+ lsd --continue # resume last session (long form)
623
+ lsd --print "..." # one-shot mode
624
+ lsd -w [name] # worktree session
625
+ lsd --model <id> # override model
626
+ lsd --sandbox <mode> # sandbox mode: none | workspace-write | auto
627
+ lsd --no-sandbox # disable sandbox
628
+ lsd --no-session # disable session persistence
629
+ lsd --extension <path> # load extra extension
630
+ lsd --tools a,b,c # restrict available tools
631
+ lsd --list-models [search] # list available models
632
+ lsd --version # print version
633
+ lsd --help # print help
634
+ lsd --mode <text|json|rpc|mcp> # output mode
635
+
636
+ lsd config # re-run setup wizard
637
+ lsd update # update to latest version
638
+ lsd sessions # browse saved sessions
639
+ lsd install <source> # install package/extension
640
+ lsd remove <source> # remove installed package
641
+ lsd list # list installed packages
642
+ lsd worktree list # list worktrees
643
+ lsd worktree merge [name] # merge worktree into main
644
+ lsd worktree clean # remove merged/empty worktrees
645
+ lsd worktree remove <name> # remove specific worktree
646
+ lsd headless [cmd] [flags] # headless mode (see above)
647
+ ```
648
+
649
+ ---
439
650
 
440
- - `/gsd auto`
441
- - `/gsd status`
442
- - `/gsd config`
443
- - `/gsd doctor`
444
- - `/gsd queue`
651
+ ## Naming note
445
652
 
446
- These remain usable, but the product branding is LSD.
653
+ LSD evolved from GSD 2, but the product, docs, and recommended workflows are LSD-first. Prefer:
447
654
 
448
- If you are rewriting docs or onboarding material, prefer:
655
+ - `lsd` binary
656
+ - `.lsd/` — project state
657
+ - `~/.lsd/` — global state
658
+ - `/lsd remote` — remote questions
659
+ - `/help` — live in-session command reference
449
660
 
450
- - **LSD** for the product name
451
- - **`lsd`** for the command
452
- - **`.lsd/`** for project state
453
- - **`~/.lsd/`** for global state
661
+ Any remaining `/gsd` surfaces should be treated as compatibility aliases, not the primary workflow.
454
662
 
455
663
  ---
456
664
 
457
665
  ## Documentation
458
666
 
459
- See the local docs in [`docs/`](./docs/) for deeper details.
460
-
461
- Recommended starting points:
667
+ See [`docs/`](./docs/) for deeper details:
462
668
 
463
669
  - [Getting Started](./docs/getting-started.md)
464
670
  - [Commands Reference](./docs/commands.md)
@@ -469,34 +675,15 @@ Recommended starting points:
469
675
  - [Skills](./docs/skills.md)
470
676
  - [Custom Models](./docs/custom-models.md)
471
677
 
472
- > Note: parts of the docs may still contain older GSD wording. The README reflects the intended LSD-facing product language.
473
-
474
678
  ---
475
679
 
476
680
  ## Development
477
681
 
478
- Build the repo:
479
-
480
- ```bash
481
- npm run build
482
- ```
483
-
484
- Link the local CLI globally:
485
-
486
- ```bash
487
- npm link
488
- ```
489
-
490
- Run the dev CLI:
491
-
492
- ```bash
493
- npm run gsd
494
- ```
495
-
496
- Run tests:
497
-
498
682
  ```bash
499
- npm test
683
+ npm run build # build
684
+ npm link # link local CLI globally
685
+ npm run gsd # run dev CLI
686
+ npm test # run tests
500
687
  ```
501
688
 
502
689
  ---