Skip to content

feat(ux): add config file support and standardize configuration options#57

Open
shrwnsan wants to merge 3 commits into
fletchgqc:mainfrom
shrwnsan:feat/config-file
Open

feat(ux): add config file support and standardize configuration options#57
shrwnsan wants to merge 3 commits into
fletchgqc:mainfrom
shrwnsan:feat/config-file

Conversation

@shrwnsan
Copy link
Copy Markdown
Contributor

@shrwnsan shrwnsan commented Feb 28, 2026

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
  • Standardize all Docker ARG names with AGENTBOX_ prefix for consistency
  • Add AGENTBOX_SIMPLE_PROMPT for optional traditional Unix-style prompt (user@host:~)
  • Add projects/ and .agents/ directories to .gitignore

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
AGENTBOX_SIMPLE_PROMPT=true

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
  • Consistent AGENTBOX_ prefix across all configuration options
  • Optional simple prompt for users preferring traditional Unix style
  • projects/ and .agents/ gitignored to avoid accidental commits of local project directories and agent notes

shrwnsan and others added 3 commits February 27, 2026 01:04
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 <zai-org@users.noreply.github.com>
Override AGENTBOX_INCLUDE_OPENCODE=false when AGENTBOX_TOOL=opencode
since the tool cannot run without being installed.

Co-Authored-By: GLM <zai-org@users.noreply.github.com>
- Prefix all Docker ARGs with AGENTBOX_ for consistency (INCLUDE_JAVA, CC_CHANNEL, etc.)
- Add AGENTBOX_SIMPLE_PROMPT arg for simple traditional Unix-style prompt (user@host:~)
- Keep default oh-my-zsh theme for backwards compatibility
- Maintain terminal size handling for better TTY support
- Add projects/ and .agents/ to .gitignore

Co-Authored-By: OpenCode <noreply@opencode.ai>
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