swixter 0.1.8 → 0.1.10

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 (2) hide show
  1. package/dist/cli/index.js +24 -8
  2. package/package.json +1 -1
package/dist/cli/index.js CHANGED
@@ -14021,7 +14021,7 @@ var CONFIG_VERSION = "2.0.0", EXPORT_VERSION = "1.0.0";
14021
14021
  var init_versions2 = () => {};
14022
14022
 
14023
14023
  // src/constants/meta.ts
14024
- var APP_VERSION = "0.1.8";
14024
+ var APP_VERSION = "0.1.10";
14025
14025
  var init_meta = () => {};
14026
14026
 
14027
14027
  // src/constants/install.ts
@@ -21978,6 +21978,9 @@ ${import_picocolors8.default.bold("Examples:")}
21978
21978
 
21979
21979
  ${import_picocolors8.default.dim(`# Run ${CODER_CONFIG.displayName} and pass other arguments`)}
21980
21980
  ${import_picocolors8.default.green(`swixter ${CODER_NAME} r --print "What is 2+2?"`)}
21981
+
21982
+ ${import_picocolors8.default.dim(`# Run ${CODER_CONFIG.displayName} in yolo mode (skips all permission prompts)`)}
21983
+ ${import_picocolors8.default.green(`swixter ${CODER_NAME} r --yolo`)}
21981
21984
  `);
21982
21985
  }
21983
21986
  async function cmdCreate(args) {
@@ -22710,6 +22713,9 @@ async function spawnClaudeWithEnv(args, env, options) {
22710
22713
  if (idx > 0 && args[idx - 1] === "--profile") {
22711
22714
  return false;
22712
22715
  }
22716
+ if (arg === "--yolo") {
22717
+ return false;
22718
+ }
22713
22719
  return true;
22714
22720
  });
22715
22721
  const tmp = await import("node:os");
@@ -22719,6 +22725,11 @@ async function spawnClaudeWithEnv(args, env, options) {
22719
22725
  const tmpFile = path.join(tmp.tmpdir(), `swixter-settings-${Date.now()}.json`);
22720
22726
  await fs.writeFile(tmpFile, settingsContent, "utf-8");
22721
22727
  claudeArgs.push("--settings", tmpFile);
22728
+ if (options?.yolo === true) {
22729
+ if (!claudeArgs.includes("--dangerously-skip-permissions")) {
22730
+ claudeArgs.push("--dangerously-skip-permissions");
22731
+ }
22732
+ }
22722
22733
  if (options?.profileName) {
22723
22734
  console.log();
22724
22735
  console.log(import_picocolors8.default.dim(`Using profile: ${import_picocolors8.default.cyan(options.profileName)}${options.providerDisplayName ? ` (${options.providerDisplayName})` : ""}`));
@@ -22772,7 +22783,8 @@ async function cmdRun(args) {
22772
22783
  await spawnClaudeWithEnv(args, env, {
22773
22784
  profileName: profile.name,
22774
22785
  providerDisplayName: preset?.displayName,
22775
- baseURL
22786
+ baseURL,
22787
+ yolo: params.yolo === true
22776
22788
  });
22777
22789
  }
22778
22790
  async function cmdInstall(args) {
@@ -27123,7 +27135,7 @@ var init_handler = __esm(() => {
27123
27135
 
27124
27136
  // src/proxy/server.ts
27125
27137
  import http from "node:http";
27126
- import { existsSync as existsSync7, readFileSync, writeFileSync } from "node:fs";
27138
+ import { existsSync as existsSync7, mkdirSync as mkdirSync2, readFileSync, writeFileSync } from "node:fs";
27127
27139
  import { dirname as dirname7, join as join7 } from "node:path";
27128
27140
  function getRegistryPath() {
27129
27141
  return join7(dirname7(getConfigPath2()), "proxy-instances.json");
@@ -27140,7 +27152,9 @@ function loadRegistry() {
27140
27152
  }
27141
27153
  }
27142
27154
  function saveRegistry(registry2) {
27143
- writeFileSync(getRegistryPath(), JSON.stringify(registry2, null, 2), "utf-8");
27155
+ const path = getRegistryPath();
27156
+ mkdirSync2(dirname7(path), { recursive: true });
27157
+ writeFileSync(path, JSON.stringify(registry2, null, 2), "utf-8");
27144
27158
  }
27145
27159
  function updateInstanceInRegistry(status) {
27146
27160
  const registry2 = loadRegistry();
@@ -27572,8 +27586,8 @@ var init_client = __esm(() => {
27572
27586
 
27573
27587
  // src/auth/token.ts
27574
27588
  import { existsSync as existsSync13 } from "node:fs";
27575
- import { readFile as readFile10, writeFile as writeFile9, unlink as unlink4 } from "node:fs/promises";
27576
- import { join as join11 } from "node:path";
27589
+ import { mkdir as mkdir7, readFile as readFile10, writeFile as writeFile9, unlink as unlink4 } from "node:fs/promises";
27590
+ import { dirname as dirname11, join as join11 } from "node:path";
27577
27591
  function getAuthFilePath() {
27578
27592
  return join11(getConfigDir("swixter"), AUTH_FILE);
27579
27593
  }
@@ -27590,6 +27604,7 @@ async function loadAuthState() {
27590
27604
  }
27591
27605
  async function saveAuthState(state) {
27592
27606
  const authPath = getAuthFilePath();
27607
+ await mkdir7(dirname11(authPath), { recursive: true });
27593
27608
  await writeFile9(authPath, JSON.stringify(state, null, 2), { mode: 384, encoding: "utf-8" });
27594
27609
  }
27595
27610
  async function clearAuthState() {
@@ -31679,8 +31694,8 @@ async function startServer(portArg, options) {
31679
31694
  // src/utils/daemon.ts
31680
31695
  init_paths();
31681
31696
  import { existsSync as existsSync12 } from "node:fs";
31682
- import { readFile as readFile9, writeFile as writeFile8, unlink as unlink3 } from "node:fs/promises";
31683
- import { join as join10 } from "node:path";
31697
+ import { mkdir as mkdir6, readFile as readFile9, writeFile as writeFile8, unlink as unlink3 } from "node:fs/promises";
31698
+ import { dirname as dirname10, join as join10 } from "node:path";
31684
31699
  function getPidFilePath() {
31685
31700
  return join10(getConfigDir("swixter"), "ui.pid");
31686
31701
  }
@@ -31701,6 +31716,7 @@ async function readPidFile() {
31701
31716
  async function writePidFile(pid, port) {
31702
31717
  const path = getPidFilePath();
31703
31718
  const data = { pid, port, startTime: new Date().toISOString() };
31719
+ await mkdir6(dirname10(path), { recursive: true });
31704
31720
  await writeFile8(path, JSON.stringify(data, null, 2), "utf-8");
31705
31721
  }
31706
31722
  async function removePidFile() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swixter",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "description": "CLI tool for managing AI coding assistant configurations - easily switch between providers (Claude Code, Codex, Continue) with Anthropic, Ollama, or custom APIs",
5
5
  "main": "dist/cli/index.js",
6
6
  "module": "dist/cli/index.js",