Skip to content

Commit bd4e570

Browse files
NiveditJainclaudehermes-exosphere
authored
[luv-32] Add Claude and Codex launch modes (#32)
* [luv-32] Add -b base-branch flag Add `-b <branch>` so a new workspace is cloned at, and branched off, a caller-specified base instead of the repo default: - Parse `-b` as a value flag (same validation as `-m`). - Validate the base exists via `git ls-remote --heads` before cloning, so a bad base errors cleanly with no half-created workspace dir. - `git clone --branch <base>` then `git checkout -b luv-{N}` off it. - Record `git config luv.base <base>` in the clone (local .git/config) so the eventual PR can target it; warn (non-fatal) if that write fails. - Error clearly if `-b` is combined with a non-creation command (--clean/--init/-l/-pr/reopen-by-number/bare -n/-r). - Document the flag in README and -h. Bump version to 0.0.23. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RzFzm7YUJsqTAauzC7MBVt * [luv-32] Add Claude and Codex agent selection * chore: commit review-session artifact (claude-output.txt) Empty harness output file present in the working tree during the automated review of PR #32. Committed locally to satisfy the require-commit-before-stop policy; not pushed. Not part of the PR diff. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: Nivedit (Hermes) <hermes@exosphere.host>
1 parent bdf7f39 commit bd4e570

6 files changed

Lines changed: 206 additions & 88 deletions

File tree

README.md

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# luv
22

3-
A CLI that launches [Claude Code](https://docs.anthropic.com/en/docs/claude-code) agents on GitHub repos with isolated workspaces and optional Docker dev environments.
3+
A CLI that launches Claude Code or Codex agents on GitHub repos with isolated workspaces and optional Docker dev environments.
44

55
`luv` clones a repo, creates a branch, and drops you into a Claude session ready to work. When the repo ships a `.luv/settings.json`, it spins up Docker Compose automatically so every command runs in the right environment.
66

@@ -14,7 +14,7 @@ uv tool install luv-cli
1414
pip install luv-cli
1515
```
1616

17-
**Requirements:** [Claude Code](https://docs.anthropic.com/en/docs/claude-code) CLI and [GitHub CLI](https://cli.github.com/) (`gh`) must be installed and authenticated.
17+
**Requirements:** [GitHub CLI](https://cli.github.com/) (`gh`) plus either Claude Code or Codex must be installed and authenticated.
1818

1919
## Quick start
2020

@@ -25,6 +25,12 @@ luv --init
2525
# Create a new workspace and launch Claude
2626
luv my-repo "add user authentication"
2727

28+
# Launch Codex in YOLO mode instead
29+
luv --codex my-repo "add user authentication"
30+
31+
# Select Claude explicitly (Claude remains the default)
32+
luv --claude my-repo "add user authentication"
33+
2834
# Base a new workspace off a non-default branch
2935
luv my-repo -b develop "add user authentication"
3036

@@ -51,8 +57,8 @@ luv --clean
5157

5258
1. Clones the repo into `~/prs/{repo}-{number}/`
5359
2. Creates a new branch `luv-{number}`
54-
3. Trusts the project in Claude Code config
55-
4. Launches Claude with Opus 4.8 at max effort
60+
3. Configures the selected agent with the workspace's PR conventions
61+
4. Launches Claude with Opus 4.8 at max effort, or Codex in YOLO mode
5662

5763
All workspaces live under `~/prs/`. The number comes from the repo's GitHub issue counter to avoid collisions.
5864

@@ -61,7 +67,8 @@ All workspaces live under `~/prs/`. The number comes from the repo's GitHub issu
6167
| Command | Description |
6268
|---------|-------------|
6369
| `luv --init` | Configure default GitHub org |
64-
| `luv [org/]<repo> [prompt...]` | Create a new workspace and launch Claude |
70+
| `luv [org/]<repo> [prompt...]` | Create a new workspace and launch Claude (default) |
71+
| `luv --codex [org/]<repo> [prompt...]` | Create a workspace and launch Codex in YOLO mode |
6572
| `luv [org/]<repo> -b <branch> [prompt...]` | Create a workspace based off `<branch>` instead of the default |
6673
| `luv [org/]<repo> <number> [prompt]` | Reopen an existing workspace |
6774
| `luv -l <PR URL> [prompt]` | Open any GitHub PR by URL |
@@ -74,11 +81,13 @@ All workspaces live under `~/prs/`. The number comes from the repo's GitHub issu
7481

7582
| Flag | Description |
7683
|------|-------------|
84+
| `--claude` | Launch Claude Code (default) |
85+
| `--codex` | Launch Codex with approvals and sandboxing bypassed (YOLO mode) |
7786
| `-n` | Navigate: open a shell instead of Claude |
78-
| `-r` | Resume: resume the last Claude session |
87+
| `-r` | Resume: resume the selected agent's last session |
7988
| `-p` | Launch Claude in plan permission mode (default: `bypassPermissions`) |
80-
| `-nit` | Non-interactive: run `claude -p <prompt>` and exit (no REPL); streams `stream-json` events to stdout |
81-
| `-m MODEL` | Claude model to use (default: `claude-opus-4-8`); passed through to `claude --model`, so aliases like `opus`/`sonnet`/`haiku` work |
89+
| `-nit` | Non-interactive: run the selected agent and exit (no REPL); Claude streams `stream-json` events to stdout |
90+
| `-m MODEL` | Model to use; Claude defaults to `claude-opus-4-8`, while Codex uses its configured CLI default |
8291
| `-b BRANCH` | Base a new workspace off `BRANCH` (clone + branch from it); recorded in `git config luv.base` so the PR can target it |
8392
| `-e` | Env: pass `LUV_*` environment variables (with prefix stripped) into the session |
8493
| `-f`, `--force` | Skip safety checks (with `--clean`) |
@@ -120,15 +129,15 @@ services:
120129
POSTGRES_PASSWORD: dev
121130
```
122131
123-
The `dev-environment` service **must** have [Claude Code](https://docs.anthropic.com/en/docs/claude-code) installed in its image.
132+
The `dev-environment` service **must** have the selected agent CLI (`claude` or `codex`) installed in its image.
124133

125134
### How Docker mode works
126135

127136
1. Detects `.luv/settings.json` with `compose_file` key
128137
2. Tears down any stale environment from a previous run
129138
3. Starts `docker compose up -d --build` with a unique project name (`luv-{repo}-{number}`) for network/volume isolation
130139
4. Verifies the `dev-environment` service is running
131-
5. Runs Claude inside the container via `docker compose exec`
140+
5. Runs the selected agent inside the container via `docker compose exec`
132141
6. The repo is volume-mounted, so all file changes and git commits are visible on the host
133142
7. On exit (including Ctrl-C), tears down the environment with `docker compose down -v`
134143

claude-output.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)