Skip to content

Comments

feat: add config file support and optional toolchains#53

Closed
shrwnsan wants to merge 2 commits intofletchgqc:mainfrom
shrwnsan:feat/config-file
Closed

feat: add config file support and optional toolchains#53
shrwnsan wants to merge 2 commits intofletchgqc:mainfrom
shrwnsan:feat/config-file

Conversation

@shrwnsan
Copy link
Contributor

Summary

  • Add ~/.agentbox/config file for persistent settings (bash key=value format)
  • Add --no-java flag to exclude Java toolchain (default: included for backwards compatibility)
  • Add --no-opencode flag to exclude OpenCode installation (default: included)
  • Add --cc-latest flag for Claude Code latest channel (default: stable)
  • Fix Java status message to show friendly "excluded" text instead of command-not-found error
  • Auto-enable OpenCode when AGENTBOX_TOOL=opencode is set, overriding AGENTBOX_INCLUDE_OPENCODE=false

Configuration

Config file supports bash syntax with shebang for editor syntax highlighting:

#!/bin/bash
# ~/.agentbox/config

AGENTBOX_TOOL=claude
AGENTBOX_INCLUDE_JAVA=false
AGENTBOX_INCLUDE_OPENCODE=false
AGENTBOX_CC_CHANNEL=latest

CLI flags override config file settings.

Examples

# Use config file defaults
~/.agentbox/agentbox --model glm-4.7

# Override config with CLI flags
~/.agentbox/agentbox --no-java --cc-latest --model glm-4.7

# Config file with all options
cp config.example ~/.agentbox/config

Benefits

  • Users can set preferred defaults without typing flags every time
  • Backwards compatible: Java and OpenCode still included by default
  • Smaller images possible with --no-java and --no-opencode
  • Latest Claude Code accessible via --cc-latest flag
  • Tool selection (opencode) automatically includes required installation, even if config has AGENTBOX_INCLUDE_OPENCODE=false

🤖 Generated by Claude Code - GLM 4.7

shrwnsan and others added 2 commits February 11, 2026 12:54
Add ~/.agentbox/config for persistent settings (tool, Java, Claude channel).
Make Java opt-out with --no-java flag (backwards compatible).
Add --cc-latest flag for latest Claude Code channel.
Improve Java status message to avoid command-not-found errors.

Config file supports bash key=value format with shebang for syntax highlighting.
CLI flags override config file settings.

Co-Authored-By: GLM <[email protected]>
Override AGENTBOX_INCLUDE_OPENCODE=false when AGENTBOX_TOOL=opencode
since the tool cannot run without being installed.

Co-Authored-By: GLM <[email protected]>
@shrwnsan
Copy link
Contributor Author

shrwnsan commented Feb 11, 2026

Closing in favor of new PR #54 with clean history

@shrwnsan shrwnsan closed this Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant