Open an interactive claude with the setup loaded through claude-release
CI / tests (pull_request) Has been cancelled

This commit is contained in:
2026-12-04 05:34:11 +01:00
parent 1e5f7f931f
commit 0eb726939c
8 changed files with 125 additions and 2 deletions
+16
View File
@@ -0,0 +1,16 @@
import pathlib
import sys
from claude_home.home import SIGNED_OUT
from loop_effects.effects import Effects
# The spelling, a command of its own beside build-release: a panel of readers seated as the README's audience rejected `build-release claude`, since build-release reads every word after its name as a task, so a task that starts with "claude" would mean something else. They picked the name that opens with the word they look for.
def main(argv: list[str], cwd: pathlib.Path, effects: Effects) -> int:
"""Runs claude on the terminal in cwd with argv as its arguments, in the loop's Claude home with the release's tools first on `PATH`, which the effect sets for every claude it starts. Returns claude's exit code, or 1 where the home cannot be built."""
not_ready = effects.claude_home()
# Where nobody has signed in yet, the login is typed in this claude.
if not_ready and not not_ready.startswith(SIGNED_OUT):
print(not_ready, file=sys.stderr)
return 1
return effects.claude_on_terminal(argv, str(cwd), {})