ya-git-jira 2.1.0 → 2.1.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.
Files changed (87) hide show
  1. package/bin/git-api.ts +2 -4
  2. package/bin/git-bump.ts +2 -4
  3. package/bin/git-confluence-page-search.ts +4 -6
  4. package/bin/git-confluence-page-show.ts +3 -5
  5. package/bin/git-confluence-page-update.ts +3 -5
  6. package/bin/git-confluence-page.ts +2 -4
  7. package/bin/git-confluence-space-list.ts +3 -5
  8. package/bin/git-confluence-space.ts +2 -4
  9. package/bin/git-confluence-whoami.ts +3 -5
  10. package/bin/git-confluence.ts +11 -4
  11. package/bin/git-jira-issue-list.ts +2 -4
  12. package/bin/git-jira-issue-show.ts +3 -5
  13. package/bin/git-jira-issue.ts +2 -4
  14. package/bin/git-jira-start.ts +2 -4
  15. package/bin/git-jira-whoami.ts +3 -5
  16. package/bin/git-jira.ts +11 -4
  17. package/bin/git-lab-group-list.ts +4 -6
  18. package/bin/git-lab-group.ts +2 -4
  19. package/bin/git-lab-merge-active.ts +4 -6
  20. package/bin/git-lab-merge-todo.ts +4 -6
  21. package/bin/git-lab-merge-train-list.ts +3 -5
  22. package/bin/git-lab-merge-train.ts +2 -4
  23. package/bin/git-lab-merge.ts +2 -4
  24. package/bin/git-lab-namespace-list.ts +3 -5
  25. package/bin/git-lab-namespace.ts +2 -4
  26. package/bin/git-lab-project-list.ts +4 -6
  27. package/bin/git-lab-project-mr-list.ts +4 -6
  28. package/bin/git-lab-project-mr.ts +2 -4
  29. package/bin/git-lab-project-pipeline-jobs.ts +2 -4
  30. package/bin/git-lab-project-pipeline-latest.ts +2 -4
  31. package/bin/git-lab-project-pipeline-list.ts +4 -6
  32. package/bin/git-lab-project-pipeline-log.ts +2 -4
  33. package/bin/git-lab-project-pipeline.ts +2 -4
  34. package/bin/git-lab-project-whereami.ts +3 -5
  35. package/bin/git-lab-project.ts +2 -4
  36. package/bin/git-lab-whoami.ts +3 -5
  37. package/bin/git-lab.ts +11 -4
  38. package/bin/gitj-install-skills.ts +2 -4
  39. package/bin/gitj.ts +6 -1
  40. package/dist/bin/git-api.js +33 -5
  41. package/dist/bin/git-bump.js +32 -24
  42. package/dist/bin/git-confluence-page-search.js +46 -26
  43. package/dist/bin/git-confluence-page-show.js +24 -4
  44. package/dist/bin/git-confluence-page-update.js +24 -4
  45. package/dist/bin/git-confluence-page.js +30 -16
  46. package/dist/bin/git-confluence-space-list.js +45 -25
  47. package/dist/bin/git-confluence-space.js +46 -28
  48. package/dist/bin/git-confluence-whoami.js +45 -25
  49. package/dist/bin/git-confluence.js +45 -31
  50. package/dist/bin/git-jira-issue-list.js +36 -24
  51. package/dist/bin/git-jira-issue-show.js +16 -4
  52. package/dist/bin/git-jira-issue.js +18 -10
  53. package/dist/bin/git-jira-start.js +16 -4
  54. package/dist/bin/git-jira-whoami.js +37 -25
  55. package/dist/bin/git-jira.js +32 -22
  56. package/dist/bin/git-lab-group-list.js +18 -6
  57. package/dist/bin/git-lab-group.js +19 -9
  58. package/dist/bin/git-lab-merge-active.js +18 -6
  59. package/dist/bin/git-lab-merge-todo.js +18 -6
  60. package/dist/bin/git-lab-merge-train-list.js +17 -5
  61. package/dist/bin/git-lab-merge-train.js +18 -8
  62. package/dist/bin/git-lab-merge.js +25 -21
  63. package/dist/bin/git-lab-namespace-list.js +38 -26
  64. package/dist/bin/git-lab-namespace.js +39 -29
  65. package/dist/bin/git-lab-project-list.js +18 -6
  66. package/dist/bin/git-lab-project-mr-list.js +18 -6
  67. package/dist/bin/git-lab-project-mr.js +19 -9
  68. package/dist/bin/git-lab-project-pipeline-jobs.js +16 -4
  69. package/dist/bin/git-lab-project-pipeline-latest.js +16 -4
  70. package/dist/bin/git-lab-project-pipeline-list.js +18 -6
  71. package/dist/bin/git-lab-project-pipeline-log.js +16 -4
  72. package/dist/bin/git-lab-project-pipeline.js +22 -18
  73. package/dist/bin/git-lab-project-whereami.js +17 -5
  74. package/dist/bin/git-lab-project.js +32 -38
  75. package/dist/bin/git-lab-whoami.js +17 -5
  76. package/dist/bin/git-lab.js +61 -81
  77. package/dist/bin/gitj-install-skills.js +21 -11
  78. package/dist/bin/gitj.js +154 -153
  79. package/dist/index.js +32 -1
  80. package/lib/api.ts +19 -1
  81. package/lib/confluence/api.ts +12 -0
  82. package/lib/confluence/config.ts +3 -3
  83. package/lib/gitlab/api.ts +4 -0
  84. package/lib/gitlab/config.ts +2 -2
  85. package/lib/is_main.ts +11 -0
  86. package/lib/jira.ts +7 -3
  87. package/package.json +1 -1
