@kood/claude-code 0.6.4 → 0.6.6

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/dist/index.js CHANGED
@@ -23,6 +23,7 @@ var banner = () => {
23
23
 
24
24
  // src/commands/init.ts
25
25
  import fs8 from "fs-extra";
26
+ import os from "os";
26
27
 
27
28
  // src/features/templates/template-path-resolver.ts
28
29
  import path2 from "path";
@@ -319,6 +320,7 @@ var createExtrasCopier = (extrasType) => {
319
320
  var copyCommands = createExtrasCopier("commands");
320
321
  var copyAgents = createExtrasCopier("agents");
321
322
  var copyInstructions = createExtrasCopier("instructions");
323
+ var copyScripts = createExtrasCopier("scripts");
322
324
  var getSkillsToInstall = async (skillsSrc, templates) => {
323
325
  const metadataMap = await loadAllSkillMetadata(skillsSrc);
324
326
  const isNonUITemplate = templates.some((t) => NON_UI_TEMPLATES.includes(t));
@@ -363,6 +365,7 @@ var checkExistingClaudeFiles = async (targetDir) => {
363
365
  const commandsDir = path8.join(targetDir, ".claude", "commands");
364
366
  const agentsDir = path8.join(targetDir, ".claude", "agents");
365
367
  const instructionsDir = path8.join(targetDir, ".claude", "instructions");
368
+ const scriptsDir = path8.join(targetDir, ".claude", "scripts");
366
369
  if (await fs6.pathExists(skillsDir)) {
367
370
  existingFiles.push(".claude/skills/");
368
371
  }
@@ -375,6 +378,9 @@ var checkExistingClaudeFiles = async (targetDir) => {
375
378
  if (await fs6.pathExists(instructionsDir)) {
376
379
  existingFiles.push(".claude/instructions/");
377
380
  }
381
+ if (await fs6.pathExists(scriptsDir)) {
382
+ existingFiles.push(".claude/scripts/");
383
+ }
378
384
  return existingFiles;
379
385
  };
380
386
  var checkAllExtrasExist = async (_templates) => {
@@ -383,13 +389,150 @@ var checkAllExtrasExist = async (_templates) => {
383
389
  const commandsSrc = path8.join(claudeDir, "commands");
384
390
  const agentsSrc = path8.join(claudeDir, "agents");
385
391
  const instructionsSrc = path8.join(claudeDir, "instructions");
392
+ const scriptsSrc = path8.join(claudeDir, "scripts");
386
393
  const hasSkills = await hasFiles(skillsSrc);
387
394
  const hasCommands = await hasFiles(commandsSrc);
388
395
  const hasAgents = await hasFiles(agentsSrc);
389
396
  const hasInstructions = await hasFiles(instructionsSrc);
390
- return { hasSkills, hasCommands, hasAgents, hasInstructions };
397
+ const hasScripts = await hasFiles(scriptsSrc);
398
+ return { hasSkills, hasCommands, hasAgents, hasInstructions, hasScripts };
391
399
  };
392
400
 
401
+ // src/features/extras/extras-installer.ts
402
+ function logExistingFilesUpdate(existingClaudeFiles) {
403
+ if (existingClaudeFiles.length > 0) {
404
+ logger.info("Updating existing extras:");
405
+ existingClaudeFiles.forEach((f) => logger.step(f));
406
+ }
407
+ }
408
+ async function installSkillsIfNeeded(templates, targetDir, shouldInstall, hasSkills) {
409
+ if (!shouldInstall) {
410
+ return { files: 0, directories: 0 };
411
+ }
412
+ if (!hasSkills) {
413
+ logger.warn("No skills found in selected templates.");
414
+ return { files: 0, directories: 0 };
415
+ }
416
+ logger.blank();
417
+ logger.info("Installing skills...");
418
+ const skillsResult = await copySkills(templates, targetDir);
419
+ logger.success(
420
+ `Skills: ${skillsResult.files} files, ${skillsResult.directories} directories`
421
+ );
422
+ return skillsResult;
423
+ }
424
+ async function installCommandsIfNeeded(templates, targetDir, shouldInstall, hasCommands) {
425
+ if (!shouldInstall) {
426
+ return { files: 0, directories: 0 };
427
+ }
428
+ if (!hasCommands) {
429
+ logger.warn("No commands found in selected templates.");
430
+ return { files: 0, directories: 0 };
431
+ }
432
+ logger.blank();
433
+ logger.info("Installing commands...");
434
+ const commandsResult = await copyCommands(templates, targetDir);
435
+ logger.success(
436
+ `Commands: ${commandsResult.files} files, ${commandsResult.directories} directories`
437
+ );
438
+ return commandsResult;
439
+ }
440
+ async function installAgentsIfNeeded(templates, targetDir, shouldInstall, hasAgents) {
441
+ if (!shouldInstall) {
442
+ return { files: 0, directories: 0 };
443
+ }
444
+ if (!hasAgents) {
445
+ logger.warn("No agents found in selected templates.");
446
+ return { files: 0, directories: 0 };
447
+ }
448
+ logger.blank();
449
+ logger.info("Installing agents...");
450
+ const agentsResult = await copyAgents(templates, targetDir);
451
+ logger.success(
452
+ `Agents: ${agentsResult.files} files, ${agentsResult.directories} directories`
453
+ );
454
+ return agentsResult;
455
+ }
456
+ async function installScriptsIfNeeded(templates, targetDir, shouldInstall, hasScripts) {
457
+ if (!shouldInstall) {
458
+ return { files: 0, directories: 0 };
459
+ }
460
+ if (!hasScripts) {
461
+ logger.warn("No scripts found in selected templates.");
462
+ return { files: 0, directories: 0 };
463
+ }
464
+ logger.blank();
465
+ logger.info("Installing scripts...");
466
+ const scriptsResult = await copyScripts(templates, targetDir);
467
+ logger.success(
468
+ `Scripts: ${scriptsResult.files} files, ${scriptsResult.directories} directories`
469
+ );
470
+ return scriptsResult;
471
+ }
472
+ async function installInstructionsIfNeeded(templates, targetDir, shouldInstall, hasInstructions) {
473
+ if (!shouldInstall) {
474
+ return { files: 0, directories: 0 };
475
+ }
476
+ if (!hasInstructions) {
477
+ logger.warn("No instructions found in selected templates.");
478
+ return { files: 0, directories: 0 };
479
+ }
480
+ logger.blank();
481
+ logger.info("Installing instructions...");
482
+ const instructionsResult = await copyInstructions(templates, targetDir);
483
+ logger.success(
484
+ `Instructions: ${instructionsResult.files} files, ${instructionsResult.directories} directories`
485
+ );
486
+ return instructionsResult;
487
+ }
488
+ async function installExtras(templates, targetDir, flags, availability) {
489
+ const {
490
+ installSkills,
491
+ installCommands,
492
+ installAgents,
493
+ installInstructions,
494
+ installScripts
495
+ } = flags;
496
+ if (!installSkills && !installCommands && !installAgents && !installInstructions && !installScripts) {
497
+ return { files: 0, directories: 0 };
498
+ }
499
+ const existingClaudeFiles = await checkExistingClaudeFiles(targetDir);
500
+ logExistingFilesUpdate(existingClaudeFiles);
501
+ const skillsResult = await installSkillsIfNeeded(
502
+ templates,
503
+ targetDir,
504
+ installSkills,
505
+ availability.hasSkills
506
+ );
507
+ const commandsResult = await installCommandsIfNeeded(
508
+ templates,
509
+ targetDir,
510
+ installCommands,
511
+ availability.hasCommands
512
+ );
513
+ const agentsResult = await installAgentsIfNeeded(
514
+ templates,
515
+ targetDir,
516
+ installAgents,
517
+ availability.hasAgents
518
+ );
519
+ const instructionsResult = await installInstructionsIfNeeded(
520
+ templates,
521
+ targetDir,
522
+ installInstructions,
523
+ availability.hasInstructions
524
+ );
525
+ const scriptsResult = await installScriptsIfNeeded(
526
+ templates,
527
+ targetDir,
528
+ installScripts,
529
+ availability.hasScripts
530
+ );
531
+ const totalFiles = skillsResult.files + commandsResult.files + agentsResult.files + instructionsResult.files + scriptsResult.files;
532
+ const totalDirectories = skillsResult.directories + commandsResult.directories + agentsResult.directories + instructionsResult.directories + scriptsResult.directories;
533
+ return { files: totalFiles, directories: totalDirectories };
534
+ }
535
+
393
536
  // src/shared/prompts/prompt-helpers.ts
394
537
  import prompts from "prompts";
395
538
  async function promptConfirm(message, initial = false) {
@@ -401,6 +544,15 @@ async function promptConfirm(message, initial = false) {
401
544
  });
402
545
  return { confirmed: response.confirmed ?? false };
403
546
  }
547
+ async function promptSelect(message, choices) {
548
+ const response = await prompts({
549
+ type: "select",
550
+ name: "value",
551
+ message,
552
+ choices
553
+ });
554
+ return { value: response.value };
555
+ }
404
556
  async function promptMultiselect(message, choices, options) {
405
557
  const response = await prompts({
406
558
  type: "multiselect",
@@ -426,14 +578,10 @@ async function promptTemplateSelection(options) {
426
578
  value: t
427
579
  })),
428
580
  {
429
- min: 1,
430
- hint: "- Space to select. Return to submit"
581
+ min: 0,
582
+ hint: "- Space to select, Enter to confirm (or skip to install extras only)"
431
583
  }
432
584
  );
433
- if (response.values.length === 0) {
434
- logger.warn("Operation cancelled.");
435
- process.exit(0);
436
- }
437
585
  templates = response.values;
438
586
  }
439
587
  const invalidTemplates = templates.filter(
@@ -465,17 +613,20 @@ async function promptExtrasSelection(options) {
465
613
  commands,
466
614
  agents,
467
615
  instructions,
616
+ scripts,
468
617
  hasSkills,
469
618
  hasCommands,
470
619
  hasAgents,
471
- hasInstructions
620
+ hasInstructions,
621
+ hasScripts
472
622
  } = options;
473
623
  let installSkills = skills ?? false;
474
624
  let installCommands = commands ?? false;
475
625
  const installAgents = agents ?? hasAgents;
476
626
  const installInstructions = instructions ?? hasInstructions;
477
- const noOptionsProvided = skills === void 0 && commands === void 0 && agents === void 0 && instructions === void 0;
478
- if (noOptionsProvided && (hasSkills || hasCommands || hasAgents || hasInstructions)) {
627
+ const installScripts = scripts ?? hasScripts;
628
+ const noOptionsProvided = skills === void 0 && commands === void 0 && agents === void 0 && instructions === void 0 && scripts === void 0;
629
+ if (noOptionsProvided && (hasSkills || hasCommands || hasAgents || hasInstructions || hasScripts)) {
479
630
  logger.blank();
480
631
  if (hasSkills) {
481
632
  const result = await promptConfirm(
@@ -496,126 +647,41 @@ async function promptExtrasSelection(options) {
496
647
  installSkills,
497
648
  installCommands,
498
649
  installAgents,
499
- installInstructions
650
+ installInstructions,
651
+ installScripts
500
652
  };
501
653
  }
502
-
503
- // src/features/extras/extras-installer.ts
504
- async function handleDuplicateFiles(existingClaudeFiles, force) {
505
- if (existingClaudeFiles.length === 0 || force) {
506
- return true;
507
- }
508
- logger.warn("The following .claude files/folders already exist:");
509
- existingClaudeFiles.forEach((f) => logger.step(f));
510
- logger.blank();
511
- const response = await promptConfirm(
512
- "Overwrite existing .claude files?",
513
- false
514
- );
515
- return response.confirmed;
516
- }
517
- async function installSkillsIfNeeded(templates, targetDir, shouldInstall, hasSkills) {
518
- if (!shouldInstall) {
519
- return { files: 0, directories: 0 };
520
- }
521
- if (!hasSkills) {
522
- logger.warn("No skills found in selected templates.");
523
- return { files: 0, directories: 0 };
524
- }
525
- logger.blank();
526
- logger.info("Installing skills...");
527
- const skillsResult = await copySkills(templates, targetDir);
528
- logger.success(
529
- `Skills: ${skillsResult.files} files, ${skillsResult.directories} directories`
530
- );
531
- return skillsResult;
532
- }
533
- async function installCommandsIfNeeded(templates, targetDir, shouldInstall, hasCommands) {
534
- if (!shouldInstall) {
535
- return { files: 0, directories: 0 };
536
- }
537
- if (!hasCommands) {
538
- logger.warn("No commands found in selected templates.");
539
- return { files: 0, directories: 0 };
540
- }
541
- logger.blank();
542
- logger.info("Installing commands...");
543
- const commandsResult = await copyCommands(templates, targetDir);
544
- logger.success(
545
- `Commands: ${commandsResult.files} files, ${commandsResult.directories} directories`
546
- );
547
- return commandsResult;
548
- }
549
- async function installAgentsIfNeeded(templates, targetDir, shouldInstall, hasAgents) {
550
- if (!shouldInstall) {
551
- return { files: 0, directories: 0 };
552
- }
553
- if (!hasAgents) {
554
- logger.warn("No agents found in selected templates.");
555
- return { files: 0, directories: 0 };
654
+ async function promptScopeSelection(options) {
655
+ const { providedScope } = options;
656
+ if (providedScope) {
657
+ if (providedScope !== "project" && providedScope !== "user") {
658
+ logger.error(
659
+ `Invalid scope: "${providedScope}". Use "project" or "user".`
660
+ );
661
+ process.exit(1);
662
+ }
663
+ return { scope: providedScope };
556
664
  }
557
- logger.blank();
558
- logger.info("Installing agents...");
559
- const agentsResult = await copyAgents(templates, targetDir);
560
- logger.success(
561
- `Agents: ${agentsResult.files} files, ${agentsResult.directories} directories`
665
+ const response = await promptSelect(
666
+ "Select installation scope:",
667
+ [
668
+ {
669
+ title: "Project",
670
+ description: "Install to current project (.claude/)",
671
+ value: "project"
672
+ },
673
+ {
674
+ title: "User",
675
+ description: "Install to user home (~/.claude/)",
676
+ value: "user"
677
+ }
678
+ ]
562
679
  );
563
- return agentsResult;
564
- }
565
- async function installInstructionsIfNeeded(templates, targetDir, shouldInstall, hasInstructions) {
566
- if (!shouldInstall) {
567
- return { files: 0, directories: 0 };
568
- }
569
- if (!hasInstructions) {
570
- logger.warn("No instructions found in selected templates.");
571
- return { files: 0, directories: 0 };
680
+ if (!response.value) {
681
+ logger.info("Operation cancelled.");
682
+ process.exit(0);
572
683
  }
573
- logger.blank();
574
- logger.info("Installing instructions...");
575
- const instructionsResult = await copyInstructions(templates, targetDir);
576
- logger.success(
577
- `Instructions: ${instructionsResult.files} files, ${instructionsResult.directories} directories`
578
- );
579
- return instructionsResult;
580
- }
581
- async function installExtras(templates, targetDir, flags, availability, force) {
582
- const { installSkills, installCommands, installAgents, installInstructions } = flags;
583
- if (!installSkills && !installCommands && !installAgents && !installInstructions) {
584
- return { files: 0, directories: 0 };
585
- }
586
- const existingClaudeFiles = await checkExistingClaudeFiles(targetDir);
587
- const shouldProceed = await handleDuplicateFiles(existingClaudeFiles, force);
588
- if (!shouldProceed) {
589
- logger.info("Skipping extras installation.");
590
- return { files: 0, directories: 0 };
591
- }
592
- const skillsResult = await installSkillsIfNeeded(
593
- templates,
594
- targetDir,
595
- installSkills,
596
- availability.hasSkills
597
- );
598
- const commandsResult = await installCommandsIfNeeded(
599
- templates,
600
- targetDir,
601
- installCommands,
602
- availability.hasCommands
603
- );
604
- const agentsResult = await installAgentsIfNeeded(
605
- templates,
606
- targetDir,
607
- installAgents,
608
- availability.hasAgents
609
- );
610
- const instructionsResult = await installInstructionsIfNeeded(
611
- templates,
612
- targetDir,
613
- installInstructions,
614
- availability.hasInstructions
615
- );
616
- const totalFiles = skillsResult.files + commandsResult.files + agentsResult.files + instructionsResult.files;
617
- const totalDirectories = skillsResult.directories + commandsResult.directories + agentsResult.directories + instructionsResult.directories;
618
- return { files: totalFiles, directories: totalDirectories };
684
+ return { scope: response.value };
619
685
  }
620
686
 
621
687
  // src/shared/gitignore-manager.ts
@@ -760,26 +826,44 @@ async function installTemplates(templates, targetDir) {
760
826
  logger.success(`Total: ${totalFiles} files, ${totalDirectories} directories`);
761
827
  return { files: totalFiles, directories: totalDirectories };
762
828
  }
763
- async function promptForExtrasInstallation(options, hasSkills, hasCommands, hasAgents, hasInstructions) {
829
+ async function promptForExtrasInstallation(options, hasSkills, hasCommands, hasAgents, hasInstructions, hasScripts) {
764
830
  return await promptExtrasSelection({
765
831
  skills: options.skills,
766
832
  commands: options.commands,
767
833
  agents: options.agents,
768
834
  instructions: options.instructions,
835
+ scripts: options.scripts,
769
836
  hasSkills,
770
837
  hasCommands,
771
838
  hasAgents,
772
- hasInstructions
839
+ hasInstructions,
840
+ hasScripts
773
841
  });
774
842
  }
775
- function showInstallationSummary(templates, flags, hasSkills, hasCommands, hasAgents, hasInstructions) {
776
- logger.blank();
777
- logger.success("Claude Code documentation installed!");
843
+ function showInstallationSummary(templates, flags, hasSkills, hasCommands, hasAgents, hasInstructions, hasScripts, scope) {
844
+ const {
845
+ installSkills,
846
+ installCommands,
847
+ installAgents,
848
+ installInstructions,
849
+ installScripts
850
+ } = flags;
851
+ const hasExtrasInstalled = installSkills && hasSkills || installCommands && hasCommands || installAgents && hasAgents || installInstructions && hasInstructions || installScripts && hasScripts;
852
+ if (templates.length === 0 && !hasExtrasInstalled) {
853
+ logger.blank();
854
+ logger.info("No templates or extras installed.");
855
+ logger.blank();
856
+ return;
857
+ }
858
+ const scopeLabel = scope === "user" ? "(user scope \u2192 ~/.claude/)" : "(project scope)";
778
859
  logger.blank();
779
- logger.info("Installed templates:");
780
- templates.forEach((t) => logger.step(t));
781
- const { installSkills, installCommands, installAgents, installInstructions } = flags;
782
- if (installSkills && hasSkills || installCommands && hasCommands || installAgents && hasAgents || installInstructions && hasInstructions) {
860
+ logger.success(`Claude Code documentation installed! ${scopeLabel}`);
861
+ if (templates.length > 0) {
862
+ logger.blank();
863
+ logger.info("Installed templates:");
864
+ templates.forEach((t) => logger.step(t));
865
+ }
866
+ if (hasExtrasInstalled) {
783
867
  logger.blank();
784
868
  logger.info("Installed extras:");
785
869
  if (installSkills && hasSkills) {
@@ -794,53 +878,81 @@ function showInstallationSummary(templates, flags, hasSkills, hasCommands, hasAg
794
878
  if (installInstructions && hasInstructions) {
795
879
  logger.step("Instructions \u2192 .claude/instructions/");
796
880
  }
881
+ if (installScripts && hasScripts) {
882
+ logger.step("Scripts \u2192 .claude/scripts/");
883
+ }
797
884
  }
798
885
  logger.blank();
799
886
  logger.info("Next steps:");
800
- logger.step("Read CLAUDE.md for project guidelines");
801
- logger.step("Explore docs/ for detailed documentation");
887
+ if (templates.length > 0) {
888
+ logger.step("Read CLAUDE.md for project guidelines");
889
+ logger.step("Explore docs/ for detailed documentation");
890
+ } else {
891
+ logger.step("Explore .claude/ for installed extras");
892
+ logger.step('Run "npx @kood/claude-code init" again to install templates');
893
+ }
802
894
  logger.blank();
803
895
  }
804
896
  var init = async (options) => {
805
- const targetDir = options.cwd || process.cwd();
806
- await validateTargetDirectory(targetDir);
897
+ const projectDir = options.cwd || process.cwd();
898
+ await validateTargetDirectory(projectDir);
899
+ const { scope } = await promptScopeSelection({
900
+ providedScope: options.scope
901
+ });
902
+ const targetDir = scope === "user" ? os.homedir() : projectDir;
903
+ const isUserScope = scope === "user";
904
+ if (isUserScope) {
905
+ logger.blank();
906
+ logger.info(`Installing to ~/.claude/ (user scope)`);
907
+ }
807
908
  const availableTemplates = await listAvailableTemplates();
808
909
  if (availableTemplates.length === 0) {
809
910
  logger.error("No templates found. Package may be corrupted.");
810
911
  process.exit(1);
811
912
  }
812
- const templates = await selectTemplates(options, availableTemplates);
813
- await confirmOverwriteIfNeeded(targetDir, options.force ?? false);
814
- await installTemplates(templates, targetDir);
815
- const { hasSkills, hasCommands, hasAgents, hasInstructions } = await checkAllExtrasExist(templates);
913
+ let templates = [];
914
+ if (!isUserScope) {
915
+ templates = await selectTemplates(options, availableTemplates);
916
+ if (templates.length > 0) {
917
+ await confirmOverwriteIfNeeded(targetDir, options.force ?? false);
918
+ await installTemplates(templates, targetDir);
919
+ }
920
+ }
921
+ const templatesToCheck = templates.length > 0 ? templates : availableTemplates;
922
+ const { hasSkills, hasCommands, hasAgents, hasInstructions, hasScripts } = await checkAllExtrasExist(templatesToCheck);
816
923
  const flags = await promptForExtrasInstallation(
817
924
  options,
818
925
  hasSkills,
819
926
  hasCommands,
820
927
  hasAgents,
821
- hasInstructions
822
- );
823
- await installExtras(
824
- templates,
825
- targetDir,
826
- flags,
827
- { hasSkills, hasCommands, hasAgents, hasInstructions },
828
- options.force ?? false
928
+ hasInstructions,
929
+ hasScripts
829
930
  );
931
+ await installExtras(templatesToCheck, targetDir, flags, {
932
+ hasSkills,
933
+ hasCommands,
934
+ hasAgents,
935
+ hasInstructions,
936
+ hasScripts
937
+ });
830
938
  showInstallationSummary(
831
939
  templates,
832
940
  flags,
833
941
  hasSkills,
834
942
  hasCommands,
835
943
  hasAgents,
836
- hasInstructions
944
+ hasInstructions,
945
+ hasScripts,
946
+ scope
837
947
  );
838
- try {
839
- await updateGitignore(targetDir);
840
- } catch (error) {
841
- logger.warn(
842
- `Failed to update .gitignore: ${error instanceof Error ? error.message : "Unknown error"}`
843
- );
948
+ if (!isUserScope) {
949
+ try {
950
+ await updateGitignore(targetDir);
951
+ } catch (error) {
952
+ logger.warn(
953
+ `Failed to update .gitignore: ${error instanceof Error ? error.message : "Unknown error"}`
954
+ );
955
+ }
844
956
  }
845
957
  };
846
958
 
@@ -850,7 +962,7 @@ program.name("claude-code").description("Claude Code documentation installer for
850
962
  program.option(
851
963
  "-t, --template <names>",
852
964
  "template names (comma-separated: tanstack-start,hono)"
853
- ).option("-f, --force", "overwrite existing files without prompting").option("--cwd <path>", "target directory (default: current directory)").option("--list", "list available templates").option("-s, --skills", "install skills to .claude/skills/").option("-c, --commands", "install commands to .claude/commands/").option("-a, --agents", "install agents to .claude/agents/").action(async (options) => {
965
+ ).option("-f, --force", "overwrite existing files without prompting").option("--cwd <path>", "target directory (default: current directory)").option("--list", "list available templates").option("-s, --skills", "install skills to .claude/skills/").option("-c, --commands", "install commands to .claude/commands/").option("-a, --agents", "install agents to .claude/agents/").option("--scope <scope>", "installation scope (project|user)").action(async (options) => {
854
966
  banner();
855
967
  if (options.list) {
856
968
  const templates = await listAvailableTemplates();
@@ -863,6 +975,7 @@ program.option(
863
975
  templates: options.template?.split(",").map((t) => t.trim()),
864
976
  force: options.force,
865
977
  cwd: options.cwd,
978
+ scope: options.scope,
866
979
  skills: options.skills,
867
980
  commands: options.commands,
868
981
  agents: options.agents
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kood/claude-code",
3
- "version": "0.6.4",
3
+ "version": "0.6.6",
4
4
  "description": "Claude Code documentation installer for projects",
5
5
  "type": "module",
6
6
  "bin": "./dist/index.js",
@@ -2,58 +2,58 @@
2
2
  description: 모든 변경사항 커밋 후 푸시
3
3
  ---
4
4
 
5
- @../instructions/multi-agent/coordination-guide.md
6
- @../instructions/multi-agent/execution-patterns.md
7
-
8
5
  # Git All Command
9
6
 
10
- > @git-operator 에이전트를 사용하여 모든 변경사항을 커밋하고 푸시.
7
+ > 모든 변경사항을 커밋하고 푸시.
11
8
 
12
9
  ---
13
10
 
14
- <critical_requirements>
11
+ <scripts>
15
12
 
16
- ## ⚠️ CRITICAL: 작업 시작 전 필수 확인
13
+ ## 사용 가능한 스크립트
17
14
 
18
- **이 커맨드는 반드시 @git-operator 에이전트를 사용해야 합니다.**
15
+ | 스크립트 | 용도 |
16
+ |----------|------|
17
+ | `.claude/scripts/git/git-info.sh` | 상태 + diff 요약 출력 |
18
+ | `.claude/scripts/git/git-commit.sh "msg" [files]` | Co-Authored-By 포함 커밋 |
19
+ | `.claude/scripts/git/git-push.sh` | 안전한 푸시 |
20
+ | `.claude/scripts/git/git-all.sh "msg"` | add all + commit + push (단순 케이스) |
21
+ | `.claude/scripts/git/git-clean-check.sh` | clean 여부 확인 |
19
22
 
20
- ### MANDATORY: Task 도구로 @git-operator 호출
23
+ </scripts>
21
24
 
22
- ```typescript
23
- Task({
24
- subagent_type: 'git-operator',
25
- description: '모든 변경사항 커밋 후 푸시',
26
- prompt: `
27
- 전체 커밋 모드:
28
- - 모든 변경사항을 논리적 단위로 분리하여 전부 커밋
29
- - 반드시 푸시 (git push)
30
- - clean working directory 확인 필수
31
- `
32
- })
33
- ```
25
+ ---
34
26
 
35
- **❌ 절대 금지:**
36
- - Bash 도구로 git 명령 직접 실행
37
- - @git-operator 없이 커밋/푸시 수행
38
- - 커맨드 내에서 직접 파일 분석
27
+ <workflow>
39
28
 
40
- **✅ 필수:**
41
- - Task 도구로 @git-operator 에이전트 호출
42
- - 모든 git 작업을 에이전트에 위임
43
- - 완료 후 clean working directory 확인
29
+ ## 워크플로우
44
30
 
45
- ---
31
+ ### 단순 케이스 (단일 커밋)
46
32
 
47
- **진행 전 자가 점검:**
48
- ```text
49
- □ Task 도구 사용 준비?
50
- □ @git-operator 에이전트로 작업 위임?
51
- Bash로 git 직접 실행 함?
33
+ ```bash
34
+ # 1. 상태 확인
35
+ .claude/scripts/git/git-info.sh
36
+
37
+ # 2. 모든 변경사항 커밋 + 푸시
38
+ .claude/scripts/git/git-all.sh "feat: 기능 추가"
52
39
  ```
53
40
 
54
- **⚠️ 체크리스트를 통과하지 않으면 작업을 시작하지 마세요.**
41
+ ### 복잡한 케이스 (논리적 분리 필요)
42
+
43
+ ```bash
44
+ # 1. 상태 확인
45
+ .claude/scripts/git/git-info.sh
46
+
47
+ # 2. 그룹별 커밋
48
+ .claude/scripts/git/git-commit.sh "feat: A 기능" src/a.ts src/a.test.ts
49
+ .claude/scripts/git/git-commit.sh "fix: B 버그 수정" src/b.ts
50
+
51
+ # 3. clean 확인 후 푸시
52
+ .claude/scripts/git/git-clean-check.sh
53
+ .claude/scripts/git/git-push.sh
54
+ ```
55
55
 
56
- </critical_requirements>
56
+ </workflow>
57
57
 
58
58
  ---
59
59
 
@@ -67,15 +67,3 @@ Task({
67
67
 
68
68
  </mode>
69
69
 
70
- ---
71
-
72
- <workflow>
73
-
74
- 1. 모든 변경사항 분석
75
- 2. 논리적 단위로 그룹핑
76
- 3. 각 그룹별 커밋 (반복)
77
- 4. clean working directory 확인
78
- 5. git push 실행
79
-
80
- </workflow>
81
-