@lumpcode/cli 0.0.0 → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -104,7 +104,7 @@ Use `promptFn` when `promptTemplate` is not enough — it gives you fine-grained
104
104
  export default {
105
105
  baseBranch: 'main',
106
106
  contextListJson: { FILE: 'src/{NAME}.ts' },
107
- command: 'claude',
107
+ command: 'copilot',
108
108
  steps: [
109
109
  {
110
110
  promptFn: ({ context, contextRunState }) => {
@@ -130,7 +130,7 @@ This enables branching workflows:
130
130
  export default {
131
131
  baseBranch: 'main',
132
132
  contextListJson: { FILE: 'src/{NAME}.ts' },
133
- command: 'claude',
133
+ command: 'copilot',
134
134
  steps: [
135
135
  {
136
136
  promptTemplate: 'Does @{FILE} need a README section? Reply YES or NO only.',
package/DOCS/commands.md CHANGED
@@ -6,8 +6,6 @@ This page documents every `lumpcode` subcommand and its options.
6
6
 
7
7
  **[Global conventions](#ref-global-conventions)** — [Working directory](#ref-working-directory) · [`--json`](#ref-json-output) · [Booleans](#ref-boolean-options) · [Validation](#ref-project-validation) · [`--help`](#ref-lumpcode-help)
8
8
 
9
- **[Auth](#ref-auth)** — [`lumpcode login`](#ref-cmd-login) · [`lumpcode logout`](#ref-cmd-logout)
10
-
11
9
  **[Project setup](#ref-section-project-setup)** — [`lumpcode project-setup`](#ref-cmd-project-setup) · [`lumpcode lump-create`](#ref-cmd-lump-create)
12
10
 
13
11
  **[Run](#ref-section-run)** — [`lumpcode run`](#ref-cmd-run) · [`lumpcode lump-plan`](#ref-cmd-lump-plan)
@@ -77,46 +75,6 @@ The program and each subcommand support **`--help`** (e.g. `lumpcode run --help`
77
75
 
78
76
  ---
79
77
 
80
- <a id="ref-auth"></a>
81
-
82
- ## Auth
83
-
84
- <a id="ref-cmd-login"></a>
85
-
86
- ### `lumpcode login`
87
-
88
- **Description:** Authenticate against the Lumpcode API and persist the session token locally. You need a Lumpcode account ([lumpcode.com](https://lumpcode.com)); same prerequisite as the [README](../README.md#before-you-run-anything).
89
-
90
- **Usage:** `lumpcode login [options]`
91
-
92
-
93
- | Option | Type | Required | Description |
94
- | ------------ | ------ | -------- | ------------------------------------------------------------------------------------------------- |
95
- | `--email` | string | No | Email; if omitted, you are prompted |
96
- | `--password` | string | No | Password for non-interactive login; **not recommended** (visible in process list / shell history) |
97
-
98
-
99
- **Behavior:**
100
-
101
- - If a valid token already exists in `~/.lumpcode/auth.json`, prints that you are already logged in.
102
- - Otherwise authenticates with the Lumpcode service, then writes `~/.lumpcode/auth.json`.
103
-
104
- **See also:** [get-started.md](./get-started.md#step-1-log-in).
105
-
106
- <a id="ref-cmd-logout"></a>
107
-
108
- ### `lumpcode logout`
109
-
110
- **Description:** Delete stored authentication.
111
-
112
- **Usage:** `lumpcode logout [options]`
113
-
114
- **Options:** None besides global [`--json`](#ref-json-output).
115
-
116
- **Behavior:** Removes `~/.lumpcode/auth.json`.
117
-
118
- ---
119
-
120
78
  <a id="ref-section-project-setup"></a>
121
79
 
122
80
  ## Project setup
package/DOCS/examples.md CHANGED
@@ -8,7 +8,7 @@ Deep references: [concepts.md](./concepts.md), [lump-config.md](./lump-config.md
8
8
 
9
9
  ## 0. Smoke test — one context, minimal prompt
10
10
 
11
- *When to use:* right after `lumpcode lump-create` to confirm login, remotes, agent command, and marker commits before you invest in a real campaign.
11
+ *When to use:* right after `lumpcode lump-create` to confirm remotes, agent command, and marker commits before you invest in a real campaign.
12
12
 
13
13
  Uses a single fixed path every repo already has (`README.md`). Adjust `FILE` if your project root has no `README.md`.
14
14
 
@@ -21,7 +21,7 @@ Uses a single fixed path every repo already has (`README.md`). Adjust `FILE` if
21
21
  },
22
22
  "prompt": {
23
23
  "promptTemplate": "Reply with exactly one line: smoke OK for @{FILE}. Do not edit any file.",
24
- "command": "claude"
24
+ "command": "copilot"
25
25
  }
26
26
  }
27
27
  ```
@@ -38,7 +38,7 @@ A classic refactoring lump: discover every component folder, do a multi-step mig
38
38
 
39
39
  ```json
40
40
  {
41
- "command": "claude",
41
+ "command": "copilot",
42
42
  "contextListJson": {
43
43
  "FOLDER": "src/components/{COMPONENT_NAME}/",
44
44
  "TYPES": "src/components/{COMPONENT_NAME}/{COMPONENT_NAME}.types.ts",
@@ -65,7 +65,7 @@ Treat a JSON ticket file as the source of truth and let `dependsOnContexts` enfo
65
65
 
66
66
  ```json
67
67
  {
68
- "command": "claude",
68
+ "command": "copilot",
69
69
  "getContextListFn": "./tickets.js",
70
70
  "numberOfContextsPerBranch": 1,
71
71
  "prompt": {
@@ -125,7 +125,7 @@ Use `contextMatchFn` so the matcher itself decides what to skip. Each call recei
125
125
 
126
126
  ```json
127
127
  {
128
- "command": "claude",
128
+ "command": "copilot",
129
129
  "contextMatchFn": "./match.js",
130
130
  "maximumNumberOfConcurrentBranches": 5,
131
131
  "prompt": {
@@ -164,7 +164,7 @@ Each file that imports `lodash` becomes one context. Lumpcode handles the branch
164
164
 
165
165
  ```json
166
166
  {
167
- "command": "claude",
167
+ "command": "copilot",
168
168
  "contextMatchFn": "./match.js",
169
169
  "numberOfContextsPerBranch": 10,
170
170
  "prompt": {
@@ -196,7 +196,7 @@ Run over `packages/*/` and produce or refresh each package README from real sour
196
196
 
197
197
  ```json
198
198
  {
199
- "command": "claude",
199
+ "command": "copilot",
200
200
  "contextListJson": {
201
201
  "PKG_FOLDER": "packages/{PKG}/",
202
202
  "PKG_JSON": "packages/{PKG}/package.json",
@@ -218,7 +218,7 @@ Mix a static prompt with a function-form prompt item to short-circuit work when
218
218
 
219
219
  ```js
220
220
  export default {
221
- command: 'claude',
221
+ command: 'copilot',
222
222
  contextListJson: { PKG_JSON: 'packages/{PKG}/package.json' },
223
223
  steps: [
224
224
  {
@@ -8,10 +8,9 @@ Follow this guide in order to get started with your first `lumpcode run`. Links
8
8
 
9
9
  Install and prepare the following:
10
10
 
11
- 1. **Lumpcode account** — Create one at [lumpcode.com](https://lumpcode.com); you’ll use it to log in.
12
- 2. **Lumpcode CLI** on your `PATH` Installers vary by OS (Homebrew `brew install lumpcode`, curl one-liners, Windows downloads, or `npm install -g @lumpcode/cli` on Node 22+). The npm install uses a native binary when available for your platform and otherwise runs with Node automatically. For installation details: [README.md § Install](../README.md#install).
13
- 3. **Git** repository with **`origin`** reachable for fetch/push. The **`projectBaseBranch`** you'll declare in `.lumpcode/local.json` (typically `main`) must **already exist on `origin`** (e.g. `origin/main`): Lumpcode pulls it during pre-flight and reads it via `origin/<projectBaseBranch>` for status.
14
- 4. **CLI coding agent** installed and runnable. Lumpcode invokes the **`command`** you set in lump config by resolving a command module in this order: `.lumpcode/commands/<name>.js` (project), then `~/.lumpcode/commands/<name>.js` (global override), then shipped presets at `~/.lumpcode/commands/presets/<name>.js`. Built-in preset names **`cursor`** and **`copilot`** work out of the box when `cursor-agent` or `copilot` is on `PATH`; other agents (e.g. **`claude`**, **`aider`**) need a custom module until more presets ship.
11
+ 1. **Lumpcode CLI** on your `PATH` Installers vary by OS (Homebrew `brew install lumpcode`, curl one-liners, Windows downloads, or `npm install -g @lumpcode/cli` on Node 22+). The npm install uses a native binary when available for your platform and otherwise runs with Node automatically. For installation details: [README.md § Install](../README.md#install).
12
+ 2. **Git** repository with **`origin`** reachable for fetch/push. The **`projectBaseBranch`** you'll declare in `.lumpcode/local.json` (typically `main`) must **already exist on `origin`** (e.g. `origin/main`): Lumpcode pulls it during pre-flight and reads it via `origin/<projectBaseBranch>` for status.
13
+ 3. **CLI coding agent** installed and runnable. Lumpcode invokes the **`command`** you set in lump config by resolving a command module in this order: `.lumpcode/commands/<name>.js` (project), then `~/.lumpcode/commands/<name>.js` (global override), then shipped presets at `~/.lumpcode/commands/presets/<name>.js`. Built-in preset names **`cursor`** and **`copilot`** work out of the box when `cursor-agent` or `copilot` is on `PATH`; other agents (e.g. **`aider`**) need a custom module until more presets ship.
15
14
 
16
15
  ---
17
16
 
@@ -40,17 +39,7 @@ You only need **`.git/`** here. The next steps create **`.lumpcode/`** in this s
40
39
 
41
40
  ---
42
41
 
43
- ## Step 1: Log in
44
-
45
- ```bash
46
- lumpcode login
47
- ```
48
-
49
- Use your Lumpcode email and password when prompted. The CLI saves the session to `~/.lumpcode/auth.json` and skips prompting if you are already logged in. For non-interactive use and flags, see [commands.md § `lumpcode login`](./commands.md#ref-cmd-login).
50
-
51
- ---
52
-
53
- ## Step 2: Initialize the Lumpcode project
42
+ ## Step 1: Initialize the Lumpcode project
54
43
 
55
44
  From the repository root:
56
45
 
@@ -92,7 +81,7 @@ Extra fields (`maximumNumberOfConcurrentBranches`, …): [project-config.md](./p
92
81
 
93
82
  ---
94
83
 
95
- ## Step 3: Create a lump
84
+ ## Step 2: Create a lump
96
85
 
97
86
  ```bash
98
87
  lumpcode lump-create myFirstLump
@@ -104,11 +93,11 @@ By default this writes **`.lumpcode/lumps/myFirstLump/config.json`** with a smal
104
93
  lumpcode lump-create myFirstLump --config js
105
94
  ```
106
95
 
107
- `lump-create` gives you one path template plus `@{FILE}` in the prompt; Step 4 is where you reshape that for your campaign.
96
+ `lump-create` gives you one path template plus `@{FILE}` in the prompt; Step 3 is where you reshape that for your campaign.
108
97
 
109
98
  ---
110
99
 
111
- ## Step 4: Define contexts
100
+ ## Step 3: Define contexts
112
101
 
113
102
  `contextListJson` maps variable names to path **templates** (e.g. `{NAME}`, `{COMPONENT_NAME}`). Lumpcode scans the repo and keeps only combinations where **every** template resolves to a real path; each map **key** is a **`{VAR}`** in `promptTemplate`, or **`@{VAR}`** with a leading `@` for agents that treat `@path` as file context. Substitution rules: [lump-config.md § Prompt template syntax](./lump-config.md#prompt-template-syntax).
114
103
 
@@ -124,7 +113,7 @@ Minimal stub (`lump-create` defaults look like this—adjust `FILE`/prompt):
124
113
  },
125
114
  "prompt": {
126
115
  "promptTemplate": "Improve the code at @{FILE}.",
127
- "command": "claude"
116
+ "command": "copilot"
128
117
  }
129
118
  }
130
119
  ```
@@ -139,7 +128,7 @@ Repeat-per-component variant (multiple paths must exist per context—the prompt
139
128
  },
140
129
  "prompt": {
141
130
  "promptTemplate": "Migrate the component at @{COMPONENT} (folder @{FOLDER}) to Vue 3 <script setup>.",
142
- "command": "claude"
131
+ "command": "copilot"
143
132
  }
144
133
  }
145
134
  ```
@@ -150,7 +139,7 @@ Transforms (e.g. `$upperFirst{…}`) and **`contextOptionsFn`** for `priority` /
150
139
 
151
140
  ---
152
141
 
153
- ## Step 5: Run once
142
+ ## Step 4: Run once
154
143
 
155
144
  ```bash
156
145
  lumpcode run myFirstLump
@@ -172,7 +161,7 @@ Do **not** confuse **`lump-status`** (context rows from git) with **`daemon-stat
172
161
 
173
162
  ---
174
163
 
175
- ## Step 6: Run continuously (optional)
164
+ ## Step 5: Run continuously (optional)
176
165
 
177
166
  From the same repository root:
178
167
 
@@ -39,7 +39,7 @@ Minimal shape:
39
39
  "contextListJson": { "FILE": "src/{NAME}.ts" },
40
40
  "prompt": {
41
41
  "promptTemplate": "Improve types in @{FILE}",
42
- "command": "claude"
42
+ "command": "copilot"
43
43
  }
44
44
  }
45
45
  ```
@@ -71,7 +71,7 @@ Two forms appear repeatedly in the field tables below. Each is defined here once
71
71
 
72
72
  `command` fields (top-level and per-prompt-item) are **not** function references. They hold the **registered name** of a command module:
73
73
 
74
- - **String** (e.g. `"cursor"`, `"copilot"`, `"claude"`, `"aider"`, `"my-agent"`) — resolved against `commands/<name>.js` under the project (`.lumpcode/commands/`), then the global config folder (`~/.lumpcode/commands/`), then shipped presets (`~/.lumpcode/commands/presets/`). Project-local wins over global override; global wins over preset. **`cursor`** and **`copilot`** are built-in preset names (require `cursor-agent` / `copilot` on `PATH`).
74
+ - **String** (e.g. `"cursor"`, `"copilot"`, `"aider"`, `"my-agent"`) — resolved against `commands/<name>.js` under the project (`.lumpcode/commands/`), then the global config folder (`~/.lumpcode/commands/`), then shipped presets (`~/.lumpcode/commands/presets/`). Project-local wins over global override; global wins over preset. **`cursor`** and **`copilot`** are built-in preset names (require `cursor-agent` / `copilot` on `PATH`).
75
75
  - **Inline function** (`config.js` only) — a `CommandFn` used directly without registry lookup.
76
76
 
77
77
  Pass agent flags inside the command module's exported `command` function (`executable` + `args`), not in the `command` string. See [advanced-config.md](./advanced-config.md#custom-agent-commands).
@@ -230,7 +230,7 @@ History is written **before** an optional `postCommandExecFn` on the same prompt
230
230
  "keepHistory": true,
231
231
  "prompt": {
232
232
  "promptTemplate": "Improve @{FILE}",
233
- "command": "claude"
233
+ "command": "copilot"
234
234
  }
235
235
  }
236
236
  ```
@@ -263,7 +263,7 @@ import { defineConfig } from '@lumpcode/cli-types';
263
263
 
264
264
  export default defineConfig({
265
265
  contextListJson: { FILE: 'src/{NAME}.ts' },
266
- prompt: { promptTemplate: 'Fix @{FILE}', command: 'claude' },
266
+ prompt: { promptTemplate: 'Fix @{FILE}', command: 'copilot' },
267
267
  });
268
268
  ```
269
269
 
@@ -2,6 +2,17 @@
2
2
 
3
3
  Operator-only notes for publishing from the monorepo. End users install via `npm i -g @lumpcode/cli@beta` (see [README](../README.md)).
4
4
 
5
+ ## Bump versions
6
+
7
+ Align all three publishable packages and workspace `@lumpcode/core` deps:
8
+
9
+ ```bash
10
+ node scripts/set-npm-versions.mjs 0.0.1
11
+ node scripts/set-npm-versions.mjs --patch
12
+ ```
13
+
14
+ Runs `npm install` at the repo root by default (pass `--no-install` to skip).
15
+
5
16
  ## Packages and order
6
17
 
7
18
  Publish in dependency order:
package/DOCS/types.md CHANGED
@@ -200,7 +200,7 @@ type CommandFn = ((
200
200
 
201
201
  Return `{ executable, args }` to run a subprocess. Return `null`, `undefined`, or nothing to skip execution; `postCommandExecFn` still runs with an empty `commandResult`. `keepHistory` entries are not written for skipped commands.
202
202
 
203
- Lumpcode runs the agent as `executable` + `args`. Agent-specific flags and the prompt text go into `args` the way your agent expects (e.g. `executable: 'claude', args: ['-p', prompt]` or `executable: 'aider', args: ['--message', prompt]`). This is exactly what a command module at `.lumpcode/commands/<name>.js` exports as its `command`.
203
+ Lumpcode runs the agent as `executable` + `args`. Agent-specific flags and the prompt text go into `args` the way your agent expects (e.g. `executable: 'copilot', args: ['-p', prompt]` or `executable: 'aider', args: ['--message', prompt]`). This is exactly what a command module at `.lumpcode/commands/<name>.js` exports as its `command`.
204
204
 
205
205
  ### `PostCommandExecFn`
206
206
 
package/README.md CHANGED
@@ -29,9 +29,8 @@ Operators can set `LUMPCODE_SKIP_BINARY=1` to skip the native download, `LUMPCOD
29
29
 
30
30
  You will need:
31
31
 
32
- - **A Lumpcode account** — sign up at [lumpcode.com](https://lumpcode.com); `lumpcode login` will prompt for credentials.
33
32
  - A project on your machine **with git push access to `origin`** for the repository you want to automate. The `baseBranch` you pick (e.g. `main`) must already exist on the remote — Lumpcode reads it via `origin/<baseBranch>`.
34
- - **A CLI coding agent on your `PATH`** — verify with e.g. `claude --version` or `aider --version`. Lumpcode invokes the agent through a **command module** registered by name (e.g. `claude`, `aider`) under `.lumpcode/commands/<name>.js` or `~/.lumpcode/commands/<name>.js`. See [DOCS/advanced-config.md](DOCS/advanced-config.md#custom-agent-commands).
33
+ - **A CLI coding agent on your `PATH`** — verify with e.g. `copilot --version` or `cursor-agent --version`. Lumpcode invokes the agent through a **command module** registered by name (e.g. `copilot`, `cursor`) under `.lumpcode/commands/<name>.js` or `~/.lumpcode/commands/<name>.js`. See [DOCS/advanced-config.md](DOCS/advanced-config.md#custom-agent-commands).
35
34
  - **An understanding that `lumpcode run` calls your agent**, which usually means real LLM cost. Start with one context, review the resulting branch, then scale up.
36
35
 
37
36
  ## 60-second tour
@@ -39,7 +38,6 @@ You will need:
39
38
  From the root of a git repository:
40
39
 
41
40
  ```bash
42
- lumpcode login
43
41
  lumpcode project-setup
44
42
  lumpcode lump-create myFirstLump
45
43
  ```
@@ -117,7 +115,7 @@ src/components/
117
115
  },
118
116
  "prompt": {
119
117
  "promptTemplate": "Tighten the prop types in @{COMPONENT} (declared in @{TYPES}) and add any missing assertions to @{TEST}.",
120
- "command": "claude"
118
+ "command": "copilot"
121
119
  }
122
120
  }
123
121
  ```
@@ -136,7 +134,7 @@ Each context becomes one work branch (`lump/myFirstLump/Button`, …) and one ma
136
134
 
137
135
  - `contextListJson` — Each value is a **path template** with `{PLACEHOLDER}` captures; each key (here `COMPONENT`, `TYPES`, `TEST`) becomes a variable usable in the prompt as `{COMPONENT}`, `{TYPES}`, `{TEST}`. See [DOCS/lump-config.md#contextlistjson](DOCS/lump-config.md#contextlistjson).
138
136
  - `promptTemplate` — `{VAR}` substitutes the literal value; e.g you can safely use `@{VAR}` to have the same value with a leading `@` for agents that treat `@path` as file context. See [DOCS/lump-config.md#prompt-template-syntax](DOCS/lump-config.md#prompt-template-syntax).
139
- - `command` — Registered [command name](DOCS/lump-config.md#command-names) only (`"claude"`, `"aider"`, …), not shell flags ([DOCS/advanced-config.md#custom-agent-commands](DOCS/advanced-config.md#custom-agent-commands)).
137
+ - `command` — Registered [command name](DOCS/lump-config.md#command-names) only (`"copilot"`, `"cursor"`, …), not shell flags ([DOCS/advanced-config.md#custom-agent-commands](DOCS/advanced-config.md#custom-agent-commands)).
140
138
  - `$schema` — Optional but recommended: most editors will then autocomplete and validate every field above.
141
139
 
142
140
  ## TypeScript hints for `config.js` and command modules
package/bin/lumpcode.js CHANGED
File without changes