@shaykec/claude-teach 0.5.1 → 0.6.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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/cli.js +16 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shaykec/claude-teach",
3
- "version": "0.5.1",
3
+ "version": "0.6.0",
4
4
  "description": "Socratic AI teaching platform — learn anything through guided dialogue, visual canvas, and gamification",
5
5
  "type": "module",
6
6
  "main": "src/cli.js",
@@ -15,7 +15,7 @@
15
15
  "commander": "^12.0.0",
16
16
  "js-yaml": "^4.1.0",
17
17
  "chalk": "^5.3.0",
18
- "@shaykec/bridge": "0.3.0",
18
+ "@shaykec/bridge": "0.4.0",
19
19
  "@shaykec/shared": "0.1.0",
20
20
  "@shaykec/plugin": "0.2.0",
21
21
  "@shaykec/extension": "0.1.0"
package/src/cli.js CHANGED
@@ -299,6 +299,7 @@ program
299
299
  .command('start')
300
300
  .description('Launch Claude Code with ClaudeTeach — starts bridge server + loads teaching skills')
301
301
  .option('--no-server', 'Skip starting the bridge server')
302
+ .option('--no-browser', 'Skip opening the canvas in the browser')
302
303
  .option('--port <port>', 'Bridge server port', '3456')
303
304
  .allowUnknownOption(true)
304
305
  .action(async (opts, cmd) => {
@@ -346,7 +347,21 @@ program
346
347
  }
347
348
  }
348
349
 
349
- // 4. Launch
350
+ // 4. Open canvas in browser (unless --no-browser or --no-server)
351
+ if (server && opts.browser !== false) {
352
+ const canvasUrl = `http://localhost:${opts.port}`;
353
+ const platform = process.platform;
354
+ if (platform === 'darwin') {
355
+ exec(`open "${canvasUrl}"`);
356
+ } else if (platform === 'linux') {
357
+ exec(`xdg-open "${canvasUrl}"`);
358
+ } else if (platform === 'win32') {
359
+ exec(`start "" "${canvasUrl}"`);
360
+ }
361
+ console.log(chalk.dim(` Canvas: ${canvasUrl}`));
362
+ }
363
+
364
+ // 5. Launch
350
365
  console.log(chalk.green('Launching Claude Code with ClaudeTeach...'));
351
366
  console.log(chalk.dim(` Plugin: ${pluginDir}`));
352
367