lsd-pi 1.1.5 → 1.1.8
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.
- package/README.md +477 -290
- package/dist/app-paths.js +1 -1
- package/dist/cli.js +25 -25
- package/dist/headless-context.d.ts +3 -2
- package/dist/headless-context.js +7 -5
- package/dist/headless-ui.js +2 -0
- package/dist/headless.d.ts +2 -2
- package/dist/headless.js +19 -18
- package/dist/help-text.js +45 -45
- package/dist/models-resolver.d.ts +7 -6
- package/dist/models-resolver.js +11 -10
- package/dist/onboarding.js +16 -13
- package/dist/resources/extensions/async-jobs/await-tool.js +28 -5
- package/dist/resources/extensions/bg-shell/bg-shell-lifecycle.js +27 -60
- package/dist/resources/extensions/bg-shell/bg-shell-tool.js +1 -6
- package/dist/resources/extensions/bg-shell/process-manager.js +4 -42
- package/dist/resources/extensions/bg-shell/utilities.js +0 -13
- package/dist/resources/extensions/cache-timer/index.js +2 -1
- package/dist/resources/extensions/mcp-client/index.js +257 -41
- package/dist/resources/extensions/memory/auto-extract.js +39 -6
- package/dist/resources/extensions/memory/dream.js +86 -19
- package/dist/resources/extensions/remote-questions/index.js +13 -34
- package/dist/resources/extensions/search-the-web/provider.js +2 -2
- package/dist/resources/extensions/slash-commands/audit.js +5 -5
- package/dist/resources/extensions/slash-commands/plan.js +149 -33
- package/dist/resources/extensions/subagent/index.js +9 -94
- package/dist/resources/extensions/universal-config/scanners.js +2 -2
- package/dist/resources/extensions/usage-tips/extension-manifest.json +12 -0
- package/dist/resources/extensions/usage-tips/index.js +12 -0
- package/dist/resources/skills/lsd-guide/INSTALLATION.md +202 -0
- package/dist/resources/skills/lsd-guide/README.md +264 -0
- package/dist/resources/skills/lsd-guide/SKILL.md +197 -0
- package/dist/resources/skills/lsd-guide/metadata.json +30 -0
- package/dist/resources/skills/lsd-guide/references/auto-mode.md +322 -0
- package/dist/resources/skills/lsd-guide/references/commands.md +373 -0
- package/dist/resources/skills/lsd-guide/references/configuration.md +505 -0
- package/dist/resources/skills/lsd-guide/references/getting-started.md +214 -0
- package/dist/resources/skills/lsd-guide/references/skills.md +357 -0
- package/dist/resources/skills/lsd-guide/references/subagents.md +359 -0
- package/dist/resources/skills/lsd-guide/references/troubleshooting.md +617 -0
- package/dist/resources/skills/lsd-models/README.md +279 -0
- package/dist/resources/skills/lsd-models/SKILL.md +502 -0
- package/dist/resources/skills/lsd-models/metadata.json +19 -0
- package/dist/rtk.js +1 -1
- package/dist/welcome-screen.js +43 -14
- package/dist/worktree-cli.d.ts +1 -1
- package/dist/worktree-cli.js +16 -15
- package/package.json +2 -2
- package/packages/daemon/src/config.ts +14 -4
- package/packages/daemon/src/orchestrator.ts +8 -5
- package/packages/daemon/src/project-scanner.ts +2 -1
- package/packages/mcp-server/src/server.ts +7 -6
- package/packages/pi-coding-agent/dist/core/agent-session.clear-queue.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/agent-session.clear-queue.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/agent-session.clear-queue.test.js +46 -0
- package/packages/pi-coding-agent/dist/core/agent-session.clear-queue.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/agent-session.js +44 -3
- package/packages/pi-coding-agent/dist/core/agent-session.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry.js +8 -0
- package/packages/pi-coding-agent/dist/core/model-registry.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.d.ts +9 -0
- package/packages/pi-coding-agent/dist/core/settings-manager.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.js +34 -0
- package/packages/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/slash-commands.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/slash-commands.js +1 -0
- package/packages/pi-coding-agent/dist/core/slash-commands.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/assistant-message.js +31 -24
- package/packages/pi-coding-agent/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/bash-execution.js +3 -9
- package/packages/pi-coding-agent/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/embedded-terminal.d.ts +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/embedded-terminal.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/embedded-terminal.js +10 -2
- package/packages/pi-coding-agent/dist/modes/interactive/components/embedded-terminal.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts +7 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +34 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +55 -24
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/user-message.d.ts +2 -5
- package/packages/pi-coding-agent/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/user-message.js +4 -13
- package/packages/pi-coding-agent/dist/modes/interactive/components/user-message.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.d.ts +2 -0
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js +4 -3
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +8 -0
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js +86 -5
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.js +157 -0
- package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.js.map +1 -1
- package/packages/pi-coding-agent/package.json +1 -1
- package/packages/pi-coding-agent/src/core/agent-session.clear-queue.test.ts +50 -0
- package/packages/pi-coding-agent/src/core/agent-session.ts +49 -3
- package/packages/pi-coding-agent/src/core/model-registry.ts +10 -0
- package/packages/pi-coding-agent/src/core/settings-manager.ts +46 -0
- package/packages/pi-coding-agent/src/core/slash-commands.ts +1 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/assistant-message.ts +31 -27
- package/packages/pi-coding-agent/src/modes/interactive/components/bash-execution.ts +3 -11
- package/packages/pi-coding-agent/src/modes/interactive/components/embedded-terminal.ts +11 -2
- package/packages/pi-coding-agent/src/modes/interactive/components/footer.ts +1 -1
- package/packages/pi-coding-agent/src/modes/interactive/components/settings-selector.ts +43 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/tool-execution.ts +57 -27
- package/packages/pi-coding-agent/src/modes/interactive/components/user-message.ts +5 -19
- package/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.ts +7 -3
- package/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +97 -5
- package/packages/pi-coding-agent/src/modes/interactive/slash-command-handlers.ts +185 -0
- package/packages/pi-tui/dist/components/__tests__/editor-dropped-image.test.d.ts +2 -0
- package/packages/pi-tui/dist/components/__tests__/editor-dropped-image.test.d.ts.map +1 -0
- package/packages/pi-tui/dist/components/__tests__/editor-dropped-image.test.js +105 -0
- package/packages/pi-tui/dist/components/__tests__/editor-dropped-image.test.js.map +1 -0
- package/packages/pi-tui/dist/components/editor.d.ts +6 -0
- package/packages/pi-tui/dist/components/editor.d.ts.map +1 -1
- package/packages/pi-tui/dist/components/editor.js +74 -3
- package/packages/pi-tui/dist/components/editor.js.map +1 -1
- package/packages/pi-tui/dist/components/loader.d.ts.map +1 -1
- package/packages/pi-tui/dist/components/loader.js +2 -2
- package/packages/pi-tui/dist/components/loader.js.map +1 -1
- package/packages/pi-tui/src/components/editor.ts +82 -3
- package/packages/pi-tui/src/components/loader.ts +2 -2
- package/pkg/package.json +1 -1
- package/src/resources/extensions/async-jobs/await-tool.test.ts +143 -115
- package/src/resources/extensions/async-jobs/await-tool.ts +144 -124
- package/src/resources/extensions/bg-shell/bg-shell-lifecycle.ts +26 -68
- package/src/resources/extensions/bg-shell/bg-shell-tool.ts +0 -8
- package/src/resources/extensions/bg-shell/process-manager.ts +5 -45
- package/src/resources/extensions/bg-shell/types.ts +0 -15
- package/src/resources/extensions/bg-shell/utilities.ts +0 -14
- package/src/resources/extensions/cache-timer/index.ts +2 -1
- package/src/resources/extensions/mcp-client/index.ts +677 -434
- package/src/resources/extensions/memory/auto-extract.ts +38 -6
- package/src/resources/extensions/memory/dream.ts +88 -21
- package/src/resources/extensions/memory/tests/auto-extract.test.ts +10 -1
- package/src/resources/extensions/remote-questions/index.ts +34 -60
- package/src/resources/extensions/search-the-web/provider.ts +2 -2
- package/src/resources/extensions/slash-commands/audit.ts +5 -5
- package/src/resources/extensions/slash-commands/plan.ts +192 -37
- package/src/resources/extensions/subagent/index.ts +9 -110
- package/src/resources/extensions/universal-config/scanners.ts +527 -527
- package/src/resources/extensions/usage-tips/extension-manifest.json +12 -0
- package/src/resources/extensions/usage-tips/index.ts +16 -0
- package/src/resources/skills/lsd-guide/INSTALLATION.md +202 -0
- package/src/resources/skills/lsd-guide/README.md +264 -0
- package/src/resources/skills/lsd-guide/SKILL.md +197 -0
- package/src/resources/skills/lsd-guide/metadata.json +30 -0
- package/src/resources/skills/lsd-guide/references/auto-mode.md +322 -0
- package/src/resources/skills/lsd-guide/references/commands.md +373 -0
- package/src/resources/skills/lsd-guide/references/configuration.md +505 -0
- package/src/resources/skills/lsd-guide/references/getting-started.md +214 -0
- package/src/resources/skills/lsd-guide/references/skills.md +357 -0
- package/src/resources/skills/lsd-guide/references/subagents.md +359 -0
- package/src/resources/skills/lsd-guide/references/troubleshooting.md +617 -0
- package/src/resources/skills/lsd-models/README.md +279 -0
- package/src/resources/skills/lsd-models/SKILL.md +502 -0
- package/src/resources/skills/lsd-models/metadata.json +19 -0
package/README.md
CHANGED
|
@@ -1,33 +1,25 @@
|
|
|
1
|
-
<div align="center">
|
|
2
|
-
|
|
3
1
|
# LSD
|
|
4
2
|
|
|
5
|
-
**
|
|
6
|
-
|
|
7
|
-
[](https://www.npmjs.com/package/lsd-pi)
|
|
8
|
-
[](https://www.npmjs.com/package/lsd-pi)
|
|
9
|
-
[](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
|
-
|
|
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
|
+

|
|
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
|
|
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
|
-
|
|
78
|
+
---
|
|
135
79
|
|
|
136
|
-
|
|
137
|
-
lsd --continue
|
|
138
|
-
# or
|
|
139
|
-
lsd -c
|
|
140
|
-
```
|
|
80
|
+
## First launch
|
|
141
81
|
|
|
142
|
-
|
|
82
|
+
On first run, LSD opens an interactive setup wizard for:
|
|
143
83
|
|
|
144
|
-
|
|
145
|
-
|
|
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
|
-
|
|
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 -
|
|
156
|
-
lsd
|
|
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
|
-
##
|
|
125
|
+
## Context files (lsd.md / CLAUDE.md / AGENTS.md)
|
|
162
126
|
|
|
163
|
-
|
|
127
|
+
LSD automatically loads project instructions from these files (in order of preference):
|
|
164
128
|
|
|
165
|
-
-
|
|
166
|
-
-
|
|
167
|
-
-
|
|
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
|
-
|
|
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
|
-
|
|
135
|
+
The `--bare` flag suppresses all of these (useful for CI):
|
|
173
136
|
|
|
174
137
|
```bash
|
|
175
|
-
lsd
|
|
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
|
+

|
|
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
|
|
238
|
+
LSD includes a built-in **persistent memory** extension.
|
|
183
239
|
|
|
184
|
-
|
|
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
|
-
|
|
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
|
-
|
|
246
|
+
- `.last-auto-extract.txt` — latest status (`saved_memory`, `nothing_worth_saving`, etc.)
|
|
247
|
+
- `.last-auto-extract.log` — extractor stdout/stderr
|
|
195
248
|
|
|
196
|
-
|
|
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
|
-
|
|
251
|
+
## Codex multi-account rotation
|
|
202
252
|
|
|
203
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
264
|
+
## Voice input
|
|
216
265
|
|
|
217
|
-
|
|
266
|
+
LSD supports voice input via microphone:
|
|
218
267
|
|
|
219
|
-
|
|
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
|
-
|
|
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
|
-
|
|
273
|
+
---
|
|
230
274
|
|
|
231
|
-
|
|
232
|
-
- `/login`
|
|
233
|
-
- `/settings`
|
|
234
|
-
- `/hotkeys`
|
|
235
|
-
- `/cache-timer`
|
|
236
|
-
- `/clear`
|
|
237
|
-
- `/exit`
|
|
238
|
-
- `/thinking`
|
|
239
|
-
- `/voice`
|
|
275
|
+
## Usage tracking
|
|
240
276
|
|
|
241
|
-
|
|
277
|
+
Track token consumption and cost across sessions:
|
|
242
278
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
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
|
-
|
|
288
|
+
---
|
|
250
289
|
|
|
251
|
-
|
|
252
|
-
- `/gsd auto`
|
|
253
|
-
- `/gsd status`
|
|
254
|
-
- `/gsd config`
|
|
255
|
-
- `/gsd doctor`
|
|
256
|
-
- `/gsd update`
|
|
290
|
+
## Telegram integration
|
|
257
291
|
|
|
258
|
-
|
|
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
|
-
|
|
294
|
+
### Step 1 — create a Telegram bot
|
|
261
295
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
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
|
-
|
|
300
|
+
### Step 2 — get your chat ID
|
|
269
301
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
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
|
-
|
|
306
|
+
Group chat IDs are negative numbers starting with `-100` (e.g. `-1001234567890`).
|
|
277
307
|
|
|
278
|
-
|
|
308
|
+
### Step 3 — connect
|
|
279
309
|
|
|
280
310
|
```bash
|
|
311
|
+
/lsd remote telegram
|
|
281
312
|
```
|
|
282
313
|
|
|
283
|
-
|
|
314
|
+
LSD prompts for your bot token and chat ID, validates both, and sends a test message.
|
|
284
315
|
|
|
285
|
-
|
|
316
|
+
You can also connect during initial setup with `lsd config`.
|
|
286
317
|
|
|
287
|
-
|
|
318
|
+
### Step 4 — verify
|
|
288
319
|
|
|
289
320
|
```bash
|
|
290
|
-
lsd
|
|
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
|
-
|
|
326
|
+
```bash
|
|
327
|
+
/lsd remote disconnect
|
|
328
|
+
```
|
|
299
329
|
|
|
300
|
-
|
|
330
|
+
### PREFERENCES.md reference
|
|
301
331
|
|
|
302
|
-
|
|
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
|
-
-
|
|
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
|
-
|
|
312
|
-
|
|
313
|
-
Browser tools support:
|
|
342
|
+
---
|
|
314
343
|
|
|
315
|
-
|
|
316
|
-
- screenshots
|
|
317
|
-
- assertions
|
|
318
|
-
- form filling
|
|
319
|
-
- DOM inspection
|
|
320
|
-
- interaction recording and debug bundles
|
|
344
|
+
## Discord & Slack integration
|
|
321
345
|
|
|
322
|
-
|
|
346
|
+
Same flow as Telegram — run `/lsd remote discord` or `/lsd remote slack`. Both support:
|
|
323
347
|
|
|
324
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
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
|
-
###
|
|
449
|
+
### Why LSP is good
|
|
364
450
|
|
|
365
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
375
|
-
agent/
|
|
376
|
-
auth.json
|
|
377
|
-
settings.json
|
|
378
|
-
extensions/
|
|
379
|
-
agents/
|
|
380
|
-
sessions/
|
|
486
|
+
lsp status
|
|
381
487
|
```
|
|
382
488
|
|
|
383
|
-
|
|
489
|
+
---
|
|
384
490
|
|
|
385
|
-
|
|
491
|
+
## RTK shell compression
|
|
386
492
|
|
|
387
|
-
|
|
388
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
535
|
+
## Web research
|
|
396
536
|
|
|
397
|
-
|
|
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
|
-
|
|
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
|
-
|
|
544
|
+
## Extensions, themes, and skills
|
|
545
|
+
|
|
546
|
+
LSD supports a package-like extension system:
|
|
408
547
|
|
|
409
548
|
```bash
|
|
410
|
-
lsd
|
|
411
|
-
lsd
|
|
412
|
-
lsd
|
|
549
|
+
lsd install <source> # install extension/theme/skill
|
|
550
|
+
lsd remove <source> # remove
|
|
551
|
+
lsd list # list installed packages
|
|
413
552
|
```
|
|
414
553
|
|
|
415
|
-
|
|
554
|
+
Sources: `npm:@scope/pkg`, `git:github.com/user/repo`, `https://...`, local paths.
|
|
416
555
|
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
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
|
-
###
|
|
585
|
+
### settings.json
|
|
426
586
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
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
|
-
##
|
|
617
|
+
## Full CLI reference
|
|
437
618
|
|
|
438
|
-
|
|
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
|
-
|
|
441
|
-
- `/gsd status`
|
|
442
|
-
- `/gsd config`
|
|
443
|
-
- `/gsd doctor`
|
|
444
|
-
- `/gsd queue`
|
|
651
|
+
## Naming note
|
|
445
652
|
|
|
446
|
-
|
|
653
|
+
LSD evolved from GSD 2, but the product, docs, and recommended workflows are LSD-first. Prefer:
|
|
447
654
|
|
|
448
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
---
|