blob: 586c946e2ae9d5e7d5ac446c3af06b963e117ca6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# claude-oauth-init
Initialize Claude OAuth configuration from environment variables.
## Installation
```bash
uv pip install .
```
Or install in editable mode for development:
```bash
uv pip install -e .
```
## Usage
### From environment variables
```bash
export CLAUDE_ACCOUNT_UUID="your-account-uuid"
export CLAUDE_EMAIL="your@email.com"
export CLAUDE_ORG_UUID="your-org-uuid"
claude-oauth-init
```
### From CLI arguments
```bash
claude-oauth-init \
--account-uuid your-account-uuid \
--email your@email.com \
--org-uuid your-org-uuid
```
### Custom config path
```bash
claude-oauth-init --config-path /path/to/.claude.json
```
### Environment variables only
```bash
claude-oauth-init --env-only
```
## Environment Variables
- `CLAUDE_ACCOUNT_UUID`: Claude account UUID
- `CLAUDE_EMAIL`: Claude email address
- `CLAUDE_ORG_UUID`: Claude organization UUID
## Integration with Docker
Replace the inline Python in your `docker-entrypoint.sh`:
```bash
#!/bin/bash
set -e
if [ -n "$CLAUDE_ACCOUNT_UUID" ] || [ -n "$CLAUDE_EMAIL" ] || [ -n "$CLAUDE_ORG_UUID" ]; then
claude-oauth-init --config-path /home/claude/.claude.json
fi
exec claude --dangerously-skip-permissions "$@"
```
|