@stevederico/dotbot 0.20.2 → 0.22.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/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ 0.22
2
+
3
+ Simplify CLI, no args for interactive
4
+
5
+ 0.21
6
+
7
+ Fix spinner overlap bug
8
+
1
9
  0.20.2
2
10
 
3
11
  Add spinner for thinking/tools
package/bin/dotbot.js CHANGED
@@ -13,12 +13,12 @@ process.emit = function (event, error) {
13
13
  * dotbot CLI
14
14
  *
15
15
  * Usage:
16
- * dotbot chat "What's the weather?" One-shot query
17
- * dotbot repl Interactive chat session
18
- * dotbot serve --port 3000 Start HTTP server
19
- * dotbot --help Show help
16
+ * dotbot "What's the weather?" One-shot query
17
+ * dotbot Interactive chat
18
+ * dotbot serve --port 3000 Start HTTP server
19
+ * dotbot --help Show help
20
20
  *
21
- * Requires Node.js 22.5+ with --experimental-sqlite flag, or Node.js 23+
21
+ * Requires Node.js 22+
22
22
  */
23
23
 
24
24
  import { parseArgs } from 'node:util';
@@ -64,6 +64,7 @@ const DEFAULT_DB = './dotbot.db';
64
64
  let spinnerInterval = null;
65
65
 
66
66
  function startSpinner() {
67
+ if (spinnerInterval) clearInterval(spinnerInterval);
67
68
  spinnerInterval = setInterval(() => {
68
69
  process.stdout.write('.');
69
70
  }, 300);
@@ -89,8 +90,8 @@ function printHelp() {
89
90
  dotbot v${VERSION} — AI agent CLI
90
91
 
91
92
  Usage:
92
- dotbot "message" Send a message (default command)
93
- dotbot repl Interactive chat session
93
+ dotbot "message" One-shot query
94
+ dotbot Interactive chat
94
95
  dotbot serve [--port N] Start HTTP server (default: ${DEFAULT_PORT})
95
96
 
96
97
  Options:
@@ -110,8 +111,7 @@ Environment Variables:
110
111
 
111
112
  Examples:
112
113
  dotbot "What's the weather in SF?"
113
- dotbot "Summarize the news" -p anthropic -m claude-sonnet-4-5
114
- dotbot repl
114
+ dotbot
115
115
  dotbot serve --port 8080
116
116
  `);
117
117
  }
@@ -256,7 +256,8 @@ async function runChat(message, options) {
256
256
  process.stdout.write(event.text);
257
257
  break;
258
258
  case 'tool_start':
259
- process.stdout.write(`\n[${event.name}] `);
259
+ stopSpinner(''); // Stop thinking spinner silently
260
+ process.stdout.write(`[${event.name}] `);
260
261
  startSpinner();
261
262
  break;
262
263
  case 'tool_result':
@@ -348,7 +349,8 @@ async function runRepl(options) {
348
349
  assistantContent += event.text;
349
350
  break;
350
351
  case 'tool_start':
351
- process.stdout.write(`\n[${event.name}] `);
352
+ stopSpinner(''); // Stop thinking spinner silently
353
+ process.stdout.write(`[${event.name}] `);
352
354
  startSpinner();
353
355
  break;
354
356
  case 'tool_result':
@@ -498,29 +500,15 @@ async function main() {
498
500
 
499
501
  const command = args.positionals[0];
500
502
 
501
- switch (command) {
502
- case 'chat':
503
- const chatMessage = args.positionals.slice(1).join(' ');
504
- if (!chatMessage) {
505
- console.error('Usage: dotbot "your message"');
506
- process.exit(1);
507
- }
508
- await runChat(chatMessage, args);
509
- break;
510
-
511
- case 'repl':
512
- await runRepl(args);
513
- break;
514
-
515
- case 'serve':
516
- await runServer(args);
517
- break;
518
-
519
- default:
520
- // Default to chat if not a recognized command
521
- const message = args.positionals.join(' ');
503
+ if (command === 'serve') {
504
+ await runServer(args);
505
+ } else {
506
+ const message = args.positionals.join(' ');
507
+ if (message) {
522
508
  await runChat(message, args);
523
- break;
509
+ } else {
510
+ await runRepl(args);
511
+ }
524
512
  }
525
513
  }
526
514
 
package/dotbot.db CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stevederico/dotbot",
3
- "version": "0.20.2",
3
+ "version": "0.22.0",
4
4
  "description": "AI agent CLI and library for Node.js — streaming, multi-provider, tool execution, autonomous tasks",
5
5
  "type": "module",
6
6
  "main": "index.js",