smolcoder-plus 1.0.0 โ†’ 1.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.
package/README.md CHANGED
@@ -25,29 +25,30 @@ Reliability is at the core of SMOL Coder Plus.
25
25
  ## ๐Ÿš€ Getting Started
26
26
 
27
27
  ### Installation
28
- Install the `smolcoder-plus` command globally from npm:
28
+ Install the package globally from npm:
29
29
 
30
30
  ```bash
31
31
  npm install -g smolcoder-plus
32
32
  ```
33
33
 
34
- Then run it in any project directory:
34
+ This adds **two commands** that do the same thing โ€” `smolcoder-plus` and the
35
+ short alias `smolp`:
35
36
 
36
37
  ```bash
37
38
  cd my-project
38
- smolcoder-plus
39
+ smolp # or: smolcoder-plus
39
40
  ```
40
41
 
41
42
  (Alternative: install from a local checkout with `npm install -g .` from
42
43
  the project root.)
43
44
 
44
- For development (keeps the command linked to your working tree, so edits
45
+ For development (keeps the commands linked to your working tree, so edits
45
46
  take effect after a rebuild):
46
47
 
47
48
  ```bash
48
49
  npm install
49
50
  npm run build
50
- npm link # adds the `smolcoder-plus` command
51
+ npm link # adds the `smolp` and `smolcoder-plus` commands
51
52
  ```
52
53
 
53
54
  Unlink later with `npm unlink -g smolcoder-plus` (or `npm rm -g smolcoder-plus`).
package/dist/index.js CHANGED
@@ -61,6 +61,8 @@ const util_1 = require("./util");
61
61
  const hub_1 = require("./web/hub");
62
62
  const VERSION = require("../package.json").version;
63
63
  const DEFAULT_WEB_PORT = 7433;
64
+ // The command the user actually typed (smolp or smolcoder-plus), for messages.
65
+ const CMD = path.basename(process.argv[1] ?? "smolcoder-plus");
64
66
  function parseArgs(argv) {
65
67
  const args = { workspace: process.cwd() };
66
68
  for (let i = 0; i < argv.length; i++) {
@@ -126,21 +128,21 @@ function parseArgs(argv) {
126
128
  args.workspaceGiven = true;
127
129
  }
128
130
  else {
129
- console.error(`Unknown option "${a}". Try smolcoder-plus --help.`);
131
+ console.error(`Unknown option "${a}". Try ${CMD} --help.`);
130
132
  process.exit(1);
131
133
  }
132
134
  }
133
135
  return args;
134
136
  }
135
137
  const HELP = `
136
- ${util_1.c.bold("smolcoder-plus")} v${VERSION} โ€” a smol, zero-config coding agent for local models.
138
+ ${util_1.c.bold(CMD)} v${VERSION} โ€” a smol, zero-config coding agent for local models.
137
139
 
138
140
  Detects Ollama and LM Studio on this computer automatically โ€” any port, Docker
139
141
  containers included. Models on other machines: /models โ†’ "Find models on
140
142
  another machine" searches your network or takes an address, and remembers it.
141
143
 
142
144
  ${util_1.c.bold("Usage:")}
143
- smolcoder-plus [workspace] [options]
145
+ ${CMD} [workspace] [options]
144
146
 
145
147
  ${util_1.c.bold("Options:")}
146
148
  -m, --mode <ro|edit|bypass> ro: read files only. edit: read/write files and run
@@ -154,7 +156,7 @@ ${util_1.c.bold("Options:")}
154
156
  --web [port] browser UI (default port ${DEFAULT_WEB_PORT}): a sidebar of your
155
157
  workspaces and sessions, an embedded browser and
156
158
  terminal panel. Run it from anywhere; a second
157
- smolcoder-plus --web adds its folder to the running UI.
159
+ ${CMD} --web adds its folder to the running UI.
158
160
  -p, --print "<prompt>" headless: run a single prompt and exit
159
161
  -h, --help this help
160
162
  -v, --version version
@@ -302,7 +304,7 @@ async function runHeadless(args) {
302
304
  // ---- interactive TUI -------------------------------------------------------
303
305
  async function runInteractive(args) {
304
306
  if (!process.stdout.isTTY || !process.stdin.isTTY) {
305
- console.error('Interactive mode needs a terminal. For headless use, run: smolcoder-plus -p "your prompt" โ€” or serve a browser UI with --web');
307
+ console.error(`Interactive mode needs a terminal. For headless use, run: ${CMD} -p "your prompt" โ€” or serve a browser UI with --web`);
306
308
  process.exit(1);
307
309
  }
308
310
  printLogo();
@@ -354,7 +356,7 @@ function isHomeOrRoot(p) {
354
356
  return norm(r) === norm(os.homedir()) || path.dirname(r) === r;
355
357
  }
356
358
  async function runWeb(args) {
357
- console.log(`${util_1.c.bold("smolcoder-plus")} ${util_1.c.dim("v" + VERSION + " ยท web")}`);
359
+ console.log(`${util_1.c.bold(CMD)} ${util_1.c.dim("v" + VERSION + " ยท web")}`);
358
360
  const port = args.webPort ?? DEFAULT_WEB_PORT;
359
361
  const workspace = args.workspace;
360
362
  const autoStart = !!args.workspaceGiven || !isHomeOrRoot(workspace);
@@ -374,7 +376,7 @@ async function runWeb(args) {
374
376
  }
375
377
  catch (err) {
376
378
  if (err?.code === "EADDRINUSE") {
377
- console.error(`\nPort ${port} is already in use. Pick another with: smolcoder-plus --web ${port + 1}`);
379
+ console.error(`\nPort ${port} is already in use. Pick another with: ${CMD} --web ${port + 1}`);
378
380
  process.exit(1);
379
381
  }
380
382
  throw err;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smolcoder-plus",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A smol, zero-config CLI coding agent for local models (Ollama & LM Studio). It just works.",
5
5
  "keywords": [
6
6
  "cli",
@@ -24,6 +24,7 @@
24
24
  "url": "https://github.com/leonvanzyl/smolcoder/issues"
25
25
  },
26
26
  "bin": {
27
+ "smolp": "dist/index.js",
27
28
  "smolcoder-plus": "dist/index.js"
28
29
  },
29
30
  "main": "dist/index.js",