@@ -2497,7 +2497,7 @@ async function getGitlabConfig() {
2497
2497
  const host = await hostP || "gitlab.com";
2498
2498
  const user = await gitEmailP || await gitlabEmailP;
2499
2499
  if (!user)
2500
- throw new Error("Neither user.email nor gitlab.email in git config");
2500
+ throw new Error("Neither user.email nor gitlab.user in git config");
2501
2501
  const token = await tokenP;
2502
2502
  if (!token)
2503
2503
  throw new Error("gitlab.token not in git config");
@@ -2534,6 +2534,10 @@ async function gitlabApi(endpoint) {
2534
2534
  };
2535
2535
  let request = new Request(uri, options);
2536
2536
  const response = await fetch(request);
2537
+ if (!response.ok) {
2538
+ const text = await response.text();
2539
+ throw new Error(`GitLab API ${endpoint} failed (${response.status}): ${text}`);
2540
+ }
2537
2541
  let link = getNextLink(response.headers.get("Link"));
2538
2542
  let partial = await response.json();
2539
2543
  let result = partial;
@@ -2696,6 +2700,16 @@ function isMain(self) {
2696
2700
  const result = argv1Base === selfBase;
2697
2701
  return result;
2698
2702
  }
2703
+ async function runMain(self, create) {
2704
+ if (!isMain(self))
2705
+ return;
2706
+ try {
2707
+ await create().parseAsync(Bun.argv);
2708
+ } catch (err) {
2709
+ console.error(`error: ${err instanceof Error ? err.message : String(err)}`);
2710
+ process.exit(1);
2711
+ }
2712
+ }
2699
2713
 
2700
2714
  // bin/git-lab-merge-active.ts
2701
2715
  var version = await getPackageVersion();
@@ -2708,22 +2722,20 @@ function create() {
2708
2722
  process.exit(1);
2709
2723
  }
2710
2724
  if (options.verbose) {
2711
- console.log(merges);
2725
+ console.log(JSON.stringify(merges, null, 2));
2712
2726
  process.exit(0);
2713
2727
  } else {
2714
2728
  const filtered = merges.map((m) => {
2715
2729
  const { title, web_url, source_branch, target_branch } = m;
2716
2730
  return { title, web_url, source_branch, target_branch };
2717
2731
  });
2718
- console.log(filtered);
2732
+ console.log(JSON.stringify(filtered, null, 2));
2719
2733
  }
2720
2734
  });
