xling 0.7.0 → 0.7.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.
Files changed (111) hide show
  1. package/dist/{base-ZLSUOdyk.d.ts → base-BxGCoslm.d.ts} +2 -2
  2. package/dist/base-CSwZL00J.js +1 -30
  3. package/dist/{base-B5MGQGLN.d.ts → base-D1BJt9i-.d.ts} +3 -2
  4. package/dist/base-DtcPVpvU.js +1 -68
  5. package/dist/claude-C6lOG2Mk.js +1 -206
  6. package/dist/claude-lgXq7-0w.js +1 -0
  7. package/dist/claudeDefault-ewrEKzlX.js +1 -18
  8. package/dist/client-DTC49Rug.js +1 -88
  9. package/dist/codex-Dl7Rx7Nr.js +1 -83
  10. package/dist/codex-sOnl7pFp.js +1 -0
  11. package/dist/commands/git/index.js +5 -35
  12. package/dist/commands/git/prc.js +2 -121
  13. package/dist/commands/git/prr.js +2 -80
  14. package/dist/commands/git/prv.js +2 -70
  15. package/dist/commands/git/worktree.js +3 -135
  16. package/dist/commands/git/wta.js +3 -78
  17. package/dist/commands/git/wtl.js +3 -42
  18. package/dist/commands/git/wtp.js +3 -42
  19. package/dist/commands/git/wtr.js +3 -77
  20. package/dist/commands/git/wts.js +2 -99
  21. package/dist/commands/p/index.js +15 -380
  22. package/dist/commands/settings/get.js +2 -119
  23. package/dist/commands/settings/inspect.js +3 -85
  24. package/dist/commands/settings/list.js +6 -151
  25. package/dist/commands/settings/set.js +2 -87
  26. package/dist/commands/settings/switch.js +4 -165
  27. package/dist/commands/sx/index.js +12 -93
  28. package/dist/commands/version/index.js +1 -22
  29. package/dist/commands/x/index.js +4 -104
  30. package/dist/config-JHw2hqMN.js +1 -141
  31. package/dist/create-CKUHliul.js +1 -95
  32. package/dist/dispatcher-5y9x6plQ.js +1 -0
  33. package/dist/dispatcher-BYazaYbC.js +1 -75
  34. package/dist/dispatcher-D4bEJonH.js +1 -30
  35. package/dist/domain/git.js +1 -3
  36. package/dist/domain/interfaces.d.ts +2 -2
  37. package/dist/domain/interfaces.js +1 -1
  38. package/dist/domain/types.d.ts +1 -1
  39. package/dist/domain/types.js +1 -1
  40. package/dist/domain/validators.d.ts +1 -1
  41. package/dist/domain/validators.js +1 -57
  42. package/dist/domain/xling/config.js +1 -3
  43. package/dist/domain/xling/template.js +1 -3
  44. package/dist/editor-CUiekAEb.js +1 -31
  45. package/dist/errors-pXKbCKbL.js +1 -115
  46. package/dist/format-a_tYXjv9.js +4 -229
  47. package/dist/fsStore-S8RslR8L.js +1 -122
  48. package/dist/gemini-DQoPiuiw.js +1 -49
  49. package/dist/git-BZvqM5hz.js +1 -12
  50. package/dist/{interfaces-Cy1OFHgI.d.ts → interfaces-D5gBXflS.d.ts} +2 -1
  51. package/dist/pr-DjdO-vJk.js +1 -61
  52. package/dist/providerRegistry-Cljln1eo.js +1 -151
  53. package/dist/router-DX-dIEei.js +1 -177
  54. package/dist/run.js +1 -13
  55. package/dist/runner-Bi5mGd-w.js +1 -203
  56. package/dist/runner-DYk4q6mP.js +1 -145
  57. package/dist/services/git/create.js +1 -6
  58. package/dist/services/git/dispatcher.js +1 -10
  59. package/dist/services/git/pr.js +1 -6
  60. package/dist/services/git/utils.js +1 -5
  61. package/dist/services/git/view.js +1 -6
  62. package/dist/services/git/worktree.js +1 -5
  63. package/dist/services/launch/adapters/base.d.ts +3 -3
  64. package/dist/services/launch/adapters/base.js +1 -4
  65. package/dist/services/launch/adapters/claude.d.ts +6 -3
  66. package/dist/services/launch/adapters/claude.js +1 -5
  67. package/dist/services/launch/adapters/codex.d.ts +6 -3
  68. package/dist/services/launch/adapters/codex.js +1 -5
  69. package/dist/services/launch/dispatcher.d.ts +2 -2
  70. package/dist/services/launch/dispatcher.js +1 -8
  71. package/dist/services/prompt/client.js +1 -3
  72. package/dist/services/prompt/providerRegistry.js +1 -10
  73. package/dist/services/prompt/router.js +1 -13
  74. package/dist/services/prompt/types.js +1 -3
  75. package/dist/services/settings/adapters/base.d.ts +3 -3
  76. package/dist/services/settings/adapters/base.js +1 -5
  77. package/dist/services/settings/adapters/claude.d.ts +3 -3
  78. package/dist/services/settings/adapters/claude.js +1 -9
  79. package/dist/services/settings/adapters/codex.d.ts +3 -3
  80. package/dist/services/settings/adapters/codex.js +1 -6
  81. package/dist/services/settings/adapters/gemini.d.ts +3 -3
  82. package/dist/services/settings/adapters/gemini.js +1 -6
  83. package/dist/services/settings/adapters/xling.d.ts +3 -3
  84. package/dist/services/settings/adapters/xling.js +1 -9
  85. package/dist/services/settings/dispatcher.d.ts +2 -2
  86. package/dist/services/settings/dispatcher.js +1 -15
  87. package/dist/services/settings/fsStore.d.ts +1 -1
  88. package/dist/services/settings/fsStore.js +1 -4
  89. package/dist/services/settings/templates/claudeDefault.d.ts +1 -1
  90. package/dist/services/settings/templates/claudeDefault.js +1 -3
  91. package/dist/services/shortcuts/runner.js +1 -11
  92. package/dist/services/shortcuts/types.js +1 -3
  93. package/dist/template-B19CdPfg.js +1 -164
  94. package/dist/types-99-EmVXg.js +2 -25
  95. package/dist/types-DblJSHMa.js +1 -23
  96. package/dist/{types-5rST51Xi.d.ts → types-RoapPbyI.d.ts} +1 -0
  97. package/dist/utils/editor.js +1 -4
  98. package/dist/utils/errors.js +1 -3
  99. package/dist/utils/format.d.ts +1 -1
  100. package/dist/utils/format.js +1 -3
  101. package/dist/utils/logger.js +1 -42
  102. package/dist/utils/runner.d.ts +1 -1
  103. package/dist/utils/runner.js +1 -3
  104. package/dist/utils-DDnNMPIq.js +1 -35
  105. package/dist/view-JZaEEspp.js +1 -84
  106. package/dist/worktree-BuIXmI0X.js +3 -205
  107. package/dist/xling-BxVsmPja.js +1 -254
  108. package/package.json +1 -1
  109. package/dist/claude-YXQbPr5h.js +0 -29
  110. package/dist/codex-UE8EaZGt.js +0 -30
  111. package/dist/dispatcher-BCISF-Uw.js +0 -87
