diff --git a/bin/lmab b/bin/lmab index 1c015b8..d4cab9a 100755 --- a/bin/lmab +++ b/bin/lmab @@ -23,6 +23,7 @@ function banner() { ]; process.stdout.write("\n"); for (const [tone, row] of rows) process.stdout.write(` ${tone}${row}${color.reset}\n`); + process.stdout.write(` ${color.bold}${color.mint}${"LMAB".padStart(30)}${color.reset}\n`); process.stdout.write(`\n ${color.dim}find the expensive routes. keep the evidence.${color.reset}\n`); } diff --git a/install.sh b/install.sh index 9c295e9..d8e7cc8 100755 --- a/install.sh +++ b/install.sh @@ -98,6 +98,7 @@ banner() { printf ' %s%s%s\n' "$C3" $' | / _ \\ V V / -_) \'_| | \' \\ || | / _` | | | \'_ \\ | | |' "$R" printf ' %s%s%s\n' "$C4" $' |_\\___/\\_/\\_/\\___|_| |_|_|_\\_, | \\__,_|_| |_.__/_|_|_|' "$R" printf ' %s%s%s\n' "$C5" $' |__/ ' "$R" + printf ' %s%s%s\n' "$B$C4" $' LMAB' "$R" printf '\n %sfind the expensive routes. keep the evidence.%s\n' "$D" "$R" } run() { @@ -252,13 +253,13 @@ fi section "3/3 ยท Start the audit" ok "LMAB is ready" if [ "$NO_LAUNCH" = "0" ]; then - say "Opening Claude Code in ${B}$TARGET_REPO${R}." + say "Opening Claude Code in ${B}$TARGET_REPO${R} with auto permissions." say "The report will stay under ${B}.lmab/${R}." PROMPT="Use the LMAB audit skill for this repository. Start immediately: scan the code locally, automatically seek narrowly relevant Anthropic billing totals in already-connected integrations, write .lmab/report.html and .lmab/share-card.svg, open the report, and do not edit application code or call a model provider." if [ "$DRY_RUN" = "1" ]; then - run claude --plugin-dir "$SOURCE_DIR" "$PROMPT" + run claude --permission-mode auto --plugin-dir "$SOURCE_DIR" "$PROMPT" else - exec claude --plugin-dir "$SOURCE_DIR" "$PROMPT" + exec claude --permission-mode auto --plugin-dir "$SOURCE_DIR" "$PROMPT" fi else say "Run ${C4}lmab audit .${R} when you are ready." diff --git a/tests/installer.test.mjs b/tests/installer.test.mjs index ded4a61..ee7d74d 100644 --- a/tests/installer.test.mjs +++ b/tests/installer.test.mjs @@ -25,6 +25,31 @@ test("dry-run shows the complete bounded install without writing", () => { } }); +test("launches Claude Code in auto permission mode", () => { + const root = mkdtempSync(join(tmpdir(), "lmab-installer-launch-")); + const fakeBin = join(root, "bin"); + try { + mkdirSync(fakeBin, { recursive: true }); + const fakeClaude = join(fakeBin, "claude"); + writeFileSync(fakeClaude, "#!/bin/sh\nexit 0\n"); + chmodSync(fakeClaude, 0o755); + + const result = run( + "bash", + ["install.sh", "--yes", "--dry-run", "--install-dir", join(root, "home")], + { + cwd: process.cwd(), + env: { ...process.env, PATH: `${fakeBin}:${process.env.PATH}` }, + }, + ); + + assert.match(result.stdout, /Opening Claude Code .* with auto permissions/); + assert.match(result.stdout, /claude --permission-mode auto --plugin-dir/); + } finally { + rmSync(root, { recursive: true, force: true }); + } +}); + test("installs from a public-style git source and is idempotent", () => { const root = mkdtempSync(join(tmpdir(), "lmab-installer-")); const source = join(root, "source-repo");