buddydex 0.1.0 → 0.1.2

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.
@@ -400,6 +400,53 @@ function cmdRoll(argv) {
400
400
  console.log();
401
401
  }
402
402
 
403
+ // packages/cli/commands/name.ts
404
+ import { parseArgs as parseArgs4 } from "util";
405
+ function cmdName(argv) {
406
+ const { values: args } = parseArgs4({
407
+ args: argv,
408
+ options: {
409
+ name: { type: "string" },
410
+ personality: { type: "string" }
411
+ }
412
+ });
413
+ const config = readJson(CONFIG_PATH);
414
+ if (!config) {
415
+ console.error(`
416
+ Cannot read ${CONFIG_PATH}
417
+ `);
418
+ process.exit(1);
419
+ }
420
+ printHeader();
421
+ const companion = config.companion ?? {};
422
+ if (!args.name && !args.personality) {
423
+ if (!config.companion) {
424
+ console.log(`
425
+ No companion data found. Launch Claude Code to hatch your buddy first.
426
+ `);
427
+ } else {
428
+ console.log(`
429
+ Name: ${companion.name || "(none)"}`);
430
+ console.log(` Personality: ${companion.personality || "(none)"}
431
+ `);
432
+ }
433
+ return;
434
+ }
435
+ if (args.name)
436
+ companion.name = args.name;
437
+ if (args.personality)
438
+ companion.personality = args.personality;
439
+ config.companion = companion;
440
+ writeConfig(config);
441
+ console.log(`
442
+ Updated companion:`);
443
+ console.log(` Name: ${companion.name || "(none)"}`);
444
+ console.log(` Personality: ${companion.personality || "(none)"}`);
445
+ console.log(`
446
+ Restart Claude Code to see the changes.
447
+ `);
448
+ }
449
+
403
450
  // packages/cli/bin.ts
404
451
  var USAGE = `
405
452
  BuddyDex CLI
@@ -410,6 +457,7 @@ var USAGE = `
410
457
  restore Restore your original UUID from backup
411
458
  show Show your current buddy
412
459
  roll Roll a specific UUID to see its buddy
460
+ name View or set your buddy's name and personality
413
461
 
414
462
  Hunt options:
415
463
  --species <name> Filter by species
@@ -424,11 +472,17 @@ var USAGE = `
424
472
  Inject options:
425
473
  --preview Preview without saving
426
474
 
475
+ Name options:
476
+ --name <name> Set buddy name
477
+ --personality <text> Set buddy personality
478
+
427
479
  Examples:
428
480
  buddydex hunt --species dragon --rarity legendary
429
481
  buddydex hunt --rarity legendary --perfect 70
430
482
  buddydex inject <seed>
431
483
  buddydex show
484
+ buddydex name
485
+ buddydex name --name "Ember" --personality "Chaotic but loyal"
432
486
  `;
433
487
  var [command, ...rest] = process.argv.slice(2);
434
488
  var commands = {
@@ -436,7 +490,8 @@ var commands = {
436
490
  inject: cmdInject,
437
491
  restore: cmdRestore,
438
492
  show: cmdShow,
439
- roll: cmdRoll
493
+ roll: cmdRoll,
494
+ name: cmdName
440
495
  };
441
496
  if (command && command in commands) {
442
497
  commands[command](rest);
package/package.json CHANGED
@@ -1,20 +1,25 @@
1
1
  {
2
2
  "name": "buddydex",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Hunt, browse, and inject Claude Code buddies",
5
5
  "type": "module",
6
6
  "bin": {
7
- "buddydex": "dist/buddydex.js"
7
+ "buddydex": "buddydex.js"
8
8
  },
9
- "files": ["dist"],
10
- "keywords": ["claude", "claude-code", "buddy", "companion", "wyhash"],
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "keywords": [
13
+ "claude",
14
+ "claude-code",
15
+ "buddy",
16
+ "companion",
17
+ "wyhash"
18
+ ],
11
19
  "author": "iammatthias",
12
20
  "license": "MIT",
13
21
  "repository": {
14
22
  "type": "git",
15
23
  "url": "git+https://github.com/iammatthias/buddydex.git"
16
- },
17
- "dependencies": {
18
- "@buddy/engine": "workspace:*"
19
24
  }
20
25
  }