5 Commits

Author SHA1 Message Date
Dave Eargle ab1d7e6e4b fix search path for .claude.json to account for CLAUDE_CONFIG_DIR (#40)
* fix search path for .claude.json to account for CLAUDE_CONFIG_DIR

When `CLAUDE_CONFIG_DIR` is set, as is done in `devcontainer.json`, `claude` looks
for `.claude.json` in that folder; otherwise, `~` is used.

Learned through observation, not claude documentation :old-man-yells-at-cloud:

* add more words to the lookup behavior description

* Apply suggestion from @DarkaMaul

---------

Co-authored-by: dm <darkamaul@hotmail.fr>
2026-04-09 09:25:04 +02:00
Akshith G 5a2b92a790 feat: add non-interactive auth via CLAUDE_CODE_OAUTH_TOKEN (#32)
* feat: add non-interactive auth via CLAUDE_CODE_OAUTH_TOKEN

Bypass the interactive onboarding wizard when CLAUDE_CODE_OAUTH_TOKEN is
set. On container create, post_install.py runs `claude -p` to populate
auth state and sets hasCompletedOnboarding so the TUI starts without the
login wizard.

Workaround for https://github.com/anthropics/claude-code/issues/8938.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: use remoteEnv instead of containerEnv for secrets

containerEnv bakes values into the image as ENV instructions, visible
in docker inspect/history. remoteEnv is set at runtime only.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: improve error handling in onboarding bypass

- Handle timeout as expected (claude -p writes config before API call)
- Catch FileNotFoundError/OSError if claude is not installed
- Check returncode explicitly instead of dead CalledProcessError catch
- Guard on ~/.claude.json existence before writing onboarding flag
- Replace contextlib.suppress with explicit try/except that logs
- Update module docstring and README wording

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 06:36:47 -07:00
dm d05cd49ea2 Fix SSH commit signing in devcontainer when host uses 1Password (#25)
When the host configures `gpg.ssh.program` to use 1Password's
`op-ssh-sign` binary, commit signing fails inside the container
because that macOS-specific binary doesn't exist.

DevContainers automatically forward SSH_AUTH_SOCK from the host,
so the SSH agent (including 1Password's) is already available.
By overriding `gpg.ssh.program` to `/usr/bin/ssh-keygen` in the
container's local gitconfig (which is included after the host
config), signing uses the standard ssh-keygen against the
forwarded agent instead of the missing 1Password binary.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-06 01:10:00 +01:00
Dan Guido fefdf3f43d Use contextlib.suppress for cleaner exception handling
Fixes ruff SIM105 lint warning.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 20:49:10 -05:00
Dan Guido 91ff6f7c0c Initial commit 2026-01-29 20:13:16 -05:00