xling 0.9.0 → 0.9.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.
- package/README.md +11 -2
- package/dist/{base-DTfJeAL2.js → base-3YZ-yPmE.js} +1 -1
- package/dist/{base-CxP5zx2U.d.ts → base-C2-JqowN.d.ts} +2 -2
- package/dist/{base-DjEQ7jRo.d.ts → base-CbaByk6Y.d.ts} +2 -2
- package/dist/base-CojCfrYM.js +1 -0
- package/dist/{claude-CA8e4ttR.js → claude-FRKIDAFa.js} +1 -1
- package/dist/{claude-DWXHrlbr.js → claude-IxiCkyCp.js} +1 -1
- package/dist/codex-B7IedjUS.js +1 -0
- package/dist/{codex-CeecDPCd.js → codex-Crixx0-y.js} +1 -1
- package/dist/commands/council/index.js +1 -1
- package/dist/commands/discuss/index.js +1 -1
- package/dist/commands/git/prc.js +1 -1
- package/dist/commands/git/prr.js +1 -1
- package/dist/commands/git/prv.js +1 -1
- package/dist/commands/git/worktree.js +1 -1
- package/dist/commands/git/wta.js +1 -1
- package/dist/commands/git/wtl.js +1 -1
- package/dist/commands/git/wtp.js +1 -1
- package/dist/commands/git/wtr.js +1 -1
- package/dist/commands/git/wts.js +1 -1
- package/dist/commands/p/index.js +1 -1
- package/dist/commands/proxy/index.js +1 -1
- package/dist/commands/settings/auth.js +1 -1
- package/dist/commands/settings/get.js +1 -1
- package/dist/commands/settings/inspect.js +1 -1
- package/dist/commands/settings/list.js +1 -1
- package/dist/commands/settings/set.js +1 -1
- package/dist/commands/settings/switch.js +1 -1
- package/dist/commands/settings/sync.d.ts +14 -0
- package/dist/commands/settings/sync.js +5 -0
- package/dist/commands/sx/index.js +1 -1
- package/dist/commands/version/index.js +1 -1
- package/dist/commands/x/index.js +1 -1
- package/dist/{create-CSR6dBbG.js → create-Qvw44NZA.js} +1 -1
- package/dist/{dispatcher-B3LVp_HG.js → dispatcher-CHIt3Pnx.js} +1 -1
- package/dist/{dispatcher-jdh4erR9.js → dispatcher-Ck97HDr8.js} +1 -1
- package/dist/{dispatcher-CixO5fFs.js → dispatcher-Dot_FAKV.js} +1 -1
- package/dist/domain/git.d.ts +1 -1
- package/dist/domain/git.js +1 -1
- package/dist/domain/interfaces.d.ts +2 -2
- package/dist/domain/types.d.ts +1 -1
- package/dist/domain/validators.d.ts +1 -1
- package/dist/domain/xling/config.d.ts +1 -1
- package/dist/domain/xling/config.js +1 -1
- package/dist/domain/xling/template.d.ts +1 -1
- package/dist/domain/xling/template.js +1 -1
- package/dist/{editor-CRub_kaY.js → editor-DkpC97xg.js} +1 -1
- package/dist/{engine-fskaJGPP.d.ts → engine-B5ACjG7Q.d.ts} +1 -1
- package/dist/{errorClassifier-zGSmZYk7.d.ts → errorClassifier-D8KzsnQX.d.ts} +1 -1
- package/dist/{format-BHc8ftok.js → format-CYV2tIph.js} +6 -3
- package/dist/{fsStore-Dp7kL3Gm.js → fsStore-iYRoM63Y.js} +1 -1
- package/dist/{gemini-DVNV-89A.js → gemini-CuAIjTLO.js} +1 -1
- package/dist/{gemini-Im27-JQu.js → gemini-DGRI2pw9.js} +1 -1
- package/dist/{interfaces-BELb31PG.d.ts → interfaces-CtOhRZzC.d.ts} +1 -1
- package/dist/{loadBalancer-OqUfneiH.d.ts → loadBalancer-IcZ48zFF.d.ts} +2 -2
- package/dist/{pr-YuVCqLA5.js → pr-CPoXwoyq.js} +1 -1
- package/dist/{providerRegistry-B09S7PrT.d.ts → providerRegistry-C_H9jFDu.d.ts} +1 -1
- package/dist/{providerRegistry-DrzY3JDw.js → providerRegistry-lUVpBgw8.js} +1 -1
- package/dist/{router-DEd1ltJB.d.ts → router-ByC4Ut9L.d.ts} +3 -3
- package/dist/{router-BS0zXgkv.js → router-KUfms6xn.js} +1 -1
- package/dist/{runner-hq-k7-9Y.js → runner-D9KF-CQn.js} +1 -1
- package/dist/{runner-ITvpapv-.js → runner-wr3xLm2B.js} +1 -1
- package/dist/{server-Dhpqbbu7.js → server-Cymednu2.js} +1 -1
- package/dist/{server--SAoX5aU.js → server-uV2c4K3B.js} +1 -1
- package/dist/{server-Byz1RwvS.d.ts → server-z4xLkV3R.d.ts} +1 -1
- package/dist/services/council/runner.d.ts +4 -4
- package/dist/services/council/runner.js +1 -1
- package/dist/services/discuss/engine.d.ts +5 -5
- package/dist/services/discuss/engine.js +1 -1
- package/dist/services/discuss/room.d.ts +4 -4
- package/dist/services/discuss/server.js +1 -1
- package/dist/services/git/create.d.ts +1 -1
- package/dist/services/git/create.js +1 -1
- package/dist/services/git/dispatcher.d.ts +1 -1
- package/dist/services/git/dispatcher.js +1 -1
- package/dist/services/git/pr.d.ts +1 -1
- package/dist/services/git/pr.js +1 -1
- package/dist/services/git/utils.js +1 -1
- package/dist/services/git/view.d.ts +1 -1
- package/dist/services/git/view.js +1 -1
- package/dist/services/git/worktree.d.ts +1 -1
- package/dist/services/git/worktree.js +1 -1
- package/dist/services/launch/adapters/base.d.ts +3 -3
- package/dist/services/launch/adapters/base.js +1 -1
- package/dist/services/launch/adapters/claude.d.ts +3 -3
- package/dist/services/launch/adapters/claude.js +1 -1
- package/dist/services/launch/adapters/codex.d.ts +3 -3
- package/dist/services/launch/adapters/codex.js +1 -1
- package/dist/services/launch/adapters/gemini.d.ts +3 -3
- package/dist/services/launch/adapters/gemini.js +1 -1
- package/dist/services/launch/dispatcher.d.ts +2 -2
- package/dist/services/launch/dispatcher.js +1 -1
- package/dist/services/prompt/client.d.ts +2 -2
- package/dist/services/prompt/client.js +1 -1
- package/dist/services/prompt/providerRegistry.d.ts +2 -2
- package/dist/services/prompt/providerRegistry.js +1 -1
- package/dist/services/prompt/router.d.ts +4 -4
- package/dist/services/prompt/router.js +1 -1
- package/dist/services/prompt/types.d.ts +1 -1
- package/dist/services/prompt/types.js +1 -1
- package/dist/services/proxy/errorClassifier.d.ts +3 -3
- package/dist/services/proxy/errorClassifier.js +1 -1
- package/dist/services/proxy/index.d.ts +5 -5
- package/dist/services/proxy/index.js +1 -1
- package/dist/services/proxy/loadBalancer.d.ts +3 -3
- package/dist/services/proxy/loadBalancer.js +1 -1
- package/dist/services/proxy/server.d.ts +3 -3
- package/dist/services/proxy/server.js +1 -1
- package/dist/services/proxy/transformer.js +1 -1
- package/dist/services/proxy/types.d.ts +2 -2
- package/dist/services/settings/adapters/base.d.ts +3 -3
- package/dist/services/settings/adapters/base.js +1 -1
- package/dist/services/settings/adapters/claude.d.ts +3 -3
- package/dist/services/settings/adapters/claude.js +1 -1
- package/dist/services/settings/adapters/codex.d.ts +3 -3
- package/dist/services/settings/adapters/codex.js +1 -1
- package/dist/services/settings/adapters/gemini.d.ts +3 -3
- package/dist/services/settings/adapters/gemini.js +1 -1
- package/dist/services/settings/adapters/xling.d.ts +4 -4
- package/dist/services/settings/adapters/xling.js +1 -1
- package/dist/services/settings/dispatcher.d.ts +2 -2
- package/dist/services/settings/dispatcher.js +1 -1
- package/dist/services/settings/fsStore.d.ts +6 -2
- package/dist/services/settings/fsStore.js +1 -1
- package/dist/services/settings/sync.d.ts +29 -0
- package/dist/services/settings/sync.js +1 -0
- package/dist/services/settings/templates/claudeDefault.d.ts +1 -1
- package/dist/services/settings/templates/claudeDefault.js +1 -1
- package/dist/services/shortcuts/runner.d.ts +2 -2
- package/dist/services/shortcuts/runner.js +1 -1
- package/dist/services/shortcuts/types.d.ts +2 -2
- package/dist/services/shortcuts/types.js +1 -1
- package/dist/sync-C39sJRnz.js +1 -0
- package/dist/{types-C5iSt5QT.d.ts → types-Dr6sf80u.d.ts} +1 -1
- package/dist/{types-CtryAP4C.d.ts → types-Yz1pDQgk.d.ts} +1 -1
- package/dist/utils/editor.js +1 -1
- package/dist/utils/errors.js +1 -1
- package/dist/utils/format.d.ts +9 -2
- package/dist/utils/format.js +1 -1
- package/dist/utils/logger.js +1 -1
- package/dist/utils/runner.d.ts +1 -1
- package/dist/utils/runner.js +1 -1
- package/dist/{utils-BTx8InlR.js → utils-DoMSbn0Y.js} +1 -1
- package/dist/{view-Oc9e1Buj.js → view-BzNOYH6k.js} +1 -1
- package/dist/{worktree-CMlUbATz.js → worktree-DpKDzo17.js} +1 -1
- package/dist/{xling-D8au8ueX.js → xling-DqZuT8CZ.js} +1 -1
- package/package.json +1 -1
- package/dist/base-BPSqk5ri.js +0 -1
- package/dist/codex-CsSN6D2f.js +0 -1
- /package/dist/{claudeDefault-7I5R7M9m.js → claudeDefault-CAA3qlD0.js} +0 -0
- /package/dist/{client-B2lwQe9s.js → client-CCXsu9tH.js} +0 -0
- /package/dist/{config-bqLy-CvP.js → config-CGH3WLbz.js} +0 -0
- /package/dist/{config-HujHce5l.d.ts → config-CaLWAetR.d.ts} +0 -0
- /package/dist/{engine-BfeqowlE.js → engine-CQ7XzvOW.js} +0 -0
- /package/dist/{errorClassifier-Cvr-_iPQ.js → errorClassifier-BtDItoIE.js} +0 -0
- /package/dist/{errors-K31FHK8S.js → errors-DMQ0N3V2.js} +0 -0
- /package/dist/{git-C8c1GrMJ.d.ts → git-nXnd4bRI.d.ts} +0 -0
- /package/dist/{git-BuLy4Y64.js → git-ngHtNl4m.js} +0 -0
- /package/dist/{loadBalancer-DDsh2Xtn.js → loadBalancer-B-jkwy15.js} +0 -0
- /package/dist/{logger-DkNeikyB.js → logger-BVLA-f3j.js} +0 -0
- /package/dist/{runner-BthmKjXb.js → runner-C3LHrE0l.js} +0 -0
- /package/dist/{template-CNWPigzN.js → template-nmCA0YjS.js} +0 -0
- /package/dist/{transformer-DedIktrl.js → transformer-B_JzskvR.js} +0 -0
- /package/dist/{types-QxjkHQON.d.ts → types-DDbZucWm.d.ts} +0 -0
- /package/dist/{types-DX3D0cu3.js → types-Dd9zamNg.js} +0 -0
- /package/dist/{types-Bj9yrqq6.js → types-cLYLwSI5.js} +0 -0
- /package/dist/{types-K-yZlAsP.d.ts → types-vDRpkfsj.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -26,8 +26,10 @@ Together, `xling` is more than just a tool; it's an intelligent partner that amp
|
|
|
26
26
|
|
|
27
27
|
- **Unified Interface**: Launch AI CLIs, route prompts, and manage settings with one tool
|
|
28
28
|
- **Prompt Router**: `xling p` fan-outs requests across providers with fallback and streaming support
|
|
29
|
+
- **Model Council**: `xling council` cross-judges answers across models and synthesizes a winner
|
|
29
30
|
- **Multi-Model Roundtable**: `xling discuss` runs multi-agent debates via CLI or Web UI
|
|
30
|
-
- **
|
|
31
|
+
- **OpenAI-Compatible Proxy**: `xling proxy` exposes a load-balanced, key-rotated API gateway
|
|
32
|
+
- **React 19 Web UI**: `discuss --ui` / `council --ui` serve a Vite-built React 19 + Tailwind 4 interface on port 3000
|
|
31
33
|
- **Quick Launcher**: Just type `xling x` to start Claude Code instantly with yolo mode
|
|
32
34
|
- **Command Shortcuts**: Define custom aliases for frequently used commands with `sx`
|
|
33
35
|
- **Multiple Scopes**: Support for user, project, local, and system-level configurations
|
|
@@ -71,6 +73,8 @@ place.
|
|
|
71
73
|
- `x`: Launch Claude Code, Codex, or Gemini CLI with resume flags, yolo toggle, and passthrough args.
|
|
72
74
|
- `p`: Route prompts across configured providers or delegate to codex/claude/gemini CLIs with yolo defaults.
|
|
73
75
|
- `discuss`: Run a multi-model roundtable via CLI or Web UI with topic, model, and strategy controls.
|
|
76
|
+
- `council`: Ask multiple models the same question, have them cross-judge, and return the winning or synthesized answer.
|
|
77
|
+
- `proxy`: Start an OpenAI-compatible proxy with load balancing, API key rotation, and optional access key protection.
|
|
74
78
|
- `sx`: Execute command shortcuts/aliases defined in xling config.
|
|
75
79
|
- `settings:list|get|set|switch|inspect`: Inspect, edit, and switch Claude, Codex, Gemini, or xling configs across scopes.
|
|
76
80
|
- `git:prc|prr|prv`: Create, checkout, and view GitHub pull requests with automatic gh/git fallbacks.
|
|
@@ -79,7 +83,7 @@ place.
|
|
|
79
83
|
|
|
80
84
|
### Web UI (React 19)
|
|
81
85
|
|
|
82
|
-
- `discuss --ui`
|
|
86
|
+
- `discuss --ui` and `council --ui` serve a React 19 + React DOM 19 interface built with Vite 7 and Tailwind CSS 4 from `dist/ui` (port 3000 by default).
|
|
83
87
|
- Build the bundle with `bun run build` (runs `build:ui`) or `bun run build:ui` after frontend changes so the CLI can find `dist/ui`.
|
|
84
88
|
- For live UI development, run `bunx vite dev --config vite.config.ts --host --port 3000` from the repo root; keep the port aligned with the discuss server default.
|
|
85
89
|
|
|
@@ -94,6 +98,11 @@ place.
|
|
|
94
98
|
|
|
95
99
|
- [`p` – prompt router](docs/p.md): send prompts through configured providers with streaming, stdin/file input, or direct CLI delegation.
|
|
96
100
|
- [`discuss` – multi-model roundtable](docs/discuss.md): spin up a CLI or Web UI debate across multiple models with turn-taking strategies.
|
|
101
|
+
- [`council` – model jury](docs/council.md): collect answers, cross-judge anonymously, and synthesize the best response.
|
|
102
|
+
|
|
103
|
+
#### Proxy gateway
|
|
104
|
+
|
|
105
|
+
- [`proxy` – OpenAI-compatible gateway](docs/proxy.md): run a local API with load balancing, API key rotation, and optional access key.
|
|
97
106
|
|
|
98
107
|
#### Settings management
|
|
99
108
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,t}from"./runner-
|
|
1
|
+
import{n as e,t}from"./runner-C3LHrE0l.js";var n=class{async validateAvailability(){return t(this.executable)}async getVersion(){try{return await e(this.executable)}catch{return`unknown`}}};export{n as t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as LaunchCommandSpec, g as ToolId } from "./types-
|
|
2
|
-
import { t as LaunchAdapter } from "./interfaces-
|
|
1
|
+
import { a as LaunchCommandSpec, g as ToolId } from "./types-vDRpkfsj.js";
|
|
2
|
+
import { t as LaunchAdapter } from "./interfaces-CtOhRZzC.js";
|
|
3
3
|
|
|
4
4
|
//#region src/services/launch/adapters/base.d.ts
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as SettingsListData, g as ToolId, h as SwitchOptions, i as InspectResult, l as Scope, m as SettingsResult, r as EditOptions, t as ConfigObject } from "./types-
|
|
2
|
-
import { n as SettingsAdapter } from "./interfaces-
|
|
1
|
+
import { f as SettingsListData, g as ToolId, h as SwitchOptions, i as InspectResult, l as Scope, m as SettingsResult, r as EditOptions, t as ConfigObject } from "./types-vDRpkfsj.js";
|
|
2
|
+
import { n as SettingsAdapter } from "./interfaces-CtOhRZzC.js";
|
|
3
3
|
|
|
4
4
|
//#region src/services/settings/adapters/base.d.ts
|
|
5
5
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as e}from"./errors-DMQ0N3V2.js";import{d as t,m as n,o as r,s as i}from"./fsStore-iYRoM63Y.js";var a=class{async list(t){if(!this.validateScope(t))throw new e(t);let n=this.resolvePath(t);return{type:`entries`,entries:this.readConfig(n),filePath:n}}async switchProfile(e,t,n){throw Error(`Tool ${this.toolId} does not support profile switching`)}async inspect(t){if(!this.validateScope(t))throw new e(t);let n=this.resolvePath(t);if(!r(n))return{path:n,exists:!1};let a=i(n),o=this.readConfig(n);return{path:n,exists:!0,content:JSON.stringify(o,null,2),size:a?.size,lastModified:a?.lastModified}}async edit(e,t){throw Error(`Tool ${this.toolId} does not support edit for ${e}`)}readConfig(e){return t(e)}writeConfig(e,t,r=!0){n(e,t,r)}};export{a as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e,u as t}from"./errors-
|
|
1
|
+
import{c as e,u as t}from"./errors-DMQ0N3V2.js";import{n,t as r}from"./editor-DkpC97xg.js";import{t as i}from"./format-CYV2tIph.js";import{a,m as o,p as s,s as c}from"./fsStore-iYRoM63Y.js";import{t as l}from"./base-CojCfrYM.js";import{t as u}from"./claudeDefault-CAA3qlD0.js";import*as d from"node:fs";import*as f from"node:path";var p=class extends l{toolId=`claude`;async list(t){if(!this.validateScope(t))throw new e(t);let n=s(this.resolvePath(t)),r=f.dirname(n),i=f.basename(n),a=[this.#e(n,t,!0)];if(d.existsSync(r)){let e=d.readdirSync(r,{withFileTypes:!0});for(let n of e){if(!n.isFile()||n.name===i||!this.#r(n.name))continue;let e=f.join(r,n.name);a.push(this.#e(e,t,!1))}}return{type:`files`,files:this.#i(a)}}resolvePath(e){switch(e){case`user`:return`~/.claude/settings.json`;case`project`:return`.claude/settings.json`;case`local`:return`.claude/settings.local.json`;default:throw Error(`Unsupported scope for Claude: ${e}`)}}validateScope(e){return[`user`,`project`,`local`].includes(e)}async switchProfile(n,r,a){if(!this.validateScope(n))throw new e(n);let o=r.trim();if(!o)throw Error(`Variant name cannot be empty`);let c=s(this.resolvePath(n)),l=f.dirname(c),u=this.#a(l,o,c);if(!u)throw new t(o);let d=this.readConfig(u),p={};try{p=this.readConfig(c)}catch{p={}}let m=i(p,d);if(a?.preview)return{success:!0,preview:!0,filePath:c,diff:m??void 0,data:{from:u,to:c,hasChanges:!!m},message:m?`Preview generated. Review diff before applying.`:`Current settings already match the selected variant.`};if(!m)return{success:!0,message:`Current settings already match the selected variant.`,filePath:c};let h=a?.backup??!1;return this.writeConfig(c,d,h),{success:!0,message:`Switched to ${f.basename(u)}`,filePath:c,data:{from:u,to:c}}}async edit(t,i){if(!this.validateScope(t))throw new e(t);let c=s(this.resolvePath(t)),l=f.dirname(c),u=i.name?.trim(),p=n(i.ide);a(l);let m=c,h=`default`;if(u&&u!==``&&u!==`default`){let e=this.#a(l,u,c);if(e)m=e;else if(m=f.join(l,`settings.${u}.json`),!d.existsSync(m)){let e=this.#n(c);o(m,e,!1)}h=u}else if(!d.existsSync(m)){let e=this.#n(c);o(m,e,!1)}return await r(p,m),{success:!0,message:`Opened ${h} settings in ${p}`,filePath:m,data:{variant:h,ide:p}}}#e(e,t,n){let r=c(e);return{filename:f.basename(e),variant:this.#t(e),path:e,scope:t,active:n,exists:!!r,size:r?.size,lastModified:r?.lastModified}}#t(e){let t=f.basename(e),n=t.match(/^settings(?:[._-](.+))?\.json$/);return n?n[1]??`default`:t.replace(/\.json$/,``)}#n(e){try{if(d.existsSync(e)){let t=d.readFileSync(e,`utf-8`);return JSON.parse(t)}}catch{}return{...u}}#r(e){return/^settings[._-].+\.json$/.test(e)}#i(e){return e.sort((e,t)=>e.active&&!t.active?-1:!e.active&&t.active?1:e.variant.localeCompare(t.variant))}#a(e,t,n){let r=[],i=e=>{r.includes(e)||r.push(e)};t===`default`&&i(n),t.endsWith(`.json`)?i(f.isAbsolute(t)?t:f.join(e,t)):(i(f.join(e,`settings.${t}.json`)),i(f.join(e,`settings-${t}.json`)),i(f.join(e,`settings_${t}.json`)));for(let e of r)if(d.existsSync(e))return e;return null}};export{p as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./base-
|
|
1
|
+
import{t as e}from"./base-3YZ-yPmE.js";import*as t from"node:fs";import*as n from"node:path";import*as r from"node:os";var i=class extends e{toolId=`claude`;executable=`claude`;buildCommandSpec(e){let t=[];if(e.continue?t.push(`-c`):e.resume&&t.push(`-r`),e.settings){let n=this.#e(e.settings);t.push(`--settings`,n)}return{executable:this.executable,baseArgs:t,yoloArgs:e.yolo?[`--dangerously-skip-permissions`]:void 0}}#e(e){if(e.trim().startsWith(`{`)||n.isAbsolute(e)||e.endsWith(`.json`))return e;let i=n.join(r.homedir(),`.claude`),a=n.join(i,`settings.${e}.json`);if(t.existsSync(a))return a;let o=n.join(i,`settings-${e}.json`);return t.existsSync(o)?o:a}};export{i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as e}from"./errors-DMQ0N3V2.js";import{a as t,c as n,f as r,h as i,o as a,p as o,r as s,t as c}from"./fsStore-iYRoM63Y.js";import{t as l}from"./base-CojCfrYM.js";const u=`~/.codex/auth-profiles`,d=`~/.codex/auth.json`;var f=class extends l{toolId=`codex`;async list(t){if(!this.validateScope(t))throw new e(t);let n=this.resolvePath(t),r=this.readConfig(n);return{type:`entries`,entries:this.#n(r),filePath:n}}resolvePath(e){switch(e){case`user`:return`~/.codex/config.toml`;default:throw Error(`Unsupported scope for Codex: ${e}`)}}validateScope(e){return e===`user`}async switchProfile(t,n,r){if(!this.validateScope(t))throw new e(t);return this.isAuthProfile(n)?this.#e(n):this.#t(t,n)}listAuthProfiles(){return n(u).filter(e=>e.endsWith(`.json`)).map(e=>e.replace(`.json`,``))}isAuthProfile(e){return a(`${u}/${e}.json`)}saveAuthProfile(e,n=!1){let r=`${u}/${e}.json`;return a(d)?!n&&a(r)?{success:!1,message:`Profile "${e}" already exists. Use --force to overwrite.`}:(t(u),c(d,r),s(d),{success:!0,message:`Saved current auth as profile: ${e}\nauth.json has been removed. You can now login with another account.`,filePath:o(r)}):{success:!1,message:`No auth.json found. Please run 'codex login' first.`}}deleteAuthProfile(e){let t=`${u}/${e}.json`;return a(t)?(s(t),{success:!0,message:`Deleted auth profile: ${e}`}):{success:!1,message:`Auth profile "${e}" not found.`}}getAllSwitchableProfiles(e){let t=this.resolvePath(e),n=[];try{let e=this.readConfig(t),r=e.model_providers;p(r)&&(n=Object.keys(r));let i=e.profiles;p(i)&&(n=[...new Set([...n,...Object.keys(i)])])}catch{}let r=this.listAuthProfiles();return{providers:n,authProfiles:r}}#e(e){let t=`${u}/${e}.json`,n=`~/.codex/config.toml`;if(!a(t))return{success:!1,message:`Auth profile "${e}" not found.`};c(t,d);try{let e=this.readConfig(n);e.model_provider&&(delete e.model_provider,this.writeConfig(n,e))}catch{}return{success:!0,message:`Switched to auth profile: ${e}`,filePath:o(d)}}#t(e,t){let n=this.resolvePath(e);a(d)&&s(d);let r=this.readConfig(n),i=r.profiles,c=(p(i)?i:void 0)?.[t];if(p(c)){let e={...r};for(let[t,n]of Object.entries(c))e[t]=n;return e.current_profile=t,this.writeConfig(n,e),{success:!0,message:`Switched to profile: ${t}`,filePath:o(n)}}let l={...r,model_provider:t};return this.writeConfig(n,l),{success:!0,message:`Switched to provider: ${t}`,filePath:o(n)}}readConfig(e){return r(e)}writeConfig(e,t){i(e,t,!1)}#n(e){let t=e.model_providers;return p(t)?t:{}}};const p=e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&!(e instanceof Date);export{p as n,f as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./base-
|
|
1
|
+
import{t as e}from"./base-3YZ-yPmE.js";var t=class extends e{toolId=`codex`;executable=`codex`;buildCommandSpec(e){let t=[];if(e.settings){let n=this.#e(e.settings);t.push(...n)}return e.continue?t.push(`resume`,`--last`):e.resume&&t.push(`resume`),{executable:this.executable,baseArgs:t,yoloArgs:e.yolo?[`--dangerously-bypass-approvals-and-sandbox`]:void 0}}#e(e){let t=[];if(e.includes(`=`)){let n=e.split(`;`).map(e=>e.trim());for(let e of n)e&&t.push(`-c`,e)}else t.push(`-c`,`model=${e}`);return t}};export{t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../../errors-
|
|
1
|
+
import"../../errors-DMQ0N3V2.js";import"../../editor-DkpC97xg.js";import"../../logger-BVLA-f3j.js";import{t as e}from"../../runner-D9KF-CQn.js";import"../../fsStore-iYRoM63Y.js";import"../../base-CojCfrYM.js";import"../../config-CGH3WLbz.js";import"../../template-nmCA0YjS.js";import"../../xling-DqZuT8CZ.js";import"../../providerRegistry-lUVpBgw8.js";import"../../client-CCXsu9tH.js";import"../../types-cLYLwSI5.js";import{n as t}from"../../router-KUfms6xn.js";import{t as n}from"../../server-uV2c4K3B.js";import"../../engine-CQ7XzvOW.js";import{Command as r,Flags as i}from"@oclif/core";import*as a from"node:readline";import*as o from"open";var s=class s extends r{static summary=`Ask multiple models the same question, have them judge peers, and pick the winner.`;static description=`Run a council: collect answers, cross-judge anonymously, and synthesize the best response.`;static examples=[{description:`CLI mode with explicit models`,command:`<%= config.bin %> <%= command.id %> --question "How to cache HTTP responses?" --models "gpt-4o,claude-3.5-sonnet"`},{description:`Provide separate judge set and final model`,command:`<%= config.bin %> <%= command.id %> --question "PostgreSQL tuning" --models "gpt-4o,claude-3.5-sonnet" --judges "gemini-2.0-pro-exp,claude-3.5-sonnet" --final-model "gpt-4o"`},{description:`Launch the Web UI`,command:`<%= config.bin %> <%= command.id %> --ui`}];static flags={ui:i.boolean({description:`Launch Web UI for council mode`,default:!1}),question:i.string({char:`q`,description:`Question to ask every model`}),models:i.string({char:`m`,description:`Comma-separated list of models to answer`}),judges:i.string({char:`j`,description:`Comma-separated list of judge models (defaults to models)`}),"final-model":i.string({description:`Model used to write the final synthesis (defaults to first judge)`}),json:i.boolean({description:`Print full JSON result`,default:!1})};async run(){let{flags:n}=await this.parse(s);if(n.ui){await this.#e();return}let r=n.question??await this.#n(`Question: `),i=c(n.models);i.length<2&&this.error(`Provide at least two models via --models`);let a=c(n.judges),o=n[`final-model`],l=await e(await t(),{question:r,models:i,judgeModels:a.length>0?a:void 0,finalModel:o});if(n.json){this.log(JSON.stringify(l,null,2));return}this.#t(l)}async#e(){this.log(`Starting Web UI...`);let e=3e3,t=(await n(e)).address(),r=`http://localhost:${typeof t==`object`&&t?t.port:e}`;return this.log(`Server running at ${r}`),await o.default(r),this.log(`Press Ctrl+C to stop`),new Promise(()=>{})}#t(e){this.log(`\nQuestion: ${e.question}`),this.log(`
|
|
2
2
|
Stage 1: Candidate responses`),e.stage1.forEach(e=>{this.log(`- ${e.label} (${e.model})`),this.log(l(e.content))}),e.aggregates.length>0&&(this.log(`
|
|
3
3
|
Leaderboard:`),e.aggregates.forEach((e,t)=>{this.log(`${t+1}. ${e.label} (${e.model}) — avg ${e.average} from ${e.votes} votes`)})),e.final&&this.log(`\nFinal (${e.final.model}):\n${l(e.final.content)}`)}async#n(e){let t=a.createInterface({input:process.stdin,output:process.stdout});return new Promise(n=>{t.question(e,e=>{t.close(),n(e.trim())})})}};function c(e){return e?e.split(`,`).map(e=>e.trim()).filter(Boolean):[]}function l(e){return e.split(`
|
|
4
4
|
`).map(e=>` ${e}`).join(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../../errors-
|
|
1
|
+
import"../../errors-DMQ0N3V2.js";import"../../editor-DkpC97xg.js";import"../../logger-BVLA-f3j.js";import"../../runner-D9KF-CQn.js";import"../../fsStore-iYRoM63Y.js";import"../../base-CojCfrYM.js";import"../../config-CGH3WLbz.js";import"../../template-nmCA0YjS.js";import"../../xling-DqZuT8CZ.js";import"../../providerRegistry-lUVpBgw8.js";import"../../client-CCXsu9tH.js";import"../../types-cLYLwSI5.js";import{n as e}from"../../router-KUfms6xn.js";import{t}from"../../server-uV2c4K3B.js";import{t as n}from"../../engine-CQ7XzvOW.js";import{Command as r,Flags as i}from"@oclif/core";import*as a from"node:readline";import*as o from"open";var s=class s extends r{static summary=`Run a roundtable between multiple AI models via CLI or Web UI`;static description=`Start a discussion between multiple AI models`;static examples=[{description:`CLI mode, pick topic/models interactively`,command:`<%= config.bin %> <%= command.id %>`},{description:`Provide topic and models up front (comma-separated)`,command:`<%= config.bin %> <%= command.id %> --topic "Rust vs Go" --models "gpt-4o,claude-3.5-sonnet"`},{description:`Round-robin turns with shorter per-turn timeout`,command:`<%= config.bin %> <%= command.id %> --strategy round-robin --timeout 10`},{description:`Launch the web UI`,command:`<%= config.bin %> <%= command.id %> --ui`}];static flags={ui:i.boolean({description:`Launch Web UI`,default:!1}),topic:i.string({char:`t`,description:`Topic to discuss`}),models:i.string({char:`m`,description:`Comma-separated list of models to participate`}),strategy:i.string({char:`s`,description:`Turn-taking strategy (random, round-robin)`,options:[`random`,`round-robin`],default:`random`}),timeout:i.integer({description:`Timeout per turn in seconds`,default:30})};async run(){let{flags:e}=await this.parse(s);e.ui?await this.#e():await this.#t(e)}async#e(){this.log(`Starting Web UI...`);let e=3e3,n=(await t(e)).address(),r=`http://localhost:${typeof n==`object`&&n?n.port:e}`;return this.log(`Server running at ${r}`),await o.default(r),this.log(`Press Ctrl+C to stop`),new Promise(()=>{})}async#t(t){let r=await e(),i=r.getRegistry().getAllModels(),o=t.topic,s=t.models?t.models.split(`,`):[];o||=await this.#n(`Enter topic: `),s.length===0&&(s=await this.#r(i)),s.length<2&&this.error(`At least 2 models are required for a discussion.`);let c=new n(r,{topic:o,strategy:t.strategy,timeoutMs:t.timeout*1e3});return s.forEach((e,t)=>{c.addParticipant({id:`model-${t}`,name:e,model:e,type:`ai`})}),c.addParticipant({id:`user`,name:`User`,type:`human`}),this.log(`\nStarting discussion on "${o}" with: ${s.join(`, `)}\n`),this.log(`Controls:`),this.log(` [Space] Pause/Resume`),this.log(` [m] Toggle Auto/Manual Mode`),this.log(` [n] Next Turn (Manual Mode)`),this.log(` [i] Interrupt / Speak`),this.log(` [s] Summarize & Stop`),this.log(` [q] Quit`),this.log(`
|
|
2
2
|
--------------------------------------------------
|
|
3
3
|
`),c.on(`turn-start`,e=>{let t=c.participants.find(t=>t.id===e);process.stdout.write(`\n\n[${t?.name}]: `)}),c.on(`message-chunk`,({delta:e})=>{process.stdout.write(e)}),c.on(`error`,({participantId:e,error:t})=>{let n=c.participants.find(t=>t.id===e);console.error(`\n[Error] ${n?.name}: ${t.message}`)}),c.on(`participant-dropped`,e=>{let t=c.participants.find(t=>t.id===e);console.error(`\n[System] ${t?.name} has left the chat (too many errors).`)}),c.start(),a.emitKeypressEvents(process.stdin),process.stdin.isTTY&&(process.stdin.setRawMode(!0),process.stdin.resume()),process.on(`SIGINT`,()=>{c.stop(),process.exit()}),process.stdin.on(`keypress`,(e,t)=>{(async()=>{if(t.ctrl&&t.name===`c`&&process.exit(),t.name===`q`&&(c.stop(),process.exit()),t.name===`space`&&(c.status===`paused`?c.resume():c.pause(),this.log(`\n[System] Discussion ${c.status}`)),t.name===`m`){let e=c.mode===`auto`?`manual`:`auto`;c.setMode(e),this.log(`\n[System] Mode switched to ${e.toUpperCase()}`)}if(t.name===`n`)if(c.mode===`manual`){if(c.status===`discussing`||c.status===`paused`){let e=c.participants.filter(e=>e.type===`ai`),t=e[Math.floor(Math.random()*e.length)];c.setNextSpeaker(t.id)}}else this.log(`
|
|
4
4
|
[System] Switch to Manual mode [m] to use Next [n]`);if(t.name===`i`){c.pause(),process.stdin.setRawMode(!1),process.stdout.write(`
|
package/dist/commands/git/prc.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"../../git-
|
|
1
|
+
import{t as e}from"../../git-ngHtNl4m.js";import"../../errors-DMQ0N3V2.js";import"../../runner-C3LHrE0l.js";import"../../utils-DoMSbn0Y.js";import"../../pr-CPoXwoyq.js";import"../../view-BzNOYH6k.js";import"../../worktree-DpKDzo17.js";import"../../create-Qvw44NZA.js";import{t}from"../../dispatcher-Dot_FAKV.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=`
|
|
2
2
|
Create a pull request using GitHub CLI.
|
|
3
3
|
Supports automatic browser preview with customizable browser selection.
|
|
4
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};
|
package/dist/commands/git/prr.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../../errors-
|
|
1
|
+
import"../../errors-DMQ0N3V2.js";import"../../runner-C3LHrE0l.js";import"../../utils-DoMSbn0Y.js";import"../../pr-CPoXwoyq.js";import"../../view-BzNOYH6k.js";import"../../worktree-DpKDzo17.js";import"../../create-Qvw44NZA.js";import{t as e}from"../../dispatcher-Dot_FAKV.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=`
|
|
2
2
|
Checkout a pull request branch using GitHub CLI (gh) or git fallback.
|
|
3
3
|
Automatically detects gh availability and falls back to git fetch if needed.
|
|
4
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`},{description:`Checkout a PR from another repo (owner:repo#id)`,command:`<%= config.bin %> <%= command.id %> octo/demo-repo#321 --branch demo-pr`}];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};
|
package/dist/commands/git/prv.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"../../git-
|
|
1
|
+
import{t as e}from"../../git-ngHtNl4m.js";import"../../errors-DMQ0N3V2.js";import"../../runner-C3LHrE0l.js";import"../../utils-DoMSbn0Y.js";import"../../pr-CPoXwoyq.js";import"../../view-BzNOYH6k.js";import"../../worktree-DpKDzo17.js";import"../../create-Qvw44NZA.js";import{t}from"../../dispatcher-Dot_FAKV.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=`
|
|
2
2
|
Open a pull request in your web browser using GitHub CLI.
|
|
3
3
|
Supports multiple browsers: Chrome (default), Safari, Firefox, Arc, Edge, Dia.
|
|
4
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`},{description:`Open a PR from another repo in Edge`,command:`<%= config.bin %> <%= command.id %> octo/demo-repo#42 --browser edge`}];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,4 +1,4 @@
|
|
|
1
|
-
import"../../errors-
|
|
1
|
+
import"../../errors-DMQ0N3V2.js";import"../../runner-C3LHrE0l.js";import"../../utils-DoMSbn0Y.js";import"../../pr-CPoXwoyq.js";import"../../view-BzNOYH6k.js";import"../../worktree-DpKDzo17.js";import"../../create-Qvw44NZA.js";import{t as e}from"../../dispatcher-Dot_FAKV.js";import{Command as t,Flags as n}from"@oclif/core";var r=class r extends t{static summary=`Manage git worktrees`;static description=`
|
|
2
2
|
Manage git worktrees: list existing worktrees, add new ones, remove, or prune stale entries.
|
|
3
3
|
Git worktrees allow multiple working directories from a single repository.
|
|
4
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(`
|
package/dist/commands/git/wta.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../../errors-
|
|
1
|
+
import"../../errors-DMQ0N3V2.js";import"../../runner-C3LHrE0l.js";import"../../utils-DoMSbn0Y.js";import"../../pr-CPoXwoyq.js";import"../../view-BzNOYH6k.js";import"../../worktree-DpKDzo17.js";import"../../create-Qvw44NZA.js";import{t as e}from"../../dispatcher-Dot_FAKV.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=`
|
|
2
2
|
Create a new git worktree with automatic path generation.
|
|
3
3
|
Defaults to main branch if not specified.
|
|
4
4
|
Use --select to choose a branch from an interactive list.
|
package/dist/commands/git/wtl.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../../errors-
|
|
1
|
+
import"../../errors-DMQ0N3V2.js";import"../../runner-C3LHrE0l.js";import"../../utils-DoMSbn0Y.js";import"../../pr-CPoXwoyq.js";import"../../view-BzNOYH6k.js";import"../../worktree-DpKDzo17.js";import"../../create-Qvw44NZA.js";import{t as e}from"../../dispatcher-Dot_FAKV.js";import{Command as t}from"@oclif/core";var n=class extends t{static summary=`List git worktrees`;static description=`
|
|
2
2
|
List all git worktrees in a friendly format.
|
|
3
3
|
Shows the path and branch for each worktree.
|
|
4
4
|
`;static examples=[{description:`List all worktrees`,command:`<%= config.bin %> <%= command.id %>`},{description:`List worktrees and filter for feature branches`,command:`<%= config.bin %> <%= command.id %> | grep feature/`},{description:`List worktrees from another repo directory`,command:`cd ~/projects/my-repo && <%= 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(`
|
package/dist/commands/git/wtp.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../../errors-
|
|
1
|
+
import"../../errors-DMQ0N3V2.js";import"../../runner-C3LHrE0l.js";import"../../utils-DoMSbn0Y.js";import"../../pr-CPoXwoyq.js";import"../../view-BzNOYH6k.js";import"../../worktree-DpKDzo17.js";import"../../create-Qvw44NZA.js";import{t as e}from"../../dispatcher-Dot_FAKV.js";import{Command as t}from"@oclif/core";var n=class extends t{static summary=`Prune stale git worktrees`;static description=`
|
|
2
2
|
Remove stale worktree administrative files.
|
|
3
3
|
This cleans up worktrees that have been manually deleted from the filesystem.
|
|
4
4
|
`;static examples=[{description:`Prune stale worktrees`,command:`<%= config.bin %> <%= command.id %>`},{description:`Clean up after manually deleting a worktree folder`,command:`cd ~/repo && <%= config.bin %> <%= command.id %>`},{description:`Prune then list worktrees to verify`,command:`<%= config.bin %> <%= command.id %> && <%= config.bin %> git:wtl`}];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(`
|
package/dist/commands/git/wtr.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../../errors-
|
|
1
|
+
import"../../errors-DMQ0N3V2.js";import"../../runner-C3LHrE0l.js";import"../../utils-DoMSbn0Y.js";import"../../pr-CPoXwoyq.js";import"../../view-BzNOYH6k.js";import"../../worktree-DpKDzo17.js";import"../../create-Qvw44NZA.js";import{t as e}from"../../dispatcher-Dot_FAKV.js";import{Command as t,Flags as n}from"@oclif/core";var r=class r extends t{static summary=`Remove a git worktree`;static description=`
|
|
2
2
|
Remove a git worktree by branch name, directory name, or path.
|
|
3
3
|
Intelligently matches branch or directory names.
|
|
4
4
|
Use --select to pick which worktree to remove from an interactive list.
|
package/dist/commands/git/wts.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../../errors-
|
|
1
|
+
import"../../errors-DMQ0N3V2.js";import"../../runner-C3LHrE0l.js";import"../../utils-DoMSbn0Y.js";import"../../pr-CPoXwoyq.js";import"../../view-BzNOYH6k.js";import"../../worktree-DpKDzo17.js";import"../../create-Qvw44NZA.js";import{t as e}from"../../dispatcher-Dot_FAKV.js";import{Command as t,Flags as n}from"@oclif/core";import{spawn as r}from"node:child_process";var i=class i extends t{static summary=`Switch to a git worktree (opens subshell by default)`;static description=`
|
|
2
2
|
Find a matching worktree, then start a subshell rooted there.
|
|
3
3
|
Defaults to the main branch if no branch/directory is provided.
|
|
4
4
|
Use --path-only for scripting (outputs the path for cd $(...)).
|
package/dist/commands/p/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../../errors-
|
|
1
|
+
import"../../errors-DMQ0N3V2.js";import"../../editor-DkpC97xg.js";import{i as e,t}from"../../runner-C3LHrE0l.js";import"../../fsStore-iYRoM63Y.js";import"../../base-CojCfrYM.js";import"../../config-CGH3WLbz.js";import"../../template-nmCA0YjS.js";import{t as n}from"../../xling-DqZuT8CZ.js";import"../../providerRegistry-lUVpBgw8.js";import"../../client-CCXsu9tH.js";import{n as r,t as i}from"../../types-cLYLwSI5.js";import{n as a}from"../../router-KUfms6xn.js";import{Args as o,Command as s,Flags as c}from"@oclif/core";import*as l from"node:fs";import*as u from"node:readline";import*as d from"node:tty";var f=class f extends s{static description=`Execute a prompt via xling providers or hand off to codex exec / claude -p with yolo`;static examples=[{description:`Simple prompt`,command:`<%= config.bin %> <%= command.id %> "Explain quantum computing"`},{description:`Specify model`,command:`<%= config.bin %> <%= command.id %> --model gpt-4-turbo "Write a poem"`},{description:`Read from file`,command:`<%= config.bin %> <%= command.id %> -f README.md "Summarize this"`},{description:`Read from stdin`,command:`git diff | <%= config.bin %> <%= command.id %> --stdin "Review this diff"`},{description:`JSON output`,command:`<%= config.bin %> <%= command.id %> --json "What is 2+2?"`},{description:`Directly run codex exec (bypass xling providers)`,command:`<%= config.bin %> <%= command.id %> --tool codex "Summarize this repo"`},{description:`Use Claude Code CLI with yolo by default`,command:`<%= config.bin %> <%= command.id %> --tool claude "Review this diff"`},{description:`Shorthand for Codex backend (matches x command flag)`,command:`<%= config.bin %> <%= command.id %> -t codex "Hello"`},{description:`Use Gemini CLI headless prompt`,command:`<%= config.bin %> <%= command.id %> -t gemini "Summarize this diff"`}];static flags={tool:c.string({description:`Choose backend: xling router (default) or call codex/claude/gemini CLI directly`,options:[`xling`,`codex`,`claude`,`gemini`],required:!1,default:`xling`,char:`t`}),yolo:c.boolean({description:`Use yolo flags when calling codex/claude/gemini directly (skip permission prompts)`,required:!1,default:!0,allowNo:!0}),model:c.string({char:`m`,description:`Model to use (defaults to configured defaultModel)`,required:!1}),prompt:c.string({char:`p`,description:`Prompt text (alternative to positional arg)`,required:!1}),system:c.string({char:`s`,description:`System prompt`,required:!1}),file:c.string({char:`f`,description:`Read additional context from file`,required:!1,multiple:!0}),stdin:c.boolean({description:`Read prompt from stdin`,required:!1,default:!1}),temperature:c.string({char:`T`,description:`Temperature (0.0-2.0)`,required:!1}),"max-tokens":c.integer({description:`Maximum tokens to generate`,required:!1}),json:c.boolean({description:`Output as JSON`,required:!1,default:!1}),stream:c.boolean({description:`Stream output (default: true)`,required:!1,default:!0,allowNo:!0}),interactive:c.boolean({char:`i`,description:`Enter interactive chat mode after first response`,required:!1,default:!1})};static args={prompt:o.string({description:`The prompt text`,required:!1})};async run(){let{args:e,flags:t}=await this.parse(f),n=t.tool??`xling`,o=t.yolo!==!1;try{let r=await this.#s(e,t);if(r.trim()||this.error(`No prompt provided. Use argument, --prompt, --file, or --stdin`),n!==`xling`){this.#t(n,t),await this.#n(n,r,o,t);return}this.#e();let i={prompt:r,model:t.model,system:t.system,temperature:t.temperature?parseFloat(t.temperature):void 0,maxTokens:t[`max-tokens`],stream:t.stream},s=await a(),c,l,u;if(t.stream&&!t.json){let e=await s.executeStream(i);c=await this.#o(e);let n=await e.usage;l=n?{promptTokens:n.inputTokens??0,completionTokens:n.outputTokens??0,totalTokens:n.totalTokens??0}:void 0,u={provider:`streaming`,model:t.model||`default`}}else{let e=await s.execute(i);c=e.content,l=e.usage,u={provider:e.provider,model:e.model},t.json?this.log(JSON.stringify(e,null,2)):this.log(e.content)}!t.json&&l&&u&&this.log(`\n[${u.provider}/${u.model}] ${l.totalTokens} tokens (${l.promptTokens} prompt + ${l.completionTokens} completion)`);let d=this.#r(t),f=d;!d&&!t.json&&process.stdout.isTTY&&(f=await this.#i()),f&&await this.#a(r,c,t,s)}catch(e){e instanceof r?this.error(e.message):e instanceof i?this.error(`All providers failed:\n${e.errors.map(e=>` ${e.provider}: ${e.error.message}`).join(`
|
|
2
2
|
`)}`):this.error(e.message)}}#e(){let e=new n().resolvePath(`user`);l.existsSync(e.replace(`~`,process.env.HOME||``))||this.error(`Configuration not found at ${e}\n\nPlease create a configuration file with at least one provider.\nExample:\n{\n "prompt": {\n "providers": [\n {\n "name": "openai",\n "baseUrl": "https://api.openai.com/v1",\n "apiKey": "sk-...",\n "models": ["gpt-4", "gpt-4-turbo"]\n }\n ],\n "defaultModel": "gpt-4"\n }\n}`)}#t(e,t){t.interactive&&this.error(`Interactive mode is not supported when using --tool codex/claude/gemini. Remove --interactive or use the default xling router.`);let n=[];t.json&&n.push(`--json`),t.model&&e!==`gemini`&&n.push(`--model`),t.system&&n.push(`--system`),t.temperature!==void 0&&n.push(`--temperature`),t[`max-tokens`]!==void 0&&n.push(`--max-tokens`),t.stream===!1&&n.push(`--no-stream`),n.length>0&&this.warn(`Ignoring ${n.join(`, `)} when using direct CLI backend; codex/claude will apply their own defaults.`)}async#n(n,r,i,a){let o=n===`codex`?`codex`:n===`gemini`?`gemini`:`claude`;await t(o)||this.error(`Tool "${o}" is not installed or not found in PATH. Please install it before using --tool ${n}.`);let s=n===`codex`?[`exec`,r]:[`-p`,r];n===`gemini`&&a.model&&s.unshift(`-m`,a.model);let c={executable:o,baseArgs:s,yoloArgs:n===`codex`?i?[`--dangerously-bypass-approvals-and-sandbox`]:void 0:n===`gemini`?i?[`-y`]:void 0:i?[`--dangerously-skip-permissions`]:void 0};this.log(`[backend: ${n}] ${i?`yolo on`:`yolo off`} — handing output to ${o}`),await e(c)}#r(e){return e.interactive?!0:(process.stdout.isTTY&&process.stdin.isTTY,!1)}async#i(){return new Promise(e=>{let t=!1;try{let n=l.openSync(`/dev/tty`,`r+`),r=new d.ReadStream(n),i=new d.WriteStream(n),a=u.createInterface({input:r,output:i});a.question(`
|
|
3
3
|
Continue conversation? (y/N): `,o=>{t=!0;let s=o.trim().toLowerCase(),c=s===`y`||s===`yes`;c||(i??process.stdout).write(`
|
|
4
4
|
Okay, not continuing the conversation.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../../errors-
|
|
1
|
+
import"../../errors-DMQ0N3V2.js";import"../../editor-DkpC97xg.js";import"../../fsStore-iYRoM63Y.js";import"../../base-CojCfrYM.js";import"../../config-CGH3WLbz.js";import"../../template-nmCA0YjS.js";import"../../xling-DqZuT8CZ.js";import"../../errorClassifier-BtDItoIE.js";import"../../loadBalancer-B-jkwy15.js";import"../../transformer-B_JzskvR.js";import{n as e,t}from"../../server-Cymednu2.js";import{Command as n,Flags as r}from"@oclif/core";var i=class i extends n{static summary=`Start an OpenAI-compatible proxy server with load balancing and key rotation`;static description=`Boot a local proxy server that forwards requests to configured upstream AI providers.
|
|
2
2
|
|
|
3
3
|
Features:
|
|
4
4
|
- OpenAI-compatible API endpoints (/v1/chat/completions, /v1/messages, etc.)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../../errors-
|
|
1
|
+
import"../../errors-DMQ0N3V2.js";import{r as e}from"../../format-CYV2tIph.js";import"../../fsStore-iYRoM63Y.js";import"../../base-CojCfrYM.js";import{t}from"../../codex-B7IedjUS.js";import{Command as n,Flags as r}from"@oclif/core";var i=class i extends n{static summary=`Manage auth profiles for Codex`;static description=`
|
|
2
2
|
Save, list, and delete auth profiles for Codex.
|
|
3
3
|
Use settings:switch to switch between auth profiles and providers.
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../../errors-
|
|
1
|
+
import"../../errors-DMQ0N3V2.js";import"../../editor-DkpC97xg.js";import{r as e}from"../../format-CYV2tIph.js";import{p as t}from"../../fsStore-iYRoM63Y.js";import"../../base-CojCfrYM.js";import"../../config-CGH3WLbz.js";import"../../template-nmCA0YjS.js";import"../../xling-DqZuT8CZ.js";import"../../codex-B7IedjUS.js";import"../../claudeDefault-CAA3qlD0.js";import{t as n}from"../../claude-FRKIDAFa.js";import"../../gemini-CuAIjTLO.js";import{t as r}from"../../dispatcher-Ck97HDr8.js";import{Args as i,Command as a,Flags as o}from"@oclif/core";import s from"node:fs";import c from"node:path";var l=class l extends a{static summary=`View the full configuration file`;static description=`
|
|
2
2
|
Print the entire configuration file for the selected tool/scope.
|
|
3
3
|
Use --json for structured output or --no-json for plain text.
|
|
4
4
|
`;static examples=[{description:`Print Claude user settings (raw file)`,command:`<%= config.bin %> <%= command.id %> --tool claude --scope user`},{description:`Inspect a Claude variant by name`,command:`<%= config.bin %> <%= command.id %> hxi --tool claude --scope user`},{description:`Dump Codex config as JSON for scripting`,command:`<%= config.bin %> <%= command.id %> --tool codex --json`},{description:`View xling prompt router config (if present)`,command:`<%= config.bin %> <%= command.id %> --tool xling --scope user`}];static args={name:i.string({description:`Claude variant name (optional). Example: settings:get hxi`,required:!1})};static flags={tool:o.string({char:`t`,description:`AI CLI tool to manage`,options:[`claude`,`codex`,`gemini`,`xling`],default:`claude`}),scope:o.string({char:`s`,description:`Configuration scope`,options:[`user`,`project`,`local`,`system`],default:`user`})};async run(){let{args:t,flags:n}=await this.parse(l);try{let r=n.tool,i=n.scope,a=r===`claude`&&t.name?await this.#t(i,t.name):await this.#e(r,i);if(n.json){this.log(e({success:!0,data:a}));return}if(!a.exists){this.warn(`Config file not found: ${a.path}`);return}a.content?this.log(a.content):this.log(`File is empty.`)}catch(e){this.error(e.message,{exit:1})}}async#e(e,t){return(await new r().execute({tool:e,scope:t,action:`inspect`})).data}async#t(e,r){let i=new n;if(!i.validateScope(e))throw Error(`Invalid scope for Claude: ${e}`);let a=r.trim();if(!a||a===`default`)return this.#e(`claude`,e);let o=t(i.resolvePath(e)),l=c.dirname(o),u=this.#n(l,a)??c.join(l,`settings.${a}.json`);if(!s.existsSync(u))return{path:u,exists:!1};let d=s.statSync(u);return{path:u,exists:!0,content:s.readFileSync(u,`utf-8`),size:d.size,lastModified:d.mtime}}#n(e,t){let n=[`settings.${t}.json`,`settings-${t}.json`];for(let t of n){let n=c.join(e,t);if(s.existsSync(n))return n}return null}};export{l as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../../errors-
|
|
1
|
+
import"../../errors-DMQ0N3V2.js";import"../../editor-DkpC97xg.js";import{r as e}from"../../format-CYV2tIph.js";import"../../fsStore-iYRoM63Y.js";import"../../base-CojCfrYM.js";import"../../config-CGH3WLbz.js";import"../../template-nmCA0YjS.js";import"../../xling-DqZuT8CZ.js";import"../../codex-B7IedjUS.js";import"../../claudeDefault-CAA3qlD0.js";import"../../claude-FRKIDAFa.js";import"../../gemini-CuAIjTLO.js";import{t}from"../../dispatcher-Ck97HDr8.js";import{Command as n,Flags as r}from"@oclif/core";var i=class i extends n{static summary=`Inspect configuration file status`;static description=`
|
|
2
2
|
Display information about the configuration file, including:
|
|
3
3
|
- File path
|
|
4
4
|
- Existence status
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../../errors-
|
|
1
|
+
import"../../errors-DMQ0N3V2.js";import"../../editor-DkpC97xg.js";import{i as e,n as t,r as n}from"../../format-CYV2tIph.js";import"../../fsStore-iYRoM63Y.js";import"../../base-CojCfrYM.js";import"../../config-CGH3WLbz.js";import"../../template-nmCA0YjS.js";import"../../xling-DqZuT8CZ.js";import"../../codex-B7IedjUS.js";import"../../claudeDefault-CAA3qlD0.js";import"../../claude-FRKIDAFa.js";import"../../gemini-CuAIjTLO.js";import{t as r}from"../../dispatcher-Ck97HDr8.js";import{Command as i,Flags as a}from"@oclif/core";var o=class o extends i{static summary=`List all settings for a tool`;static description=`
|
|
2
2
|
Display all configuration settings for the specified AI CLI tool.
|
|
3
3
|
Supports multiple scopes (user, project, local, system).
|
|
4
4
|
`;static examples=[{description:`List Claude user settings (YAML-style summary)`,command:`<%= config.bin %> <%= command.id %> --tool claude --scope user`},{description:`Show Codex providers in a table`,command:`<%= config.bin %> <%= command.id %> --tool codex --scope user --table`},{description:`Inspect Gemini project settings as JSON`,command:`<%= config.bin %> <%= command.id %> -t gemini -s project --json`},{description:`Check xling shortcut config location`,command:`<%= config.bin %> <%= command.id %> --tool xling --scope user`}];static flags={tool:a.string({char:`t`,description:`AI CLI tool to manage`,options:[`claude`,`codex`,`gemini`,`xling`],default:`claude`}),scope:a.string({char:`s`,description:`Configuration scope`,options:[`user`,`project`,`local`,`system`],default:`user`}),json:a.boolean({description:`Output JSON instead of text summary`,default:!1}),table:a.boolean({description:`Render table output instead of JSON`,default:!1})};async run(){let{flags:e}=await this.parse(o);try{let t=await new r().execute({tool:e.tool,scope:e.scope,action:`list`});if(e.table){this.#t(t.data);return}if(e.json){this.log(n(t));return}this.#e(t.data)}catch(e){this.error(e.message,{exit:1})}}#e(e){if(!e){this.log(`No settings found.`);return}if(e.type===`files`){if(e.files.length===0){this.log(`No settings files found.`);return}this.log(this.#n(e.files));return}if(Object.keys(e.entries).length===0){this.log(`No settings found.`);return}this.log(this.#r(e.entries,e.filePath))}#t(n){if(!n){this.log(`No settings found.`);return}if(n.type===`files`){if(n.files.length===0){this.log(`No settings files found.`);return}this.log(t(n.files));return}if(Object.keys(n.entries).length===0){this.log(`No settings found.`);return}this.log(e(n.entries)),this.log(`File: ${n.filePath}`)}#n(e){let t=e.map(e=>`${e.active?`* `:`- `}${e.variant} -> ${e.path}`+(e.exists?``:` (missing)`));return[`files:`].concat(t).join(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../../errors-
|
|
1
|
+
import"../../errors-DMQ0N3V2.js";import"../../editor-DkpC97xg.js";import{r as e}from"../../format-CYV2tIph.js";import"../../fsStore-iYRoM63Y.js";import"../../base-CojCfrYM.js";import"../../config-CGH3WLbz.js";import"../../template-nmCA0YjS.js";import"../../xling-DqZuT8CZ.js";import"../../codex-B7IedjUS.js";import"../../claudeDefault-CAA3qlD0.js";import"../../claude-FRKIDAFa.js";import"../../gemini-CuAIjTLO.js";import{t}from"../../dispatcher-Ck97HDr8.js";import{Command as n,Flags as r}from"@oclif/core";var i=class i extends n{static summary=`Open settings files in your IDE`;static description=`
|
|
2
2
|
Create or open settings files for AI CLI tools in your preferred editor.
|
|
3
3
|
For Claude: provide --name to edit settings.<name>.json (default: settings.json).
|
|
4
4
|
For Xling: edits ~/.claude/xling.json configuration.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../../errors-
|
|
1
|
+
import"../../errors-DMQ0N3V2.js";import"../../editor-DkpC97xg.js";import{r as e}from"../../format-CYV2tIph.js";import"../../fsStore-iYRoM63Y.js";import"../../base-CojCfrYM.js";import"../../config-CGH3WLbz.js";import"../../template-nmCA0YjS.js";import"../../xling-DqZuT8CZ.js";import{t}from"../../codex-B7IedjUS.js";import"../../claudeDefault-CAA3qlD0.js";import"../../claude-FRKIDAFa.js";import"../../gemini-CuAIjTLO.js";import{t as n}from"../../dispatcher-Ck97HDr8.js";import{Args as r,Command as i,Flags as a}from"@oclif/core";import o from"node:readline/promises";import{stdin as s,stdout as c}from"node:process";var l=class l extends i{static summary=`Switch Codex profiles or Claude settings variants`;static description=`
|
|
2
2
|
Switch to a different profile configuration for Codex
|
|
3
3
|
or activate a specific settings.<variant>.json for Claude.
|
|
4
4
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Command, Interfaces } from "@oclif/core";
|
|
2
|
+
|
|
3
|
+
//#region src/commands/settings/sync.d.ts
|
|
4
|
+
|
|
5
|
+
declare class SettingsSync extends Command {
|
|
6
|
+
#private;
|
|
7
|
+
static summary: string;
|
|
8
|
+
static description: string;
|
|
9
|
+
static examples: Command.Example[];
|
|
10
|
+
static flags: Interfaces.FlagInput;
|
|
11
|
+
run(): Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { SettingsSync as default };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import"../../errors-DMQ0N3V2.js";import{r as e}from"../../format-CYV2tIph.js";import"../../fsStore-iYRoM63Y.js";import{n as t,r as n,t as r}from"../../sync-C39sJRnz.js";import{Command as i,Flags as a}from"@oclif/core";import o from"node:readline/promises";import{stdin as s,stdout as c}from"node:process";var l=class l extends i{static summary=`Sync Claude Code config.toml into Codex config.toml`;static description=`
|
|
2
|
+
Copy the Claude Code config.toml into Codex's configuration directory.
|
|
3
|
+
Shows a diff first, then lets you choose overwrite, backup+overwrite,
|
|
4
|
+
or cancel (similar to settings:switch). Use --force to skip prompts.
|
|
5
|
+
`;static examples=[{description:`Sync default paths with a backup`,command:`<%= config.bin %> <%= command.id %>`},{description:`Dry-run and emit JSON (no writes)`,command:`<%= config.bin %> <%= command.id %> --dry-run --json`},{description:`Explicitly set source/target paths`,command:`<%= config.bin %> <%= command.id %> --source ~/.claude/config.toml --target ~/.codex/config.toml`}];static flags={source:a.string({description:`Path to Claude Code config.toml`,default:r}),target:a.string({description:`Path to Codex config.toml`,default:t}),backup:a.boolean({description:`Create a .bak of the target before overwriting`,default:!1,allowNo:!0}),dryRun:a.boolean({description:`Show what would change without writing files`,default:!1}),force:a.boolean({description:`Apply without prompts (overwrites unless --backup is set)`,default:!1}),json:a.boolean({description:`Output JSON instead of human-readable text`,default:!1})};async run(){let{flags:t}=await this.parse(l);t.json&&!t.force&&!t.dryRun&&this.error(`--json requires --force or --dry-run (no prompts allowed).`,{exit:1});try{let r=n({sourcePath:t.source,targetPath:t.target,backup:!1,dryRun:!0});if(!r.data?.changed){t.json?this.log(e(r)):this.log(r.message??`Already in sync.`);return}if(t.dryRun){t.json?this.log(e(r)):(this.#e(r.diff),this.log(`Dry-run only; no files were written.`));return}this.#e(r.diff);let i=!!t.backup;if(!t.force){let n=await this.#t();if(n===`cancel`){t.json?this.log(e({...r,message:`Sync cancelled.`})):this.log(`Sync cancelled.`);return}i=n===`backup`}let a=n({sourcePath:t.source,targetPath:t.target,backup:i,dryRun:!1});if(t.json){this.log(e(a));return}this.log(a.message??`Sync completed.`),a.data&&(this.log(`Source: ${a.data.source}`),this.log(`Target: ${a.data.target}`),a.data.backupPath&&this.log(`Backup: ${a.data.backupPath}`))}catch(e){this.error(e.message,{exit:1})}}#e(e){if(!e){this.log(`No diff available; files may already match.`);return}this.log(`Proposed changes:`),this.log(e)}async#t(){let e=o.createInterface({input:s,output:c});try{for(;;){let t=(await e.question(`Choose action ([o]verwrite/[b]ackup+overwrite/[c]ancel): `)).trim().toLowerCase();if([`overwrite`,`backup`,`cancel`].includes(t))return t;if([`o`,`b`,`c`].includes(t))return{o:`overwrite`,b:`backup`,c:`cancel`}[t];this.log(`Invalid selection. Please try again.`)}}finally{e.close()}}};export{l as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../../errors-
|
|
1
|
+
import"../../errors-DMQ0N3V2.js";import"../../editor-DkpC97xg.js";import"../../fsStore-iYRoM63Y.js";import"../../base-CojCfrYM.js";import"../../config-CGH3WLbz.js";import"../../template-nmCA0YjS.js";import"../../xling-DqZuT8CZ.js";import{n as e,t}from"../../types-Dd9zamNg.js";import{t as n}from"../../runner-wr3xLm2B.js";import{Args as r,Command as i,Flags as a}from"@oclif/core";import o from"cli-table3";var s=class s extends i{static summary=`Shortcut eXecute - run predefined command shortcuts`;static description=`
|
|
2
2
|
Execute predefined command shortcuts configured in ~/.claude/xling.json.
|
|
3
3
|
|
|
4
4
|
Shortcuts allow you to create custom aliases for frequently used xling commands
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Command as e}from"@oclif/core";var t=`0.9.
|
|
1
|
+
import{Command as e}from"@oclif/core";var t=`0.9.1`,n=class extends e{static summary=`Show the current xling version`;static description=`Displays the version from package.json.`;static examples=[{description:`Print the installed CLI version`,command:`<%= config.bin %> <%= command.id %>`},{description:`Shortcut using the built-in flag`,command:`<%= config.bin %> --version`}];async run(){this.log(t??`unknown`)}};export{n as default};
|
package/dist/commands/x/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../../errors-
|
|
1
|
+
import"../../errors-DMQ0N3V2.js";import"../../runner-C3LHrE0l.js";import"../../base-3YZ-yPmE.js";import"../../claude-IxiCkyCp.js";import"../../codex-Crixx0-y.js";import"../../gemini-DGRI2pw9.js";import{t as e}from"../../dispatcher-CHIt3Pnx.js";import{Command as t,Flags as n}from"@oclif/core";var r=class r extends t{static summary=`eXecute AI CLI tools (defaults to Claude Code with yolo)`;static description=`
|
|
2
2
|
Quick launcher for Claude Code, Codex, or Gemini CLI with yolo mode enabled by default.
|
|
3
3
|
|
|
4
4
|
Just run "xling x" to start Claude Code instantly!
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./errors-
|
|
1
|
+
import{i as e}from"./errors-DMQ0N3V2.js";import{r as t}from"./runner-C3LHrE0l.js";import{t as n}from"./utils-DoMSbn0Y.js";const r={chrome:{darwin:`Google Chrome`,linux:`google-chrome`,win32:`chrome`},safari:{darwin:`Safari`},firefox:{darwin:`Firefox`,linux:`firefox`,win32:`firefox`},arc:{darwin:`Arc`,win32:`Arc`},edge:{darwin:`Microsoft Edge`,linux:`microsoft-edge`,win32:`msedge`},dia:{darwin:`Dia`,linux:`dia`,win32:`dia`}};function i(e){let t=process.platform,n=r[e]?.[t];return n?t===`darwin`?`open -a "${n}"`:n:null}async function a(r,a){let{title:o,body:s,base:c,head:l,draft:u=!1,web:d=!1,browser:f=`chrome`,assignee:p=[],reviewer:m=[],label:h=[]}=r;if(!await n())throw new e(`gh`,`Install GitHub CLI: https://cli.github.com/`);let g=[`pr`,`create`];o&&g.push(`--title`,o),s&&g.push(`--body`,s),c&&g.push(`--base`,c),l&&g.push(`--head`,l),u&&g.push(`--draft`);for(let e of p)g.push(`--assignee`,e);for(let e of m)g.push(`--reviewer`,e);for(let e of h)g.push(`--label`,e);let _;if(d){g.push(`--web`);let e=i(f);if(!e)throw Error(`Browser "${f}" is not available on ${process.platform}. Supported browsers: chrome, safari (macOS only), firefox, arc, edge, dia`);_={GH_BROWSER:e}}let v=await t(`gh`,g,{cwd:a,env:_,throwOnError:!1});if(!v.success)throw Error(`Failed to create PR: ${v.stderr}`);return{success:!0,message:d?`Created PR and opened in ${f}`:`Created PR successfully`,details:{title:o,base:c,head:l,draft:u,web:d,browser:d?f:void 0,platform:process.platform}}}export{a as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e}from"./errors-
|
|
1
|
+
import{d as e}from"./errors-DMQ0N3V2.js";import{i as t}from"./runner-C3LHrE0l.js";import{t as n}from"./claude-IxiCkyCp.js";import{t as r}from"./codex-Crixx0-y.js";import{t as i}from"./gemini-DGRI2pw9.js";var a=class{#e;constructor(){this.#e=new Map,this.#e.set(`claude`,new n),this.#e.set(`codex`,new r),this.#e.set(`gemini`,new i)}async execute(e){let n=this.#t(e.tool);if(!await n.validateAvailability())return{success:!1,message:`Tool "${e.tool}" is not installed or not found in PATH`};let r=e.yolo??!0,i=n.buildCommandSpec({yolo:r,resume:e.resume,continue:e.continue,settings:e.settings});try{let{pid:n,command:a}=await t(i,{cwd:e.cwd,args:e.args}),o={tool:e.tool,yolo:r,args:e.args??[]};return e.resume!==void 0&&(o.resume=e.resume),e.continue!==void 0&&(o.continue=e.continue),e.cwd&&(o.cwd=e.cwd),{success:!0,pid:n,command:a,message:`Launched ${e.tool} successfully (PID: ${n})`,data:o}}catch(t){return{success:!1,message:`Failed to launch ${e.tool}: ${t.message}`}}}#t(t){let n=this.#e.get(t);if(!n)throw new e(t);return n}registerAdapter(e){this.#e.set(e.toolId,e)}getSupportedTools(){return Array.from(this.#e.keys())}};export{a as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e}from"./errors-
|
|
1
|
+
import{d as e}from"./errors-DMQ0N3V2.js";import{t}from"./xling-DqZuT8CZ.js";import{t as n}from"./codex-B7IedjUS.js";import{t as r}from"./claude-FRKIDAFa.js";import{t as i}from"./gemini-CuAIjTLO.js";var a=class{#e;constructor(){this.#e=new Map,this.#e.set(`claude`,new r),this.#e.set(`codex`,new n),this.#e.set(`gemini`,new i),this.#e.set(`xling`,new t)}async execute(e){let t=this.#t(e.tool);switch(e.action){case`list`:return{success:!0,data:await t.list(e.scope)};case`switch-profile`:if(!e.profile)throw Error(`Profile is required for switch-profile action`);if(!t.switchProfile)throw Error(`Tool ${e.tool} does not support profile switching`);return await t.switchProfile(e.scope,e.profile,e.switchOptions);case`edit`:if(!t.edit)throw Error(`Tool ${e.tool} does not support editing via CLI`);return await t.edit(e.scope,{name:e.name,ide:e.ide});case`inspect`:if(!t.inspect)throw Error(`Tool ${e.tool} does not support inspect action`);return{success:!0,data:await t.inspect(e.scope)};default:throw Error(`Unsupported action`)}}#t(t){let n=this.#e.get(t);if(!n)throw new e(t);return n}registerAdapter(e){this.#e.set(e.toolId,e)}getSupportedTools(){return Array.from(this.#e.keys())}};export{a as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./utils-
|
|
1
|
+
import{n as e}from"./utils-DoMSbn0Y.js";import{t}from"./pr-CPoXwoyq.js";import{t as n}from"./view-BzNOYH6k.js";import{t as r}from"./worktree-DpKDzo17.js";import{t as i}from"./create-Qvw44NZA.js";var a=class{async execute(a){if(a.command!==`prv`&&await e(a.cwd),a.command===`worktree`)return r(a.data,a.cwd);if(a.command===`prr`)return t(a.data,a.cwd);if(a.command===`prv`)return n(a.data,a.cwd);if(a.command===`prc`)return i(a.data,a.cwd);throw Error(`Unknown git command: ${a.command}`)}};export{a as t};
|
package/dist/domain/git.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as GitPrRequest, c as GitWorktreeRequest, d as WorktreeStatus, i as GitCreatePrRequest, l as SUPPORTED_BROWSERS, n as GitCommandPayload, o as GitViewRequest, r as GitCommandResult, s as GitWorktreeAction, t as GitCommandDetails, u as SupportedBrowser } from "../git-
|
|
1
|
+
import { a as GitPrRequest, c as GitWorktreeRequest, d as WorktreeStatus, i as GitCreatePrRequest, l as SUPPORTED_BROWSERS, n as GitCommandPayload, o as GitViewRequest, r as GitCommandResult, s as GitWorktreeAction, t as GitCommandDetails, u as SupportedBrowser } from "../git-nXnd4bRI.js";
|
|
2
2
|
export { GitCommandDetails, GitCommandPayload, GitCommandResult, GitCreatePrRequest, GitPrRequest, GitViewRequest, GitWorktreeAction, GitWorktreeRequest, SUPPORTED_BROWSERS, SupportedBrowser, WorktreeStatus };
|
package/dist/domain/git.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"../git-
|
|
1
|
+
import{t as e}from"../git-ngHtNl4m.js";export{e as SUPPORTED_BROWSERS};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../types-
|
|
2
|
-
import { n as SettingsAdapter, t as LaunchAdapter } from "../interfaces-
|
|
1
|
+
import "../types-vDRpkfsj.js";
|
|
2
|
+
import { n as SettingsAdapter, t as LaunchAdapter } from "../interfaces-CtOhRZzC.js";
|
|
3
3
|
export { LaunchAdapter, SettingsAdapter };
|
package/dist/domain/types.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as LaunchCommandSpec, c as OutputFormat, d as SettingsFileEntry, f as SettingsListData, g as ToolId, h as SwitchOptions, i as InspectResult, l as Scope, m as SettingsResult, n as ConfigValue, o as LaunchPayload, p as SettingsPayload, r as EditOptions, s as LaunchResult, t as ConfigObject, u as SettingAction } from "../types-
|
|
1
|
+
import { a as LaunchCommandSpec, c as OutputFormat, d as SettingsFileEntry, f as SettingsListData, g as ToolId, h as SwitchOptions, i as InspectResult, l as Scope, m as SettingsResult, n as ConfigValue, o as LaunchPayload, p as SettingsPayload, r as EditOptions, s as LaunchResult, t as ConfigObject, u as SettingAction } from "../types-vDRpkfsj.js";
|
|
2
2
|
export { ConfigObject, ConfigValue, EditOptions, InspectResult, LaunchCommandSpec, LaunchPayload, LaunchResult, OutputFormat, Scope, SettingAction, SettingsFileEntry, SettingsListData, SettingsPayload, SettingsResult, SwitchOptions, ToolId };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as ToolId, l as Scope, n as ConfigValue, p as SettingsPayload, u as SettingAction } from "../types-
|
|
1
|
+
import { g as ToolId, l as Scope, n as ConfigValue, p as SettingsPayload, u as SettingAction } from "../types-vDRpkfsj.js";
|
|
2
2
|
import { ZodType, z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/domain/validators.d.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as XlingConfig, D as validateXlingConfig, E as getProviderApiKeys, S as ShortcutConfigSchema, T as getNormalizedPriority, _ as ProxyConfigSchema, a as PlatformArgs, b as RetryPolicySchema, c as PlatformCommandSchema, d as PlatformShell, f as PlatformShellSchema, g as ProxyConfig, h as ProviderConfigSchema, i as PipelineStepSchema, l as PlatformPipeline, m as ProviderConfig, n as LoadBalanceStrategySchema, o as PlatformArgsSchema, p as PromptConfig, r as PipelineStep, s as PlatformCommand, t as LoadBalanceStrategy, u as PlatformPipelineSchema, v as ProxyProviderConfig, w as XlingConfigSchema, x as ShortcutConfig, y as RetryPolicy } from "../../config-
|
|
1
|
+
import { C as XlingConfig, D as validateXlingConfig, E as getProviderApiKeys, S as ShortcutConfigSchema, T as getNormalizedPriority, _ as ProxyConfigSchema, a as PlatformArgs, b as RetryPolicySchema, c as PlatformCommandSchema, d as PlatformShell, f as PlatformShellSchema, g as ProxyConfig, h as ProviderConfigSchema, i as PipelineStepSchema, l as PlatformPipeline, m as ProviderConfig, n as LoadBalanceStrategySchema, o as PlatformArgsSchema, p as PromptConfig, r as PipelineStep, s as PlatformCommand, t as LoadBalanceStrategy, u as PlatformPipelineSchema, v as ProxyProviderConfig, w as XlingConfigSchema, x as ShortcutConfig, y as RetryPolicy } from "../../config-CaLWAetR.js";
|
|
2
2
|
export { LoadBalanceStrategy, LoadBalanceStrategySchema, PipelineStep, PipelineStepSchema, PlatformArgs, PlatformArgsSchema, PlatformCommand, PlatformCommandSchema, PlatformPipeline, PlatformPipelineSchema, PlatformShell, PlatformShellSchema, PromptConfig, ProviderConfig, ProviderConfigSchema, ProxyConfig, ProxyConfigSchema, ProxyProviderConfig, RetryPolicy, RetryPolicySchema, ShortcutConfig, ShortcutConfigSchema, XlingConfig, XlingConfigSchema, getNormalizedPriority, getProviderApiKeys, validateXlingConfig };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,c as t,d as n,f as r,i,l as a,m as o,n as s,o as c,p as l,r as u,s as d,t as f,u as p}from"../../config-
|
|
1
|
+
import{a as e,c as t,d as n,f as r,i,l as a,m as o,n as s,o as c,p as l,r as u,s as d,t as f,u as p}from"../../config-CGH3WLbz.js";export{f as LoadBalanceStrategySchema,s as PipelineStepSchema,u as PlatformArgsSchema,i as PlatformCommandSchema,e as PlatformPipelineSchema,c as PlatformShellSchema,d as ProviderConfigSchema,t as ProxyConfigSchema,a as RetryPolicySchema,p as ShortcutConfigSchema,n as XlingConfigSchema,r as getNormalizedPriority,l as getProviderApiKeys,o as validateXlingConfig};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,n as t,r as n,t as r}from"../../template-
|
|
1
|
+
import{i as e,n as t,r as n,t as r}from"../../template-nmCA0YjS.js";export{r as DEFAULT_PROXY_CONFIG,t as DEFAULT_XLING_CONFIG,n as EXAMPLE_MULTI_PROVIDER_CONFIG,e as EXAMPLE_PROXY_CONFIG};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./errors-
|
|
1
|
+
import{r as e}from"./errors-DMQ0N3V2.js";import{spawn as t}from"node:child_process";const n={vscode:`code`,code:`code`,cursor:`cursor`,zed:`zed`,sublime:`subl`,subl:`subl`};function r(e){return e?n[e.toLowerCase()]??e:`code`}async function i(n,r){await new Promise((i,a)=>{let o=t(n,[r],{stdio:`inherit`});o.on(`error`,t=>{a(new e(n,t.message))}),o.on(`exit`,t=>{t===0||t===null?i():a(new e(n,`Exited with code ${t}`))})})}export{r as n,i as t};
|