2721
2735
  return program2;
2722
2736
  }
2723
2737
  var git_lab_merge_active_default = create;
2724
- if (isMain("git-lab-merge-active")) {
2725
- await create().parseAsync(Bun.argv);
2726
- }
2738
+ await runMain("git-lab-merge-active", create);
2727
2739
 
2728
2740
  // bin/git-lab-merge-todo.ts
2729
2741
  var version2 = await getPackageVersion();
@@ -2732,21 +2744,19 @@ function create2() {
2732
2744
  program2.version(version2).name("todo").description("MRs needing my review").option("-v, --verbose", "Verbose output").action(async (options) => {
2733
2745
  const mrs = await getMyMergeRequestsToReview();
2734
2746
  if (options.verbose) {
2735
- console.log(mrs);
2747
+ console.log(JSON.stringify(mrs, null, 2));
2736
2748
  } else {
2737
2749
  const filtered = mrs.map((mr) => {
2738
2750
  const { title, web_url, source_branch, target_branch } = mr;
2739
2751
  return { title, web_url, source_branch, target_branch };
2740
2752
  });
2741
- console.log(filtered);
2753
+ console.log(JSON.stringify(filtered, null, 2));
2742
2754
  }
2743
2755
  });
2744
2756
  return program2;
2745
2757
  }
2746
2758
  var git_lab_merge_todo_default = create2;
2747
- if (isMain("git-lab-merge-todo")) {
2748
- await create2().parseAsync(Bun.argv);
2749
- }
2759
+ await runMain("git-lab-merge-todo", create2);
2750
2760
 
2751
2761
  // lib/gitlab/merge-trains.ts
2752
2762
  async function getMergeTrains() {
@@ -2759,14 +2769,12 @@ function create3() {
2759
2769
  const program2 = new Command;
2760
2770
  program2.version(version3).name("list").description("List merge trains for the current project").action(async () => {
2761
2771
  const trains = await getMergeTrains();
2762
- console.log(trains);
2772
+ console.log(JSON.stringify(trains, null, 2));
2763
2773
  });
2764
2774
  return program2;
2765
2775
  }
2766
2776
  var git_lab_merge_train_list_default = create3;
2767
- if (isMain("git-lab-merge-train-list")) {
2768
- await create3().parseAsync(Bun.argv);
2769
- }
2777
+ await runMain("git-lab-merge-train-list", create3);
2770
2778
 
2771
2779
  // bin/git-lab-merge-train.ts
2772
2780
  var version4 = await getPackageVersion();
@@ -2776,9 +2784,7 @@ function create4() {
2776
2784
  return program2;
2777
2785
  }
2778
2786
  var git_lab_merge_train_default = create4;
2779
- if (isMain("git-lab-merge-train")) {
2780
- await create4().parseAsync(Bun.argv);
2781
- }
2787
+ await runMain("git-lab-merge-train", create4);
2782
2788
 
2783
2789
  // bin/git-lab-merge.ts
2784
2790
  var version5 = await getPackageVersion();
@@ -2788,9 +2794,7 @@ function create5() {
2788
2794
  return program2;
2789
2795
  }
2790
2796
  var git_lab_merge_default = create5;
2791
- if (isMain("git-lab-merge")) {
2792
- await create5().parseAsync(Bun.argv);
2793
- }
2797
+ await runMain("git-lab-merge", create5);
2794
2798
 
2795
2799
  // bin/git-lab-namespace-list.ts
2796
2800
  var version6 = await getPackageVersion();
@@ -2798,14 +2802,12 @@ function create6() {
2798
2802
  const program2 = new Command;
2799
2803
  program2.version(version6).name("list").description("List namespaces for the current user").action(async () => {
2800
2804
  const namespaces = await getNamespaces();
2801
- console.log(namespaces);
2805
+ console.log(JSON.stringify(namespaces, null, 2));
2802
2806
  });
2803
2807
  return program2;
2804
2808
  }
2805
2809
  var git_lab_namespace_list_default = create6;
2806
- if (isMain("git-lab-namespace-list")) {
2807
- await create6().parseAsync(Bun.argv);
2808
- }
2810
+ await runMain("git-lab-namespace-list", create6);
2809
2811
 
2810
2812
  // bin/git-lab-namespace.ts
2811
2813
  var version7 = await getPackageVersion();
@@ -2815,9 +2817,7 @@ function create7() {
2815
2817
  return program2;
2816
2818
  }
2817
2819
  var git_lab_namespace_default = create7;
2818
- if (isMain("git-lab-namespace")) {
2819
- await create7().parseAsync(Bun.argv);
2820
- }
2820
+ await runMain("git-lab-namespace", create7);
2821
2821
 
2822
2822
  // bin/git-lab-project-list.ts
2823
2823
  var version8 = await getPackageVersion();
@@ -2830,21 +2830,19 @@ function create8() {
2830
2830
  process.exit(1);
2831
2831
  }
2832
2832
  if (options.verbose) {
2833
- console.log(projects);
2833
+ console.log(JSON.stringify(projects, null, 2));
2834
2834
  } else {
2835
2835
  let filtered = projects.map((p) => {
2836
2836
  const { id, name, path_with_namespace, ssh_url_to_repo } = p;
2837
2837
  return { id, name, path_with_namespace, ssh_url_to_repo };
2838
2838
  });
2839
- console.log(filtered);
2839
+ console.log(JSON.stringify(filtered, null, 2));
2840
2840
  }
2841
2841
  });
