get-claudia 1.61.0 → 1.61.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/CHANGELOG.md +12 -0
- package/bin/index.js +17 -9
- package/bin/shell-init.js +28 -8
- package/package.json +1 -1
- package/template-v2/.claude/manifest.json +2 -2
- package/template-v2/.claude/hooks/__pycache__/post-tool-capture.cpython-313.pyc +0 -0
- package/template-v2/.claude/hooks/__pycache__/session-health-check.cpython-313.pyc +0 -0
- package/template-v2/.claude/hooks/__pycache__/user-prompt-capture.cpython-313.pyc +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to Claudia will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## 1.61.1 (2026-05-23)
|
|
6
|
+
|
|
7
|
+
### `claudia` command works from anywhere, and repairs itself
|
|
8
|
+
|
|
9
|
+
A follow-up to 1.61.0's shell command. The installer was storing a relative path, so `claudia` only worked from the install's parent directory. This release fixes the stored path and makes the command self-healing, so the error cannot recur.
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- **`claudia` command failing with "Claudia home directory not found: claudia".** The installer wrote a *relative* path (`claudia`) into `~/.claudia/claudia-home` instead of the absolute install path, because the shell-helper step was handed `targetDir` (relative) rather than the resolved `targetPath`. The `claudia` command then only worked when run from the install's parent directory and failed everywhere else. The installer now always stores the absolute path (via `path.resolve`, which also fixes a separate bug where passing an absolute install path as an argument produced a doubled path like `/home/you/home/you/claudia`).
|
|
14
|
+
- **`claudia` command now self-heals a bad `claudia-home`.** The shell function resolves a relative stored value against `$HOME` (never the current directory), falls back to the default `~/claudia` install when the stored path is missing or stale, and rewrites `claudia-home` with the corrected absolute path so the error cannot recur. Existing installs that already have a bad value are repaired the first time `claudia` runs after upgrading.
|
|
15
|
+
- **`--skip-memory` installs now get the `claudia` command too.** Previously the shell-helper step was skipped entirely on the `--skip-memory` path, leaving those users with no `claudia`/`update-claudia` command. The shell helper is independent of the memory system and now installs on every path.
|
|
16
|
+
|
|
5
17
|
## 1.61.0 (2026-05-22)
|
|
6
18
|
|
|
7
19
|
### Launch from anywhere, upgrade from anywhere
|
package/bin/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { existsSync, mkdirSync, cpSync, readdirSync, readFileSync, writeFileSync, statSync, renameSync, unlinkSync, copyFileSync } from 'fs';
|
|
4
|
-
import { join, dirname } from 'path';
|
|
4
|
+
import { join, dirname, resolve } from 'path';
|
|
5
5
|
import { fileURLToPath } from 'url';
|
|
6
6
|
import { spawn, execFileSync } from 'child_process';
|
|
7
7
|
import { homedir } from 'os';
|
|
@@ -828,7 +828,9 @@ async function main() {
|
|
|
828
828
|
// Support "." or "upgrade" for current directory
|
|
829
829
|
const isCurrentDir = arg === '.' || arg === 'upgrade';
|
|
830
830
|
const targetDir = isCurrentDir ? '.' : (arg || 'claudia');
|
|
831
|
-
|
|
831
|
+
// resolve() (not join) so an absolute arg is honored as-is and the result is
|
|
832
|
+
// always absolute (this value is what gets written into ~/.claudia/claudia-home).
|
|
833
|
+
const targetPath = isCurrentDir ? process.cwd() : resolve(process.cwd(), targetDir);
|
|
832
834
|
|
|
833
835
|
// Check if directory already exists with Claudia files
|
|
834
836
|
let isUpgrade = false;
|
|
@@ -969,11 +971,14 @@ async function main() {
|
|
|
969
971
|
}
|
|
970
972
|
renderer.render();
|
|
971
973
|
|
|
972
|
-
//
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
renderer
|
|
976
|
-
|
|
974
|
+
// The `claudia` shell command is independent of the memory system, so install
|
|
975
|
+
// it here too, otherwise --skip-memory users get no `claudia` command.
|
|
976
|
+
runShellStep(renderer, targetPath, () => {
|
|
977
|
+
runVaultStep(renderer, () => {
|
|
978
|
+
renderer.stopSpinner();
|
|
979
|
+
renderer.render();
|
|
980
|
+
showCompletion(targetDir, isCurrentDir, false, undefined, isUpgrade);
|
|
981
|
+
});
|
|
977
982
|
});
|
|
978
983
|
return;
|
|
979
984
|
}
|
|
@@ -1563,8 +1568,11 @@ async function main() {
|
|
|
1563
1568
|
|
|
1564
1569
|
renderer.stopSpinner();
|
|
1565
1570
|
|
|
1566
|
-
// Shell helper step, then vault, then completion
|
|
1567
|
-
|
|
1571
|
+
// Shell helper step, then vault, then completion.
|
|
1572
|
+
// Pass the absolute targetPath (not the relative targetDir): this value lands
|
|
1573
|
+
// in ~/.claudia/claudia-home, and a relative value there breaks `claudia` from
|
|
1574
|
+
// any directory other than the install's parent.
|
|
1575
|
+
runShellStep(renderer, targetPath, () => {
|
|
1568
1576
|
runVaultStep(renderer, () => {
|
|
1569
1577
|
renderer.render();
|
|
1570
1578
|
showDbScanResults(dbScan);
|
package/bin/shell-init.js
CHANGED
|
@@ -28,17 +28,37 @@ export const SHELL_INIT_CONTENT = `# Claudia shell helpers — sourced from your
|
|
|
28
28
|
|
|
29
29
|
_claudia_home() {
|
|
30
30
|
local home_file="$HOME/.claudia/claudia-home"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
local dir=""
|
|
32
|
+
[ -f "$home_file" ] && dir="$(cat "$home_file" 2>/dev/null)"
|
|
33
|
+
|
|
34
|
+
# A relative value (e.g. an older install that stored "claudia") is anchored to
|
|
35
|
+
# $HOME, never the current directory, so \`claudia\` works from anywhere.
|
|
36
|
+
case "$dir" in
|
|
37
|
+
/*) ;; # already absolute
|
|
38
|
+
"") ;; # empty -> handled by recovery below
|
|
39
|
+
*) dir="$HOME/$dir" ;; # relative -> resolve under $HOME
|
|
40
|
+
esac
|
|
41
|
+
|
|
42
|
+
# Recover from a missing or stale path by falling back to the default install
|
|
43
|
+
# location when it looks like a real Claudia install.
|
|
44
|
+
if [ -z "$dir" ] || [ ! -d "$dir" ]; then
|
|
45
|
+
if [ -d "$HOME/claudia/.claude" ] || [ -f "$HOME/claudia/CLAUDE.md" ]; then
|
|
46
|
+
dir="$HOME/claudia"
|
|
47
|
+
fi
|
|
34
48
|
fi
|
|
35
|
-
|
|
36
|
-
dir
|
|
37
|
-
|
|
38
|
-
echo "
|
|
39
|
-
echo "Fix by editing $home_file" >&2
|
|
49
|
+
|
|
50
|
+
if [ -z "$dir" ] || [ ! -d "$dir" ]; then
|
|
51
|
+
echo "Claudia install not found. Run: npx get-claudia ." >&2
|
|
52
|
+
[ -f "$home_file" ] && echo "(or set the correct path in $home_file)" >&2
|
|
40
53
|
return 1
|
|
41
54
|
fi
|
|
55
|
+
|
|
56
|
+
# Self-heal: persist the corrected absolute path so the error never recurs.
|
|
57
|
+
if [ "$(cat "$home_file" 2>/dev/null)" != "$dir" ]; then
|
|
58
|
+
mkdir -p "$HOME/.claudia" 2>/dev/null
|
|
59
|
+
printf '%s\\n' "$dir" > "$home_file" 2>/dev/null || true
|
|
60
|
+
fi
|
|
61
|
+
|
|
42
62
|
printf '%s' "$dir"
|
|
43
63
|
}
|
|
44
64
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.61.
|
|
3
|
-
"generated": "2026-05-
|
|
2
|
+
"version": "1.61.1",
|
|
3
|
+
"generated": "2026-05-23T14:34:46.165Z",
|
|
4
4
|
"algorithm": "sha256",
|
|
5
5
|
"files": {
|
|
6
6
|
".claude/rules/claudia-principles.md": "939e9720421628e7f2e4c8dfbaa4aeb9c1e18e8c6a5379cd6b772a6835b812e5",
|
|
Binary file
|
|
Binary file
|