Skip to content

Commit f197e7b

Browse files
ashwin-antclaude
andauthored
docs: add documentation for path_to_claude_code_executable and path_to_bun_executable inputs (#562)
Add documentation for the two previously undocumented inputs that allow users to provide custom executables for specialized environments: - path_to_claude_code_executable: for custom Claude Code binaries - path_to_bun_executable: for custom Bun runtime These inputs are particularly useful for environments like Nix, NixOS, custom containers, and other package management systems where the default installation may not work. Updated files: - docs/usage.md: Added to inputs table - docs/faq.md: Added FAQ entry with examples and use cases - docs/configuration.md: Added dedicated section with examples 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <noreply@anthropic.com>
1 parent 89f9131 commit f197e7b

3 files changed

Lines changed: 93 additions & 25 deletions

File tree

docs/configuration.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,3 +343,31 @@ Many individual input parameters have been consolidated into `claude_args` or `s
343343
| `mcp_config` | Use `claude_args: "--mcp-config '{...}'"` |
344344
| `direct_prompt` | Use `prompt` input instead |
345345
| `override_prompt` | Use `prompt` with GitHub context variables |
346+
347+
## Custom Executables for Specialized Environments
348+
349+
For specialized environments like Nix, custom container setups, or other package management systems where the default installation doesn't work, you can provide your own executables:
350+
351+
### Custom Claude Code Executable
352+
353+
Use `path_to_claude_code_executable` to provide your own Claude Code binary instead of using the automatically installed version:
354+
355+
```yaml
356+
- uses: anthropics/claude-code-action@v1
357+
with:
358+
path_to_claude_code_executable: "/path/to/custom/claude"
359+
# ... other inputs
360+
```
361+
362+
### Custom Bun Executable
363+
364+
Use `path_to_bun_executable` to provide your own Bun runtime instead of the default installation:
365+
366+
```yaml
367+
- uses: anthropics/claude-code-action@v1
368+
with:
369+
path_to_bun_executable: "/path/to/custom/bun"
370+
# ... other inputs
371+
```
372+
373+
**Important**: Using incompatible versions may cause the action to fail. Ensure your custom executables are compatible with the action's requirements.

docs/faq.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,44 @@ Check the GitHub Action log for Claude's run for the full execution trace.
213213

214214
The trigger uses word boundaries, so `@claude` must be a complete word. Variations like `@claude-bot`, `@claude!`, or `claude@mention` won't work unless you customize the `trigger_phrase`.
215215

216+
### How can I use custom executables in specialized environments?
217+
218+
For specialized environments like Nix, NixOS, or custom container setups where you need to provide your own executables:
219+
220+
**Using a custom Claude Code executable:**
221+
222+
```yaml
223+
- uses: anthropics/claude-code-action@v1
224+
with:
225+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
226+
path_to_claude_code_executable: "/path/to/custom/claude"
227+
# ... other inputs
228+
```
229+
230+
**Using a custom Bun executable:**
231+
232+
```yaml
233+
- uses: anthropics/claude-code-action@v1
234+
with:
235+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
236+
path_to_bun_executable: "/path/to/custom/bun"
237+
# ... other inputs
238+
```
239+
240+
**Common use cases:**
241+
242+
- Nix/NixOS environments where packages are managed differently
243+
- Docker containers with pre-installed executables
244+
- Custom build environments with specific version requirements
245+
- Debugging specific issues with particular versions
246+
247+
**Important notes:**
248+
249+
- Using an older Claude Code version may cause problems if the action uses newer features
250+
- Using an incompatible Bun version may cause runtime errors
251+
- The action will skip automatic installation when custom paths are provided
252+
- Ensure the custom executables are available in your GitHub Actions environment
253+
216254
## Best Practices
217255

218256
1. **Always specify permissions explicitly** in your workflow file

docs/usage.md

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -47,31 +47,33 @@ jobs:
4747

4848
## Inputs
4949

50-
| Input | Description | Required | Default |
51-
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------------- |
52-
| `anthropic_api_key` | Anthropic API key (required for direct API, not needed for Bedrock/Vertex) | No\* | - |
53-
| `claude_code_oauth_token` | Claude Code OAuth token (alternative to anthropic_api_key) | No\* | - |
54-
| `prompt` | Instructions for Claude. Can be a direct prompt or custom template for automation workflows | No | - |
55-
| `track_progress` | Force tag mode with tracking comments. Only works with specific PR/issue events. Preserves GitHub context | No | `false` |
56-
| `claude_args` | Additional arguments to pass directly to Claude CLI (e.g., `--max-turns 10 --model claude-4-0-sonnet-20250805`) | No | "" |
57-
| `base_branch` | The base branch to use for creating new branches (e.g., 'main', 'develop') | No | - |
58-
| `use_sticky_comment` | Use just one comment to deliver PR comments (only applies for pull_request event workflows) | No | `false` |
59-
| `github_token` | GitHub token for Claude to operate with. **Only include this if you're connecting a custom GitHub app of your own!** | No | - |
60-
| `use_bedrock` | Use Amazon Bedrock with OIDC authentication instead of direct Anthropic API | No | `false` |
61-
| `use_vertex` | Use Google Vertex AI with OIDC authentication instead of direct Anthropic API | No | `false` |
62-
| `mcp_config` | Additional MCP configuration (JSON string) that merges with the built-in GitHub MCP servers | No | "" |
63-
| `assignee_trigger` | The assignee username that triggers the action (e.g. @claude). Only used for issue assignment | No | - |
64-
| `label_trigger` | The label name that triggers the action when applied to an issue (e.g. "claude") | No | - |
65-
| `trigger_phrase` | The trigger phrase to look for in comments, issue/PR bodies, and issue titles | No | `@claude` |
66-
| `branch_prefix` | The prefix to use for Claude branches (defaults to 'claude/', use 'claude-' for dash format) | No | `claude/` |
67-
| `settings` | Claude Code settings as JSON string or path to settings JSON file | No | "" |
68-
| `additional_permissions` | Additional permissions to enable. Currently supports 'actions: read' for viewing workflow results | No | "" |
69-
| `experimental_allowed_domains` | Restrict network access to these domains only (newline-separated). | No | "" |
70-
| `use_commit_signing` | Enable commit signing using GitHub's commit signature verification. When false, Claude uses standard git commands | No | `false` |
71-
| `bot_id` | GitHub user ID to use for git operations (defaults to Claude's bot ID) | No | `41898282` |
72-
| `bot_name` | GitHub username to use for git operations (defaults to Claude's bot name) | No | `claude[bot]` |
73-
| `allowed_bots` | Comma-separated list of allowed bot usernames, or '\*' to allow all bots. Empty string (default) allows no bots | No | "" |
74-
| `allowed_non_write_users` | **⚠️ RISKY**: Comma-separated list of usernames to allow without write permissions, or '\*' for all users. Only works with `github_token` input. See [Security](./security.md) | No | "" |
50+
| Input | Description | Required | Default |
51+
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------------- |
52+
| `anthropic_api_key` | Anthropic API key (required for direct API, not needed for Bedrock/Vertex) | No\* | - |
53+
| `claude_code_oauth_token` | Claude Code OAuth token (alternative to anthropic_api_key) | No\* | - |
54+
| `prompt` | Instructions for Claude. Can be a direct prompt or custom template for automation workflows | No | - |
55+
| `track_progress` | Force tag mode with tracking comments. Only works with specific PR/issue events. Preserves GitHub context | No | `false` |
56+
| `claude_args` | Additional arguments to pass directly to Claude CLI (e.g., `--max-turns 10 --model claude-4-0-sonnet-20250805`) | No | "" |
57+
| `base_branch` | The base branch to use for creating new branches (e.g., 'main', 'develop') | No | - |
58+
| `use_sticky_comment` | Use just one comment to deliver PR comments (only applies for pull_request event workflows) | No | `false` |
59+
| `github_token` | GitHub token for Claude to operate with. **Only include this if you're connecting a custom GitHub app of your own!** | No | - |
60+
| `use_bedrock` | Use Amazon Bedrock with OIDC authentication instead of direct Anthropic API | No | `false` |
61+
| `use_vertex` | Use Google Vertex AI with OIDC authentication instead of direct Anthropic API | No | `false` |
62+
| `mcp_config` | Additional MCP configuration (JSON string) that merges with the built-in GitHub MCP servers | No | "" |
63+
| `assignee_trigger` | The assignee username that triggers the action (e.g. @claude). Only used for issue assignment | No | - |
64+
| `label_trigger` | The label name that triggers the action when applied to an issue (e.g. "claude") | No | - |
65+
| `trigger_phrase` | The trigger phrase to look for in comments, issue/PR bodies, and issue titles | No | `@claude` |
66+
| `branch_prefix` | The prefix to use for Claude branches (defaults to 'claude/', use 'claude-' for dash format) | No | `claude/` |
67+
| `settings` | Claude Code settings as JSON string or path to settings JSON file | No | "" |
68+
| `additional_permissions` | Additional permissions to enable. Currently supports 'actions: read' for viewing workflow results | No | "" |
69+
| `experimental_allowed_domains` | Restrict network access to these domains only (newline-separated). | No | "" |
70+
| `use_commit_signing` | Enable commit signing using GitHub's commit signature verification. When false, Claude uses standard git commands | No | `false` |
71+
| `bot_id` | GitHub user ID to use for git operations (defaults to Claude's bot ID) | No | `41898282` |
72+
| `bot_name` | GitHub username to use for git operations (defaults to Claude's bot name) | No | `claude[bot]` |
73+
| `allowed_bots` | Comma-separated list of allowed bot usernames, or '\*' to allow all bots. Empty string (default) allows no bots | No | "" |
74+
| `allowed_non_write_users` | **⚠️ RISKY**: Comma-separated list of usernames to allow without write permissions, or '\*' for all users. Only works with `github_token` input. See [Security](./security.md) | No | "" |
75+
| `path_to_claude_code_executable` | Optional path to a custom Claude Code executable. Skips automatic installation. Useful for Nix, custom containers, or specialized environments | No | "" |
76+
| `path_to_bun_executable` | Optional path to a custom Bun executable. Skips automatic Bun installation. Useful for Nix, custom containers, or specialized environments | No | "" |
7577

7678
### Deprecated Inputs
7779

0 commit comments

Comments
 (0)