@@ -1,123 +1,4 @@
1
- import { t as SUPPORTED_BROWSERS } from "../../git-BZvqM5hz.js";
2
- import "../../errors-pXKbCKbL.js";
3
- import "../../runner-DYk4q6mP.js";
4
- import "../../utils-DDnNMPIq.js";
5
- import "../../pr-DjdO-vJk.js";
6
- import "../../view-JZaEEspp.js";
7
- import "../../worktree-BuIXmI0X.js";
8
- import "../../create-CKUHliul.js";
9
- import { t as GitDispatcher } from "../../dispatcher-D4bEJonH.js";
10
- import { Command, Flags } from "@oclif/core";
11
-
12
- //#region src/commands/git/prc.ts
13
- /**
14
- * git:prc command
15
- * Create a pull request with optional browser preview
16
- */
17
- var Prc = class Prc extends Command {
18
- static summary = "Create a pull request (PR Create)";
19
- static description = `
1
+ import{t as e}from"../../git-BZvqM5hz.js";import"../../errors-pXKbCKbL.js";import"../../runner-DYk4q6mP.js";import"../../utils-DDnNMPIq.js";import"../../pr-DjdO-vJk.js";import"../../view-JZaEEspp.js";import"../../worktree-BuIXmI0X.js";import"../../create-CKUHliul.js";import{t}from"../../dispatcher-D4bEJonH.js";import{Command as n,Flags as r}from"@oclif/core";var i=class i extends n{static summary=`Create a pull request (PR Create)`;static description=`
20
2
  Create a pull request using GitHub CLI.
21
3
  Supports automatic browser preview with customizable browser selection.
22
- `;
23
- static examples = [
24
- {
25
- description: "Create PR interactively",
26
- command: "<%= config.bin %> <%= command.id %>"
27
- },
28
- {
29
- description: "Create PR with title and body",
30
- command: "<%= config.bin %> <%= command.id %> --title \"Feature X\" --body \"Implements feature X\""
31
- },
32
- {
33
- description: "Create PR and open in browser",
34
- command: "<%= config.bin %> <%= command.id %> --web"
35
- },
36
- {
37
- description: "Create PR and preview in Safari",
38
- command: "<%= config.bin %> <%= command.id %> --web --browser safari"
39
- },
40
- {
41
- description: "Create draft PR",
42
- command: "<%= config.bin %> <%= command.id %> --draft --title \"WIP: Feature X\""
43
- },
44
- {
45
- description: "Create PR with reviewers and labels",
46
- command: "<%= config.bin %> <%= command.id %> --reviewer user1 --reviewer user2 --label bug --label urgent"
47
- }
48
- ];
49
- static flags = {
50
- title: Flags.string({
51
- char: "t",
52
- description: "PR title"
53
- }),
54
- body: Flags.string({
55
- char: "b",
56
- description: "PR body/description"
57
- }),
58
- base: Flags.string({ description: "Base branch (default: repository default branch)" }),
59
- head: Flags.string({ description: "Head branch (default: current branch)" }),
60
- draft: Flags.boolean({
61
- char: "d",
62
- description: "Create as draft PR",
63
- default: false
64
- }),
65
- web: Flags.boolean({
66
- char: "w",
67
- description: "Open PR in browser after creation",
68
- default: false
69
- }),
70
- browser: Flags.string({
71
- description: "Browser to use when --web is enabled",
72
- options: [...SUPPORTED_BROWSERS],
73
- default: "chrome"
74
- }),
75
- assignee: Flags.string({
76
- char: "a",
77
- description: "Assign user(s) (can be used multiple times)",
78
- multiple: true
79
- }),
80
- reviewer: Flags.string({
81
- char: "r",
82
- description: "Request reviewer(s) (can be used multiple times)",
83
- multiple: true
84
- }),
85
- label: Flags.string({
86
- char: "l",
87
- description: "Add label(s) (can be used multiple times)",
88
- multiple: true
89
- })
90
- };
91
- async run() {
92
- const { flags } = await this.parse(Prc);
93
- const dispatcher = new GitDispatcher();
94
- const request = {
95
- title: flags.title,
96
- body: flags.body,
97
- base: flags.base,
98
- head: flags.head,
99
- draft: flags.draft,
100
- web: flags.web,
101
- browser: flags.browser,
102
- assignee: flags.assignee,
103
- reviewer: flags.reviewer,
104
- label: flags.label
105
- };
106
- try {
107
- const result = await dispatcher.execute({
108
- command: "prc",
109
- cwd: process.cwd(),
110
- data: request
111
- });
112
- this.log(`✓ ${result.message}`);
113
- if (result.details?.draft) this.log(" Type: Draft PR");
114
- if (result.details?.base) this.log(` Base: ${result.details.base}`);
115
- if (result.details?.head) this.log(` Head: ${result.details.head}`);
116
- } catch (error) {
117
- this.error(error.message, { exit: 1 });
118
- }
119
- }
120
- };
121
-
122
- //#endregion
123
- export { Prc as default };
4
+ `;static examples=[{description:`Create PR interactively`,command:`<%= config.bin %> <%= command.id %>`},{description:`Create PR with title and body`,command:`<%= config.bin %> <%= command.id %> --title "Feature X" --body "Implements feature X"`},{description:`Create PR and open in browser`,command:`<%= config.bin %> <%= command.id %> --web`},{description:`Create PR and preview in Safari`,command:`<%= config.bin %> <%= command.id %> --web --browser safari`},{description:`Create draft PR`,command:`<%= config.bin %> <%= command.id %> --draft --title "WIP: Feature X"`},{description:`Create PR with reviewers and labels`,command:`<%= config.bin %> <%= command.id %> --reviewer user1 --reviewer user2 --label bug --label urgent`}];static flags={title:r.string({char:`t`,description:`PR title`}),body:r.string({char:`b`,description:`PR body/description`}),base:r.string({description:`Base branch (default: repository default branch)`}),head:r.string({description:`Head branch (default: current branch)`}),draft:r.boolean({char:`d`,description:`Create as draft PR`,default:!1}),web:r.boolean({char:`w`,description:`Open PR in browser after creation`,default:!1}),browser:r.string({description:`Browser to use when --web is enabled`,options:[...e],default:`chrome`}),assignee:r.string({char:`a`,description:`Assign user(s) (can be used multiple times)`,multiple:!0}),reviewer:r.string({char:`r`,description:`Request reviewer(s) (can be used multiple times)`,multiple:!0}),label:r.string({char:`l`,description:`Add label(s) (can be used multiple times)`,multiple:!0})};async run(){let{flags:e}=await this.parse(i),n=new t,r={title:e.title,body:e.body,base:e.base,head:e.head,draft:e.draft,web:e.web,browser:e.browser,assignee:e.assignee,reviewer:e.reviewer,label:e.label};try{let e=await n.execute({command:`prc`,cwd:process.cwd(),data:r});this.log(`✓ ${e.message}`),e.details?.draft&&this.log(` Type: Draft PR`),e.details?.base&&this.log(` Base: ${e.details.base}`),e.details?.head&&this.log(` Head: ${e.details.head}`)}catch(e){this.error(e.message,{exit:1})}}};export{i as default};
@@ -1,82 +1,4 @@
1
- import "../../errors-pXKbCKbL.js";
2
- import "../../runner-DYk4q6mP.js";
3
- import "../../utils-DDnNMPIq.js";
4
- import "../../pr-DjdO-vJk.js";
5
- import "../../view-JZaEEspp.js";
6
- import "../../worktree-BuIXmI0X.js";
7
- import "../../create-CKUHliul.js";
8
- import { t as GitDispatcher } from "../../dispatcher-D4bEJonH.js";
9
- import { Args, Command, Flags } from "@oclif/core";
10
-
11
- //#region src/commands/git/prr.ts
12
- /**
13
- * git:prr command
14
- * Checkout a PR branch using gh CLI or git fallback
15
- */
16
- var Prr = class Prr extends Command {
17
- static summary = "Checkout a PR branch (PR Read/Retrieve)";
18
- static description = `
1
+ import"../../errors-pXKbCKbL.js";import"../../runner-DYk4q6mP.js";import"../../utils-DDnNMPIq.js";import"../../pr-DjdO-vJk.js";import"../../view-JZaEEspp.js";import"../../worktree-BuIXmI0X.js";import"../../create-CKUHliul.js";import{t as e}from"../../dispatcher-D4bEJonH.js";import{Args as t,Command as n,Flags as r}from"@oclif/core";var i=class i extends n{static summary=`Checkout a PR branch (PR Read/Retrieve)`;static description=`
19
2
  Checkout a pull request branch using GitHub CLI (gh) or git fallback.
20
3
  Automatically detects gh availability and falls back to git fetch if needed.
21
- `;
22
- static examples = [
23
- {
24
- description: "Checkout PR using gh or git fallback",
25
- command: "<%= config.bin %> <%= command.id %> 123"
26
- },
27
- {
28
- description: "Checkout PR to specific branch",
29
- command: "<%= config.bin %> <%= command.id %> 456 --branch my-pr-branch"
30
- },
31
- {
32
- description: "Force git fallback with custom remote",
33
- command: "<%= config.bin %> <%= command.id %> 789 --no-gh --remote upstream"
34
- }
35
- ];
36
- static args = { id: Args.string({
37
- description: "PR number or owner:repo#123 format",
38
- required: true
39
- }) };
40
- static flags = {
41
- branch: Flags.string({
42
- char: "b",
43
- description: "Branch name (default: pr/<id>)"
44
- }),
45
- remote: Flags.string({
46
- char: "r",
47
- description: "Remote name",
48
- default: "origin"
49
- }),
50
- "no-gh": Flags.boolean({
51
- description: "Skip GitHub CLI, use git directly",
52
- default: false
53
- })
54
- };
55
- async run() {
56
- const { args, flags } = await this.parse(Prr);
57
- const dispatcher = new GitDispatcher();
58
- const request = {
59
- id: args.id,
60
- branch: flags.branch,
61
- strategy: flags["no-gh"] ? "git" : "gh",
62
- remote: flags.remote
63
- };
64
- try {
65
- const result = await dispatcher.execute({
66
- command: "prr",
67
- cwd: process.cwd(),
68
- data: request
69
- });
70
- this.log(`✓ ${result.message}`);
71
- if (result.details) {
72
- this.log(` Strategy: ${result.details.strategy}`);
73
- this.log(` Branch: ${result.details.branch}`);
74
- }
75
- } catch (error) {
76
- this.error(error.message, { exit: 1 });
77
- }
78
- }
79
- };
80
-
81
- //#endregion
82
- export { Prr as default };
4
+ `;static examples=[{description:`Checkout PR using gh or git fallback`,command:`<%= config.bin %> <%= command.id %> 123`},{description:`Checkout PR to specific branch`,command:`<%= config.bin %> <%= command.id %> 456 --branch my-pr-branch`},{description:`Force git fallback with custom remote`,command:`<%= config.bin %> <%= command.id %> 789 --no-gh --remote upstream`}];static args={id:t.string({description:`PR number or owner:repo#123 format`,required:!0})};static flags={branch:r.string({char:`b`,description:`Branch name (default: pr/<id>)`}),remote:r.string({char:`r`,description:`Remote name`,default:`origin`}),"no-gh":r.boolean({description:`Skip GitHub CLI, use git directly`,default:!1})};async run(){let{args:t,flags:n}=await this.parse(i),r=new e,a={id:t.id,branch:n.branch,strategy:n[`no-gh`]?`git`:`gh`,remote:n.remote};try{let e=await r.execute({command:`prr`,cwd:process.cwd(),data:a});this.log(`✓ ${e.message}`),e.details&&(this.log(` Strategy: ${e.details.strategy}`),this.log(` Branch: ${e.details.branch}`))}catch(e){this.error(e.message,{exit:1})}}};export{i as default};
@@ -1,72 +1,4 @@
1
- import { t as SUPPORTED_BROWSERS } from "../../git-BZvqM5hz.js";
2
- import "../../errors-pXKbCKbL.js";
3
- import "../../runner-DYk4q6mP.js";
4
- import "../../utils-DDnNMPIq.js";
5
- import "../../pr-DjdO-vJk.js";
6
- import "../../view-JZaEEspp.js";
7
- import "../../worktree-BuIXmI0X.js";
8
- import "../../create-CKUHliul.js";
9
- import { t as GitDispatcher } from "../../dispatcher-D4bEJonH.js";
10
- import { Args, Command, Flags } from "@oclif/core";
11
-
12
- //#region src/commands/git/prv.ts
13
- /**
14
- * git:prv command
15
- * Open PR in web browser with configurable browser
16
- */
17
- var Prv = class Prv extends Command {
18
- static summary = "Open PR in web browser (PR View)";
19
- static description = `
1
+ import{t as e}from"../../git-BZvqM5hz.js";import"../../errors-pXKbCKbL.js";import"../../runner-DYk4q6mP.js";import"../../utils-DDnNMPIq.js";import"../../pr-DjdO-vJk.js";import"../../view-JZaEEspp.js";import"../../worktree-BuIXmI0X.js";import"../../create-CKUHliul.js";import{t}from"../../dispatcher-D4bEJonH.js";import{Args as n,Command as r,Flags as i}from"@oclif/core";var a=class a extends r{static summary=`Open PR in web browser (PR View)`;static description=`
20
2
  Open a pull request in your web browser using GitHub CLI.
21
3
  Supports multiple browsers: Chrome (default), Safari, Firefox, Arc, Edge, Dia.
22
- `;
23
- static examples = [
24
- {
25
- description: "Open PR in Chrome (default)",
26
- command: "<%= config.bin %> <%= command.id %> 123"
27
- },
28
- {
29
- description: "Open PR in Safari",
30
- command: "<%= config.bin %> <%= command.id %> 456 --browser safari"
31
- },
32
- {
33
- description: "Open PR in Firefox",
34
- command: "<%= config.bin %> <%= command.id %> 789 --browser firefox"
35
- },
36
- {
37
- description: "Open PR in Arc",
38
- command: "<%= config.bin %> <%= command.id %> 999 --browser arc"
39
- }
40
- ];
41
- static args = { id: Args.string({
42
- description: "PR number",
43
- required: true
44
- }) };
45
- static flags = { browser: Flags.string({
46
- char: "b",
47
- description: "Browser to use",
48
- options: [...SUPPORTED_BROWSERS],
49
- default: "chrome"
50
- }) };
51
- async run() {
52
- const { args, flags } = await this.parse(Prv);
53
- const dispatcher = new GitDispatcher();
54
- const request = {
55
- id: args.id,
56
- browser: flags.browser
57
- };
58
- try {
59
- const result = await dispatcher.execute({
60
- command: "prv",
61
- cwd: process.cwd(),
62
- data: request
63
- });
64
- this.log(`✓ ${result.message}`);
65
- } catch (error) {
66
- this.error(error.message, { exit: 1 });
67
- }
68
- }
69
- };
70
-
71
- //#endregion
72
- export { Prv as default };
4
+ `;static examples=[{description:`Open PR in Chrome (default)`,command:`<%= config.bin %> <%= command.id %> 123`},{description:`Open PR in Safari`,command:`<%= config.bin %> <%= command.id %> 456 --browser safari`},{description:`Open PR in Firefox`,command:`<%= config.bin %> <%= command.id %> 789 --browser firefox`},{description:`Open PR in Arc`,command:`<%= config.bin %> <%= command.id %> 999 --browser arc`}];static args={id:n.string({description:`PR number`,required:!0})};static flags={browser:i.string({char:`b`,description:`Browser to use`,options:[...e],default:`chrome`})};async run(){let{args:e,flags:n}=await this.parse(a),r=new t,i={id:e.id,browser:n.browser};try{let e=await r.execute({command:`prv`,cwd:process.cwd(),data:i});this.log(`✓ ${e.message}`)}catch(e){this.error(e.message,{exit:1})}}};export{a as default};
@@ -1,137 +1,5 @@
1
- import "../../errors-pXKbCKbL.js";
2
- import "../../runner-DYk4q6mP.js";
3
- import "../../utils-DDnNMPIq.js";
4
- import "../../pr-DjdO-vJk.js";
5
- import "../../view-JZaEEspp.js";
6
- import "../../worktree-BuIXmI0X.js";
7
- import "../../create-CKUHliul.js";
8
- import { t as GitDispatcher } from "../../dispatcher-D4bEJonH.js";
9
- import { Command, Flags } from "@oclif/core";
10
-
11
- //#region src/commands/git/worktree.ts
12
- /**
13
- * git:worktree command
14
- * Manage git worktrees (list, add, remove, prune)
15
- */
16
- var Worktree = class Worktree extends Command {
17
- static summary = "Manage git worktrees";
18
- static description = `
1
+ import"../../errors-pXKbCKbL.js";import"../../runner-DYk4q6mP.js";import"../../utils-DDnNMPIq.js";import"../../pr-DjdO-vJk.js";import"../../view-JZaEEspp.js";import"../../worktree-BuIXmI0X.js";import"../../create-CKUHliul.js";import{t as e}from"../../dispatcher-D4bEJonH.js";import{Command as t,Flags as n}from"@oclif/core";var r=class r extends t{static summary=`Manage git worktrees`;static description=`
19
2
  Manage git worktrees: list existing worktrees, add new ones, remove, or prune stale entries.
20
3
  Git worktrees allow multiple working directories from a single repository.
21
- `;
22
- static examples = [
23
- {
24
- description: "List all worktrees in friendly format",
25
- command: "<%= config.bin %> <%= command.id %> --list"
26
- },
27
- {
28
- description: "Add new worktree with auto-generated path",
29
- command: "<%= config.bin %> <%= command.id %> --add --branch feature/login"
30
- },
31
- {
32
- description: "Add worktree with custom path",
33
- command: "<%= config.bin %> <%= command.id %> -a -p ../repo-feature -b feature/login"
34
- },
35
- {
36
- description: "Switch to main worktree (outputs path for cd)",
37
- command: "cd $(<%= config.bin %> <%= command.id %> -s)"
38
- },
39
- {
40
- description: "Switch to specific worktree by branch name",
41
- command: "cd $(<%= config.bin %> <%= command.id %> -s -b feature/login)"
42
- },
43
- {
44
- description: "Remove worktree by branch name",
45
- command: "<%= config.bin %> <%= command.id %> -r -b main"
46
- },
47
- {
48
- description: "Remove worktree by directory name",
49
- command: "<%= config.bin %> <%= command.id %> -r -b xling-feature"
50
- },
51
- {
52
- description: "Remove worktree by path",
53
- command: "<%= config.bin %> <%= command.id %> -r -p ../repo-feature"
54
- },
55
- {
56
- description: "Prune stale worktrees",
57
- command: "<%= config.bin %> <%= command.id %> --prune"
58
- }
59
- ];
60
- static flags = {
61
- list: Flags.boolean({
62
- char: "l",
63
- description: "List worktrees (default)",
64
- default: false
65
- }),
66
- add: Flags.boolean({
67
- char: "a",
68
- description: "Add new worktree (auto-generates path if not specified)",
69
- default: false
70
- }),
71
- switch: Flags.boolean({
72
- char: "s",
73
- description: "Get worktree path (outputs path only, use with: cd $(xling git:worktree -s -b <branch>))",
74
- default: false
75
- }),
76
- remove: Flags.boolean({
77
- char: "r",
78
- description: "Remove worktree",
79
- default: false
80
- }),
81
- prune: Flags.boolean({
82
- description: "Prune stale worktrees",
83
- default: false
84
- }),
85
- path: Flags.string({
86
- char: "p",
87
- description: "Worktree path (e.g., '../repo-feature' or absolute path). Auto-generated if not specified with --add."
88
- }),
89
- branch: Flags.string({
90
- char: "b",
91
- description: "Branch or worktree name. Defaults to main for --add and --switch. For --remove, intelligently matches branch or directory name."
92
- }),
93
- force: Flags.boolean({
94
- char: "f",
95
- description: "Force operation",
96
- default: false
97
- }),
98
- detach: Flags.boolean({
99
- description: "Detach HEAD in new worktree",
100
- default: false
101
- })
102
- };
103
- async run() {
104
- const { flags } = await this.parse(Worktree);
105
- let action = "list";
106
- if (flags.add) action = "add";
107
- else if (flags.switch) action = "switch";
108
- else if (flags.remove) action = "remove";
109
- else if (flags.prune) action = "prune";
110
- const dispatcher = new GitDispatcher();
111
- const request = {
112
- action,
113
- path: flags.path,
114
- branch: flags.branch,
115
- force: flags.force,
116
- detach: flags.detach
117
- };
118
- try {
119
- const result = await dispatcher.execute({
120
- command: "worktree",
121
- cwd: process.cwd(),
122
- data: request
123
- });
124
- if (action === "switch") {
125
- this.log(result.message);
126
- return;
127
- }
128
- this.log(`✓ ${result.message}`);
129
- if (result.details?.output) this.log("\n" + result.details.output);
130
- } catch (error) {
131
- this.error(error.message, { exit: 1 });
132
- }
133
- }
134
- };
135
-
136
- //#endregion
137
- export { Worktree as default };
4
+ `;static examples=[{description:`List all worktrees in friendly format`,command:`<%= config.bin %> <%= command.id %> --list`},{description:`Add new worktree with auto-generated path`,command:`<%= config.bin %> <%= command.id %> --add --branch feature/login`},{description:`Add worktree with custom path`,command:`<%= config.bin %> <%= command.id %> -a -p ../repo-feature -b feature/login`},{description:`Switch to main worktree (outputs path for cd)`,command:`cd $(<%= config.bin %> <%= command.id %> -s)`},{description:`Switch to specific worktree by branch name`,command:`cd $(<%= config.bin %> <%= command.id %> -s -b feature/login)`},{description:`Remove worktree by branch name`,command:`<%= config.bin %> <%= command.id %> -r -b main`},{description:`Remove worktree by directory name`,command:`<%= config.bin %> <%= command.id %> -r -b xling-feature`},{description:`Remove worktree by path`,command:`<%= config.bin %> <%= command.id %> -r -p ../repo-feature`},{description:`Prune stale worktrees`,command:`<%= config.bin %> <%= command.id %> --prune`}];static flags={list:n.boolean({char:`l`,description:`List worktrees (default)`,default:!1}),add:n.boolean({char:`a`,description:`Add new worktree (auto-generates path if not specified)`,default:!1}),switch:n.boolean({char:`s`,description:`Get worktree path (outputs path only, use with: cd $(xling git:worktree -s -b <branch>))`,default:!1}),remove:n.boolean({char:`r`,description:`Remove worktree`,default:!1}),prune:n.boolean({description:`Prune stale worktrees`,default:!1}),path:n.string({char:`p`,description:`Worktree path (e.g., '../repo-feature' or absolute path). Auto-generated if not specified with --add.`}),branch:n.string({char:`b`,description:`Branch or worktree name. Defaults to main for --add and --switch. For --remove, intelligently matches branch or directory name.`}),force:n.boolean({char:`f`,description:`Force operation`,default:!1}),detach:n.boolean({description:`Detach HEAD in new worktree`,default:!1})};async run(){let{flags:t}=await this.parse(r),n=`list`;t.add?n=`add`:t.switch?n=`switch`:t.remove?n=`remove`:t.prune&&(n=`prune`);let i=new e,a={action:n,path:t.path,branch:t.branch,force:t.force,detach:t.detach};try{let e=await i.execute({command:`worktree`,cwd:process.cwd(),data:a});if(n===`switch`){this.log(e.message);return}this.log(`✓ ${e.message}`),e.details?.output&&this.log(`
5
+ `+e.details.output)}catch(e){this.error(e.message,{exit:1})}}};export{r as default};
@@ -1,80 +1,5 @@
1
- import "../../errors-pXKbCKbL.js";
2
- import "../../runner-DYk4q6mP.js";
3
- import "../../utils-DDnNMPIq.js";
4
- import "../../pr-DjdO-vJk.js";
5
- import "../../view-JZaEEspp.js";
6
- import "../../worktree-BuIXmI0X.js";
7
- import "../../create-CKUHliul.js";
8
- import { t as GitDispatcher } from "../../dispatcher-D4bEJonH.js";
9
- import { Command, Flags } from "@oclif/core";
10
-
11
- //#region src/commands/git/wta.ts
12
- /**
13
- * git:wta command
14
- * Add a new git worktree
15
- */
16
- var Wta = class Wta extends Command {
17
- static summary = "Add a new git worktree";
18
- static description = `
1
+ import"../../errors-pXKbCKbL.js";import"../../runner-DYk4q6mP.js";import"../../utils-DDnNMPIq.js";import"../../pr-DjdO-vJk.js";import"../../view-JZaEEspp.js";import"../../worktree-BuIXmI0X.js";import"../../create-CKUHliul.js";import{t as e}from"../../dispatcher-D4bEJonH.js";import{Command as t,Flags as n}from"@oclif/core";var r=class r extends t{static summary=`Add a new git worktree`;static description=`
19
2
  Create a new git worktree with automatic path generation.
20
3
  Defaults to main branch if not specified.
21
- `;
22
- static examples = [
23
- {
24
- description: "Add worktree for main branch (default)",
25
- command: "<%= config.bin %> <%= command.id %>"
26
- },
27
- {
28
- description: "Add worktree for specific branch",
29
- command: "<%= config.bin %> <%= command.id %> -b feature/login"
30
- },
31
- {
32
- description: "Add worktree with custom path",
33
- command: "<%= config.bin %> <%= command.id %> -b feature/login -p ../my-worktree"
34
- }
35
- ];
36
- static flags = {
37
- branch: Flags.string({
38
- char: "b",
39
- description: "Branch name (defaults to main)"
40
- }),
41
- path: Flags.string({
42
- char: "p",
43
- description: "Custom worktree path (auto-generated if not specified)"
44
- }),
45
- force: Flags.boolean({
46
- char: "f",
47
- description: "Force operation",
48
- default: false
49
- }),
50
- detach: Flags.boolean({
51
- description: "Detach HEAD in new worktree",
52
- default: false
53
- })
54
- };
55
- async run() {
56
- const { flags } = await this.parse(Wta);
57
- const dispatcher = new GitDispatcher();
58
- const request = {
59
- action: "add",
60
- branch: flags.branch,
61
- path: flags.path,
62
- force: flags.force,
63
- detach: flags.detach
64
- };
65
- try {
66
- const result = await dispatcher.execute({
67
- command: "worktree",
68
- cwd: process.cwd(),
69
- data: request
70
- });
71
- this.log(`✓ ${result.message}`);
72
- if (result.details?.output) this.log("\n" + result.details.output);
73
- } catch (error) {
74
- this.error(error.message, { exit: 1 });
75
- }
76
- }
77
- };
78
-
79
- //#endregion
80
- export { Wta as default };
4
+ `;static examples=[{description:`Add worktree for main branch (default)`,command:`<%= config.bin %> <%= command.id %>`},{description:`Add worktree for specific branch`,command:`<%= config.bin %> <%= command.id %> -b feature/login`},{description:`Add worktree with custom path`,command:`<%= config.bin %> <%= command.id %> -b feature/login -p ../my-worktree`}];static flags={branch:n.string({char:`b`,description:`Branch name (defaults to main)`}),path:n.string({char:`p`,description:`Custom worktree path (auto-generated if not specified)`}),force:n.boolean({char:`f`,description:`Force operation`,default:!1}),detach:n.boolean({description:`Detach HEAD in new worktree`,default:!1})};async run(){let{flags:t}=await this.parse(r),n=new e,i={action:`add`,branch:t.branch,path:t.path,force:t.force,detach:t.detach};try{let e=await n.execute({command:`worktree`,cwd:process.cwd(),data:i});this.log(`✓ ${e.message}`),e.details?.output&&this.log(`
5
+ `+e.details.output)}catch(e){this.error(e.message,{exit:1})}}};export{r as default};
@@ -1,44 +1,5 @@
1
- import "../../errors-pXKbCKbL.js";
2
- import "../../runner-DYk4q6mP.js";
3
- import "../../utils-DDnNMPIq.js";
4
- import "../../pr-DjdO-vJk.js";
5
- import "../../view-JZaEEspp.js";
6
- import "../../worktree-BuIXmI0X.js";
7
- import "../../create-CKUHliul.js";
8
- import { t as GitDispatcher } from "../../dispatcher-D4bEJonH.js";
9
- import { Command } from "@oclif/core";
10
-
11
- //#region src/commands/git/wtl.ts
12
- /**
13
- * git:wtl command
14
- * List git worktrees
15
- */
16
- var Wtl = class extends Command {
17
- static summary = "List git worktrees";
18
- static description = `
1
+ import"../../errors-pXKbCKbL.js";import"../../runner-DYk4q6mP.js";import"../../utils-DDnNMPIq.js";import"../../pr-DjdO-vJk.js";import"../../view-JZaEEspp.js";import"../../worktree-BuIXmI0X.js";import"../../create-CKUHliul.js";import{t as e}from"../../dispatcher-D4bEJonH.js";import{Command as t}from"@oclif/core";var n=class extends t{static summary=`List git worktrees`;static description=`
19
2
  List all git worktrees in a friendly format.
20
3
  Shows the path and branch for each worktree.
21
- `;
22
- static examples = [{
23
- description: "List all worktrees",
24
- command: "<%= config.bin %> <%= command.id %>"
25
- }];
26
- async run() {
27
- const dispatcher = new GitDispatcher();
28
- const request = { action: "list" };
29
- try {
30
- const result = await dispatcher.execute({
31
- command: "worktree",
32
- cwd: process.cwd(),
33
- data: request
34
- });
35
- this.log(`✓ ${result.message}`);
36
- if (result.details?.output) this.log("\n" + result.details.output);
37
- } catch (error) {
38
- this.error(error.message, { exit: 1 });
39
- }
40
- }
41
- };
42
-
43
- //#endregion
44
- export { Wtl as default };
4
+ `;static examples=[{description:`List all worktrees`,command:`<%= config.bin %> <%= command.id %>`}];async run(){let t=new e,n={action:`list`};try{let e=await t.execute({command:`worktree`,cwd:process.cwd(),data:n});this.log(`✓ ${e.message}`),e.details?.output&&this.log(`
5
+ `+e.details.output)}catch(e){this.error(e.message,{exit:1})}}};export{n as default};
@@ -1,44 +1,5 @@
1
- import "../../errors-pXKbCKbL.js";
2
- import "../../runner-DYk4q6mP.js";
3
- import "../../utils-DDnNMPIq.js";
4
- import "../../pr-DjdO-vJk.js";
5
- import "../../view-JZaEEspp.js";
6
- import "../../worktree-BuIXmI0X.js";
7
- import "../../create-CKUHliul.js";
8
- import { t as GitDispatcher } from "../../dispatcher-D4bEJonH.js";
9
- import { Command } from "@oclif/core";
10
-
11
- //#region src/commands/git/wtp.ts
12
- /**
13
- * git:wtp command
14
- * Prune stale git worktrees
15
- */
16
- var Wtp = class extends Command {
17
- static summary = "Prune stale git worktrees";
18
- static description = `
1
+ import"../../errors-pXKbCKbL.js";import"../../runner-DYk4q6mP.js";import"../../utils-DDnNMPIq.js";import"../../pr-DjdO-vJk.js";import"../../view-JZaEEspp.js";import"../../worktree-BuIXmI0X.js";import"../../create-CKUHliul.js";import{t as e}from"../../dispatcher-D4bEJonH.js";import{Command as t}from"@oclif/core";var n=class extends t{static summary=`Prune stale git worktrees`;static description=`
19
2
  Remove stale worktree administrative files.
20
3
  This cleans up worktrees that have been manually deleted from the filesystem.
21
- `;
22
- static examples = [{
23
- description: "Prune stale worktrees",
24
- command: "<%= config.bin %> <%= command.id %>"
25
- }];
26
- async run() {
27
- const dispatcher = new GitDispatcher();
28
- const request = { action: "prune" };
29
- try {
30
- const result = await dispatcher.execute({
31
- command: "worktree",
32
- cwd: process.cwd(),
33
- data: request
34
- });
35
- this.log(`✓ ${result.message}`);
36
- if (result.details?.output) this.log("\n" + result.details.output);
37
- } catch (error) {
38
- this.error(error.message, { exit: 1 });
39
- }
40
- }
41
- };
42
-
43
- //#endregion
44
- export { Wtp as default };
4
+ `;static examples=[{description:`Prune stale worktrees`,command:`<%= config.bin %> <%= command.id %>`}];async run(){let t=new e,n={action:`prune`};try{let e=await t.execute({command:`worktree`,cwd:process.cwd(),data:n});this.log(`✓ ${e.message}`),e.details?.output&&this.log(`
5
+ `+e.details.output)}catch(e){this.error(e.message,{exit:1})}}};export{n as default};