2842
2842
  return program2;
2843
2843
  }
2844
2844
  var git_lab_project_list_default = create8;
2845
- if (isMain("git-lab-project-list")) {
2846
- await create8().parseAsync(Bun.argv);
2847
- }
2845
+ await runMain("git-lab-project-list", create8);
2848
2846
 
2849
2847
  // bin/git-lab-project-mr-list.ts
2850
2848
  var version9 = await getPackageVersion();
@@ -2868,21 +2866,19 @@ function create9() {
2868
2866
  process.exit(0);
2869
2867
  }
2870
2868
  if (options.verbose) {
2871
- console.log(mrs);
2869
+ console.log(JSON.stringify(mrs, null, 2));
2872
2870
  } else {
2873
2871
  const filtered = mrs.map((m) => {
2874
2872
  const { iid, title, web_url, source_branch, target_branch, state, draft } = m;
2875
2873
  return { iid, title, web_url, source_branch, target_branch, state, draft };
2876
2874
  });
2877
- console.log(filtered);
2875
+ console.log(JSON.stringify(filtered, null, 2));
2878
2876
  }
2879
2877
  });
2880
2878
  return program2;
2881
2879
  }
2882
2880
  var git_lab_project_mr_list_default = create9;
2883
- if (isMain("git-lab-project-mr-list")) {
2884
- await create9().parseAsync(Bun.argv);
2885
- }
2881
+ await runMain("git-lab-project-mr-list", create9);
2886
2882
 
2887
2883
  // bin/git-lab-project-mr.ts
2888
2884
  var version10 = await getPackageVersion();
@@ -2892,9 +2888,7 @@ function create10() {
2892
2888
  return program2;
2893
2889
  }
2894
2890
  var git_lab_project_mr_default = create10;
2895
- if (isMain("git-lab-project-mr")) {
2896
- await create10().parseAsync(Bun.argv);
2897
- }
2891
+ await runMain("git-lab-project-mr", create10);
2898
2892
 
2899
2893
  // bin/git-lab-project-pipeline-jobs.ts
2900
2894
  var version11 = await getPackageVersion();
@@ -2924,9 +2918,7 @@ function create11() {
2924
2918
  return program2;
2925
2919
  }
2926
2920
  var git_lab_project_pipeline_jobs_default = create11;
2927
- if (isMain("git-lab-project-pipeline-jobs")) {
2928
- await create11().parseAsync(Bun.argv);
2929
- }
2921
+ await runMain("git-lab-project-pipeline-jobs", create11);
2930
2922
 
