arashi 1.8.2 → 1.10.0

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 CHANGED
@@ -36,7 +36,7 @@ Verify install:
36
36
  arashi --version
37
37
  ```
38
38
 
39
- By default, the installer places `arashi` in `~/.arashi/bin` and adds that path to your shell config.
39
+ By default, the installer places `arashi` in `~/.arashi/bin`, adds that path to your shell config, and in interactive installs offers to enable shell integration for `arashi switch --cd`.
40
40
 
41
41
  If curl installation fails, use npm installation below or the manual release instructions in [`docs/INSTALLATION.md`](./docs/INSTALLATION.md).
42
42
 
@@ -99,7 +99,9 @@ Arashi currently provides these commands:
99
99
  - `arashi list`
100
100
  - `arashi status`
101
101
  - `arashi remove <branch|path>`
102
- - `arashi switch [filter] [--repos|--all] [--sesh] [--no-default-launch]`
102
+ - `arashi switch [filter] [--repos|--all] [--cd|--no-cd] [--sesh] [--no-default-launch]`
103
+ - `arashi shell init <bash|zsh|fish>`
104
+ - `arashi shell install`
103
105
  - `arashi pull`
104
106
  - `arashi sync`
105
107
  - `arashi setup [--only <repo>] [--verbose]`
@@ -113,14 +115,40 @@ arashi add git@github.com:your-org/backend.git
113
115
  arashi create feature-auth-refresh
114
116
  arashi create feature-auth-refresh --launch
115
117
  arashi create feature-auth-refresh --no-launch
118
+ arashi shell install
116
119
  arashi status
117
120
  arashi switch feature-auth-refresh # parent repo worktrees
118
121
  arashi switch --repos feature-auth-refresh # child repo worktrees in current workspace
119
122
  arashi switch --all feature-auth-refresh # all repos
120
123
  arashi switch --repos docs # repo-name matching in child repos
124
+ arashi switch --cd feature-auth-refresh # parent-shell cd when shell integration is active
121
125
  arashi switch --no-default-launch # bypass configured launch mode defaults once
122
126
  ```
123
127
 
128
+ ## Shell Integration
129
+
130
+ Use shell integration when you want `arashi switch` to change the current shell directory instead of only opening a new terminal or editor context.
131
+
132
+ The official curl installer can offer this automatically. If you skip it or use npm, install it for the active shell with:
133
+
134
+ ```bash
135
+ arashi shell install
136
+ ```
137
+
138
+ Or print wrapper code for manual setup:
139
+
140
+ ```bash
141
+ arashi shell init bash
142
+ arashi shell init zsh
143
+ arashi shell init fish
144
+ ```
145
+
146
+ Once installed, you can use `arashi switch --cd <filter>` for one-off parent-shell switching or set `.arashi/config.json` `defaults.switch.mode` to `"cd"` or `"auto"`.
147
+
148
+ If shell integration is inactive, `arashi switch --cd` warns and skips launch fallback for that invocation.
149
+
150
+ For automated installs, set `ARASHI_SHELL_INTEGRATION=yes` to enable it without prompting or `ARASHI_SHELL_INTEGRATION=no` to skip it.
151
+
124
152
  ## Hooks
125
153
 
126
154
  Arashi can run lifecycle hooks during `arashi create` and `arashi remove`.
@@ -220,6 +248,7 @@ Example config header:
220
248
  "launchMode": "sesh"
221
249
  },
222
250
  "switch": {
251
+ "mode": "auto",
223
252
  "launchMode": "sesh"
224
253
  }
225
254
  },
@@ -227,6 +256,8 @@ Example config header:
227
256
  }
228
257
  ```
229
258
 
259
+ `defaults.switch.mode` accepts `"launch"`, `"cd"`, or `"auto"`. `"auto"` prefers parent-shell switching only when shell integration is active.
260
+
230
261
  Defaults precedence for create/switch behavior: explicit CLI flag > opt-out flag > config default > built-in default.
231
262
 
232
263
  ## skills.sh Integration
@@ -244,6 +275,7 @@ Arashi also ships a dedicated `skills.sh` integration package for guided install
244
275
  - Configuration details: [`docs/configuration.md`](./docs/configuration.md)
245
276
  - Clone command details: [`docs/commands/clone.md`](./docs/commands/clone.md)
246
277
  - Hook behavior: [`docs/hooks.md`](./docs/hooks.md)
278
+ - Shell integration details: [`docs/commands/shell.md`](./docs/commands/shell.md)
247
279
  - Setup command details: [`docs/commands/setup.md`](./docs/commands/setup.md)
248
280
  - Switch command details: [`docs/commands/switch.md`](./docs/commands/switch.md)
249
281
  - Remove command details: [`docs/commands/remove.md`](./docs/commands/remove.md)
package/bin/arashi.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arashi",
3
- "version": "1.8.2",
3
+ "version": "1.10.0",
4
4
  "description": "Git worktree manager for meta-repositories - The eye of the storm for your development workflow",
5
5
  "keywords": [
6
6
  "cli",
@@ -119,9 +119,17 @@
119
119
  "launchMode": {
120
120
  "$ref": "#/definitions/LaunchMode",
121
121
  "description": "Preferred launch mode when running switch"
122
+ },
123
+ "mode": {
124
+ "$ref": "#/definitions/SwitchMode",
125
+ "description": "Preferred switch behavior when running switch"
122
126
  }
123
127
  },
124
128
  "type": "object"
129
+ },
130
+ "SwitchMode": {
131
+ "enum": ["launch", "cd", "auto"],
132
+ "type": "string"
125
133
  }
126
134
  }
127
135
  }
@@ -5,11 +5,11 @@
5
5
  * This keeps the npm package size small while providing pre-compiled binaries
6
6
  */
7
7
 
8
- import { createWriteStream, chmodSync } from "node:fs";
9
- import { mkdir, access, constants } from "node:fs/promises";
10
- import { get } from "node:https";
11
- import { join, dirname } from "node:path";
8
+ import { access, constants, mkdir } from "node:fs/promises";
9
+ import { chmodSync, createWriteStream } from "node:fs";
10
+ import { dirname, join } from "node:path";
12
11
  import { fileURLToPath } from "node:url";
12
+ import { get } from "node:https";
13
13
 
14
14
  const __filename = fileURLToPath(import.meta.url);
15
15
  const __dirname = dirname(__filename);
@@ -19,10 +19,10 @@ const GITHUB_REPO = "corwinm/arashi";
19
19
 
20
20
  // Determine platform and binary name
21
21
  function getPlatformInfo() {
22
- const platform = process.platform;
23
- const arch = process.arch;
22
+ const { platform } = process;
23
+ const { arch } = process;
24
24
 
25
- let binaryName;
25
+ let binaryName = "";
26
26
  if (platform === "darwin" && arch === "arm64") {
27
27
  binaryName = `${PACKAGE_NAME}-macos-arm64`;
28
28
  } else if (platform === "linux" && arch === "x64") {
@@ -99,7 +99,7 @@ async function install() {
99
99
  // Get version from package.json
100
100
  const packageJsonPath = join(__dirname, "..", "package.json");
101
101
  const { readFile } = await import("node:fs/promises");
102
- const packageJson = JSON.parse(await readFile(packageJsonPath, "utf-8"));
102
+ const packageJson = JSON.parse(await readFile(packageJsonPath, "utf8"));
103
103
  const { version } = packageJson;
104
104
 
105
105
  const { binaryName, isWindows } = getPlatformInfo();
@@ -139,4 +139,4 @@ async function install() {
139
139
  }
140
140
  }
141
141
 
142
- install();
142
+ await install();