lazyclaw 3.88.0
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/LICENSE +21 -0
- package/README.md +186 -0
- package/cli.mjs +2648 -0
- package/config-validate.mjs +61 -0
- package/daemon.mjs +1451 -0
- package/logger.mjs +55 -0
- package/package.json +55 -0
- package/providers/anthropic.mjs +313 -0
- package/providers/cache.mjs +132 -0
- package/providers/fallback.mjs +90 -0
- package/providers/gemini.mjs +187 -0
- package/providers/ollama.mjs +148 -0
- package/providers/openai.mjs +243 -0
- package/providers/rates.mjs +85 -0
- package/providers/registry.mjs +144 -0
- package/providers/retry.mjs +103 -0
- package/ratelimit.mjs +65 -0
- package/rates-validate.mjs +58 -0
- package/sessions.mjs +177 -0
- package/skills.mjs +97 -0
- package/web/server.mjs +33 -0
- package/workflow/executor.mjs +358 -0
- package/workflow/persistent.mjs +369 -0
- package/workflow/summary.mjs +318 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Claude Control Center contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# ๐ฆ lazyclaw
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/lazyclaw)
|
|
4
|
+
[](./LICENSE)
|
|
5
|
+
[](https://nodejs.org/)
|
|
6
|
+
|
|
7
|
+
**A lazy, elegant terminal CLI for Claude / OpenAI / Gemini / Ollama.**
|
|
8
|
+
|
|
9
|
+
One Node CLI that talks to every major LLM provider, runs multi-step workflows as a DAG, exposes a local HTTP gateway, and ships with the niceties you actually want at the prompt: an ASCII banner on launch, Cursor-style slash-command ghost autocomplete (right-arrow accepts), persistent chat sessions, and cost rate cards.
|
|
10
|
+
|
|
11
|
+
> Part of the [LazyClaude](https://github.com/cmblir/LazyClaude) project โ published standalone so you can `npm i -g lazyclaw` without cloning the dashboard.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install -g lazyclaw
|
|
19
|
+
lazyclaw version
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Requires **Node 18+**. Works on macOS / Linux / WSL. Windows native PowerShell mostly works but the ghost-text + ANSI banner are TTY-gated and may fall back to plain prompts.
|
|
23
|
+
|
|
24
|
+
## First run
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
lazyclaw onboard # guided: provider, model, api-key
|
|
28
|
+
lazyclaw status # current provider/model + masked key
|
|
29
|
+
lazyclaw doctor # validate config + provider registry
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
`onboard` writes `~/.lazyclaw/config.json`. Move it with `LAZYCLAW_CONFIG_DIR=/elsewhere`. For automation: `--non-interactive --provider X --model Y --api-key Z`.
|
|
33
|
+
|
|
34
|
+
## Interactive chat
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
lazyclaw chat # banner + active provider/model + REPL
|
|
38
|
+
lazyclaw chat --pick # arrow-key picker before the prompt
|
|
39
|
+
lazyclaw chat --session daily # persist turns to ~/.lazyclaw/sessions/daily.jsonl
|
|
40
|
+
lazyclaw chat --skill review,style # compose named skills as the system prompt
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
What you see on launch (TTY only):
|
|
44
|
+
|
|
45
|
+
```text
|
|
46
|
+
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
|
|
47
|
+
โ _ โ
|
|
48
|
+
โ | |__ _ _____ _ _ โ
|
|
49
|
+
โ | / _` |_ / || | '_| โ
|
|
50
|
+
โ |_\__,_/__\_, |_| โ
|
|
51
|
+
โ LazyClaw |__/ 3.88.0 โ
|
|
52
|
+
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
|
|
53
|
+
|
|
54
|
+
provider ยท anthropic
|
|
55
|
+
model ยท claude-opus-4-7
|
|
56
|
+
slash ยท /help ยท /model ยท /provider ยท /exit
|
|
57
|
+
hint ยท โ to accept the suggested command, Tab to cycle
|
|
58
|
+
|
|
59
|
+
โบ
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Slash commands inside the REPL:
|
|
63
|
+
|
|
64
|
+
| Slash | What it does |
|
|
65
|
+
|---|---|
|
|
66
|
+
| `/help` | List slash commands |
|
|
67
|
+
| `/status` | Print provider + model + masked key |
|
|
68
|
+
| `/provider X` | Switch active provider mid-session (history kept) |
|
|
69
|
+
| `/model X` | Switch model. Accepts unified `provider/model` form |
|
|
70
|
+
| `/skill a,b` | Replace the system prompt with a composition of named skills |
|
|
71
|
+
| `/usage` | Message count + chars + cumulative token totals |
|
|
72
|
+
| `/new` / `/reset` | Wipe history and start over |
|
|
73
|
+
| `/exit` | Quit |
|
|
74
|
+
|
|
75
|
+
**Cursor-style ghost autocomplete**: type `/` and the longest matching slash command appears in dim grey after the cursor. **`โ`** accepts; **`Tab`** cycles. **Ctrl-C** during a streaming reply aborts that turn (not the whole process); **Ctrl-C** at an empty prompt exits.
|
|
76
|
+
|
|
77
|
+
## One-shot (no REPL)
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
lazyclaw agent "summarize: $(cat file.md)"
|
|
81
|
+
lazyclaw agent - < prompt.txt # stdin
|
|
82
|
+
lazyclaw agent "..." --provider openai --model gpt-4.1
|
|
83
|
+
lazyclaw agent "..." --skill review # compose system prompt
|
|
84
|
+
lazyclaw agent "..." --usage # token counts on stderr
|
|
85
|
+
lazyclaw agent "..." --cost # USD when rates configured
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Providers / sessions / skills
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
lazyclaw providers list # all registered providers
|
|
92
|
+
lazyclaw providers info anthropic
|
|
93
|
+
lazyclaw providers test anthropic # 1-token reachability probe
|
|
94
|
+
|
|
95
|
+
lazyclaw sessions list # persisted chats
|
|
96
|
+
lazyclaw sessions show daily
|
|
97
|
+
lazyclaw sessions search "deploy"
|
|
98
|
+
lazyclaw sessions export daily > daily.md
|
|
99
|
+
lazyclaw sessions clear daily
|
|
100
|
+
|
|
101
|
+
lazyclaw skills list # markdown skill bundles
|
|
102
|
+
lazyclaw skills show review
|
|
103
|
+
lazyclaw skills install ./my-skill.md
|
|
104
|
+
lazyclaw skills remove review
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Workflows (DAG / sequential / persistent)
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
lazyclaw run my-job ./flow.mjs # sequential, resumable
|
|
111
|
+
lazyclaw run my-job ./flow.mjs --parallel --concurrency 4 # in-memory DAG
|
|
112
|
+
lazyclaw run my-job ./flow.mjs --parallel-persistent # DAG + checkpoints
|
|
113
|
+
lazyclaw resume my-job ./flow.mjs # resume a stalled run
|
|
114
|
+
|
|
115
|
+
lazyclaw inspect # list every session
|
|
116
|
+
lazyclaw inspect my-job --summary
|
|
117
|
+
lazyclaw inspect my-job --critical-path ./flow.mjs # bottleneck finder
|
|
118
|
+
lazyclaw inspect my-job --slowest 5
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
State at `./.workflow-state/<id>/` (override with `LAZYCLAW_WORKFLOW_STATE_DIR=...`).
|
|
122
|
+
|
|
123
|
+
## Local HTTP gateway
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
lazyclaw daemon # bind a free port; prints { port, url }
|
|
127
|
+
lazyclaw daemon --port 19600
|
|
128
|
+
lazyclaw daemon --auth-token $(openssl rand -hex 16)
|
|
129
|
+
lazyclaw daemon --rate-limit 60 --log info # 60 req/min/IP, JSON access logs
|
|
130
|
+
lazyclaw daemon --once # serve a single request, then exit
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Cost rate cards
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
lazyclaw rates list
|
|
137
|
+
lazyclaw rates set anthropic/claude-opus-4-7 \
|
|
138
|
+
--in 15 --out 75 --cache-read 1.5 --cache-create 18.75
|
|
139
|
+
lazyclaw rates copy anthropic/claude-opus-4-7 anthropic/claude-opus-4-6
|
|
140
|
+
lazyclaw rates delete openai/gpt-3.5-turbo
|
|
141
|
+
lazyclaw rates validate
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
`/usage` and `--cost` use these to compute USD totals locally โ no provider call.
|
|
145
|
+
|
|
146
|
+
## Config + bundles
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
lazyclaw config path # โ ~/.lazyclaw/config.json
|
|
150
|
+
lazyclaw config get provider
|
|
151
|
+
lazyclaw config set provider openai
|
|
152
|
+
lazyclaw config list
|
|
153
|
+
lazyclaw config edit # opens $EDITOR
|
|
154
|
+
lazyclaw config validate
|
|
155
|
+
|
|
156
|
+
lazyclaw export > backup.json # config + skills (+ optional sessions)
|
|
157
|
+
lazyclaw import --from backup.json
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## Shell completion
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
lazyclaw completion bash >> ~/.bashrc
|
|
164
|
+
lazyclaw completion zsh >> ~/.zshrc
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## File locations
|
|
168
|
+
|
|
169
|
+
| Path | Purpose |
|
|
170
|
+
|---|---|
|
|
171
|
+
| `~/.lazyclaw/config.json` | provider, model, api-key, skills, rates |
|
|
172
|
+
| `~/.lazyclaw/sessions/*.jsonl` | persisted chat sessions |
|
|
173
|
+
| `~/.lazyclaw/skills/*.md` | installed skill bundles |
|
|
174
|
+
| `./.workflow-state/<id>/` | per-session workflow checkpoints (cwd-relative) |
|
|
175
|
+
|
|
176
|
+
`LAZYCLAW_CONFIG_DIR=...` moves the first three; `LAZYCLAW_WORKFLOW_STATE_DIR=...` moves the last.
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## Issues / contributing
|
|
181
|
+
|
|
182
|
+
Source lives in [cmblir/LazyClaude](https://github.com/cmblir/LazyClaude) under [`src/lazyclaw/`](https://github.com/cmblir/LazyClaude/tree/main/src/lazyclaw). Issues and PRs welcome on the parent repo.
|
|
183
|
+
|
|
184
|
+
## License
|
|
185
|
+
|
|
186
|
+
[MIT](./LICENSE)
|