2931
2923
  // bin/git-lab-project-pipeline-latest.ts
2932
2924
  var version12 = await getPackageVersion();
@@ -2958,9 +2950,7 @@ function create12() {
2958
2950
  return program2;
2959
2951
  }
2960
2952
  var git_lab_project_pipeline_latest_default = create12;
2961
- if (isMain("git-lab-project-pipeline-latest")) {
2962
- await create12().parseAsync(Bun.argv);
2963
- }
2953
+ await runMain("git-lab-project-pipeline-latest", create12);
2964
2954
 
2965
2955
  // bin/git-lab-project-pipeline-list.ts
2966
2956
  var import_debug2 = __toESM(require_src(), 1);
@@ -2976,21 +2966,19 @@ function create13() {
2976
2966
  process.exit(1);
2977
2967
  }
2978
2968
  if (options.verbose) {
2979
- console.log(pipelines);
2969
+ console.log(JSON.stringify(pipelines, null, 2));
2980
2970
  } else {
2981
2971
  let filtered = pipelines.map((p) => {
2982
2972
  const { id, web_url, updated_at, ref, sha } = p;
2983
2973
  return { id, web_url, updated_at, ref, sha };
2984
2974
  });
2985
- console.log(filtered);
2975
+ console.log(JSON.stringify(filtered, null, 2));
2986
2976
  }
2987
2977
  });
2988
2978
  return program2;
2989
2979
  }
2990
2980
  var git_lab_project_pipeline_list_default = create13;
2991
- if (isMain("git-lab-project-pipeline-list")) {
2992
- await create13().parseAsync(Bun.argv);
2993
- }
2981
+ await runMain("git-lab-project-pipeline-list", create13);
2994
2982
 
2995
2983
  // bin/git-lab-project-pipeline-log.ts
2996
2984
  var version14 = await getPackageVersion();
@@ -3025,9 +3013,7 @@ function create14() {
3025
3013
  return program2;
3026
3014
  }
3027
3015
  var git_lab_project_pipeline_log_default = create14;
3028
- if (isMain("git-lab-project-pipeline-log")) {
3029
- await create14().parseAsync(Bun.argv);
3030
- }
3016
+ await runMain("git-lab-project-pipeline-log", create14);
3031
3017
 
3032
3018
  // bin/git-lab-project-pipeline.ts
3033
3019
  var version15 = await getPackageVersion();
@@ -3037,9 +3023,7 @@ function create15() {
3037
3023
  return program2;
3038
3024
  }
3039
3025
  var git_lab_project_pipeline_default = create15;
3040
- if (isMain("git-lab-project-pipeline")) {
3041
- await create15().parseAsync(Bun.argv);
3042
- }
3026
+ await runMain("git-lab-project-pipeline", create15);
3043
3027
 
3044
3028
  // bin/git-lab-project-whereami.ts
3045
3029
  var version16 = await getPackageVersion();
@@ -3058,7 +3042,7 @@ function create16() {
3058
3042
  process.exit(1);
3059
3043
  }
3060
3044
  if (options.verbose) {
3061
- console.log(project2);
3045
+ console.log(JSON.stringify(project2, null, 2));
3062
3046
  } else {
3063
3047
  const { id, name, path_with_namespace, ssh_url_to_repo } = project2;
3064
3048
  console.log({ id, name, path_with_namespace, ssh_url_to_repo });
@@ -3067,9 +3051,7 @@ function create16() {
3067
3051
  return program2;
3068
3052
  }
3069
3053
  var git_lab_project_whereami_default = create16;
3070
- if (isMain("git-lab-project-whereami")) {
3071
- await create16().parseAsync(Bun.argv);
3072
- }
3054
+ await runMain("git-lab-project-whereami", create16);
3073
3055
 
3074
3056
  // bin/git-lab-project.ts
3075
3057
  var version17 = await getPackageVersion();
@@ -3081,9 +3063,7 @@ function create17() {
3081
3063
  return program2;
3082
3064
  }
3083
3065
  var git_lab_project_default = create17;
3084
- if (isMain("git-lab-project")) {
3085
- await create17().parseAsync(Bun.argv);
3086
- }
3066
+ await runMain("git-lab-project", create17);
3087
3067
 
3088
3068
  // bin/git-lab-group-list.ts
3089
3069
  var version18 = await getPackageVersion();
@@ -3092,21 +3072,19 @@ function create18() {
3092
3072
  program2.version(version18).name("list").description("List groups for the current user").option("-v, --verbose", "Verbose output").action(async (options) => {
3093
3073
  const groups = await getGroups();
3094
3074
  if (options.verbose)
3095
- console.log(groups);
3075
+ console.log(JSON.stringify(groups, null, 2));
3096
3076
  else {
3097
3077
  const filtered = groups.map((g) => {
3098
3078
  const { id, name, full_path } = g;
3099
3079
  return { id, name, full_path };
3100
3080
  });
3101
- console.log(filtered);
3081
+ console.log(JSON.stringify(filtered, null, 2));
3102
3082
  }
3103
3083
  });
3104
3084
  return program2;
3105
3085
  }
3106
3086
  var git_lab_group_list_default = create18;
3107
- if (isMain("git-lab-group-list")) {
3108
- await create18().parseAsync(Bun.argv);
3109
- }
3087
+ await runMain("git-lab-group-list", create18);
3110
3088
 
3111
3089
  // bin/git-lab-group.ts
3112
3090
  var version19 = await getPackageVersion();
@@ -3116,9 +3094,7 @@ function create19() {
3116
3094
  return program2;
3117
3095
  }
3118
3096
  var git_lab_group_default = create19;
3119
- if (isMain("git-lab-group")) {
3120
- await create19().parseAsync(Bun.argv);
3121
- }
3097
+ await runMain("git-lab-group", create19);
3122
3098
 
3123
3099
  // bin/git-lab-whoami.ts
3124
3100
  var version20 = await getPackageVersion();
@@ -3131,7 +3107,7 @@ function create20() {
3131
3107
  process.exit(1);
3132
3108
  }
3133
3109
  if (options.verbose) {
3134
- console.log(user2);
3110
+ console.log(JSON.stringify(user2, null, 2));
3135
3111
  process.exit(0);
3136
3112
  } else {
3137
3113
  console.log(user2.username);
@@ -3140,21 +3116,25 @@ function create20() {
3140
3116
  return program2;
3141
3117
  }
3142
3118
  var git_lab_whoami_default = create20;
3143
- if (isMain("git-lab-whoami")) {
3144
- await create20().parseAsync(Bun.argv);
3145
- }
3119
+ await runMain("git-lab-whoami", create20);
3146
3120
 
3147
3121
  // bin/git-lab.ts
3148
3122
  var version21 = await getPackageVersion();
3149
3123
  function create21() {
3150
3124
  const program2 = new Command;
3151
- program2.version(version21).name("lab").description("Commands for working with GitLab").addCommand(git_lab_group_default()).addCommand(git_lab_merge_default()).addCommand(git_lab_namespace_default()).addCommand(git_lab_project_default()).addCommand(git_lab_whoami_default()).action(() => program2.help());
3125
+ program2.version(version21).name("lab").description("Commands for working with GitLab").addCommand(git_lab_group_default()).addCommand(git_lab_merge_default()).addCommand(git_lab_namespace_default()).addCommand(git_lab_project_default()).addCommand(git_lab_whoami_default()).action(() => program2.help()).addHelpText("after", `
3126
+ Required git config:
3127
+ gitlab.token your GitLab personal access token
3128
+
3129
+ Optional git config:
3130
+ gitlab.host your GitLab hostname (defaults to gitlab.com)
3131
+ gitlab.user your GitLab email (falls back to user.email)
3132
+
3133
+ Set with: git config --global gitlab.token <value>`);
3152
3134
  return program2;
3153
3135
  }
3154
3136
  var git_lab_default = create21;
3155
- if (isMain("git-lab")) {
3156
- await create21().parseAsync(Bun.argv);
3157
- }
3137
+ await runMain("git-lab", create21);
3158
3138
  export {
3159
3139
  git_lab_default as default,
3160
3140
  create21 as create
@@ -1853,11 +1853,20 @@ function isMain(self) {
1853
1853
  const result = argv1Base === selfBase;
1854
1854
  return result;
1855
1855
  }
1856
+ async function runMain(self, create) {
1857
+ if (!isMain(self))
1858
+ return;
1859
+ try {
1860
+ await create().parseAsync(Bun.argv);
1861
+ } catch (err) {
1862
+ console.error(`error: ${err instanceof Error ? err.message : String(err)}`);
1863
+ process.exit(1);
1864
+ }
1865
+ }
1856
1866
 
1857
1867
  // bin/gitj-install-skills.ts
1858
1868
  import fs2 from "fs";
1859
1869
  import path3 from "path";
1860
- import os from "os";
1861
1870
  var version = await getPackageVersion();
1862
1871
  var frameworks = ["opencode", "copilot", "claude"];
1863
1872
  var skillNames = ["git-jira", "git-lab", "git-confluence"];
@@ -1874,14 +1883,14 @@ function getSkillsSourceDir() {
1874
1883
  return skillsDir;
1875
1884
  }
1876
1885
  function getTargetDir(framework) {
1877
- const home = os.homedir();
1886
+ const cwd = process.cwd();
1878
1887
  switch (framework) {
1879
1888
  case "opencode":
1880
- return path3.join(home, ".config", "opencode", "skills");
1889
+ return path3.join(cwd, ".opencode", "skills");
1881
1890
  case "copilot":
1882
- return path3.join(home, ".copilot", "skills");
1891
+ return path3.join(cwd, ".github", "skills");
1883
1892
  case "claude":
1884
- return path3.join(process.cwd(), ".claude", "skills");
1893
+ return path3.join(cwd, ".claude", "skills");
1885
1894
  }
1886
1895
  }
1887
1896
  function installSkills(framework, copy) {
@@ -1930,24 +1939,25 @@ function forceInstallSkills(framework, copy) {
1930
1939
  }
1931
1940
  function create() {
1932
1941
  const program2 = new Command;
1933
- program2.version(version).name("install-skills").description("Install AI agent skills for a coding framework").argument("<framework>", `framework to install for (${frameworks.join(", ")})`).option("--copy", "copy files instead of creating symlinks").option("--force", "overwrite existing skill directories").action(async (framework, options) => {
1942
+ program2.version(version).name("install-skills").description("Install AI agent skills for a coding framework").argument("<framework>", `framework to install for (${frameworks.join(", ")})`).option("--copy", "copy files instead of creating symlinks (automatic in Docker)").option("--force", "overwrite existing skill directories").action(async (framework, options) => {
1934
1943
  if (!frameworks.includes(framework)) {
1935
1944
  console.error(`Unknown framework: ${framework}`);
1936
1945
  console.error(`Supported frameworks: ${frameworks.join(", ")}`);
1937
1946
  process.exit(1);
1938
1947
  }
1948
+ const sourceDir = getSkillsSourceDir();
1949
+ const inDocker = sourceDir.startsWith("/app/");
1950
+ const copy = !!(options.copy || inDocker);
1939
1951
  if (options.force) {
1940
- forceInstallSkills(framework, !!options.copy);
1952
+ forceInstallSkills(framework, copy);
1941
1953
  } else {
1942
- installSkills(framework, !!options.copy);
1954
+ installSkills(framework, copy);
1943
1955
  }
1944
1956
  });
1945
1957
  return program2;
1946
1958
  }
1947
1959
  var gitj_install_skills_default = create;
1948
- if (isMain("gitj-install-skills")) {
1949
- await create().parseAsync(Bun.argv);
1950
- }
1960
+ await runMain("gitj-install-skills", create);
1951
1961
  export {
1952
1962
  gitj_install_skills_default as default,
1953
1963
  create