feat: implement account management for multi-account Claude Code (gt-3133)
Adds support for managing multiple Claude Code accounts in Gas Town: - accounts.json config parsing in mayor/ directory - gt account list/add/default commands - GT_ACCOUNT env var support with priority resolution - --account flag on gt spawn and gt crew at commands - CLAUDE_CONFIG_DIR injection into tmux sessions Priority order: GT_ACCOUNT env var > --account flag > default from config 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -48,6 +48,9 @@ const (
|
||||
|
||||
// FileConfigYAML is the beads config file.
|
||||
FileConfigYAML = "config.yaml"
|
||||
|
||||
// FileAccountsJSON is the accounts configuration file in mayor/.
|
||||
FileAccountsJSON = "accounts.json"
|
||||
)
|
||||
|
||||
// Git branch names.
|
||||
@@ -154,3 +157,8 @@ func RigRuntimePath(rigPath string) string {
|
||||
func RigSettingsPath(rigPath string) string {
|
||||
return rigPath + "/" + DirSettings
|
||||
}
|
||||
|
||||
// MayorAccountsPath returns the path to mayor/accounts.json within a town root.
|
||||
func MayorAccountsPath(townRoot string) string {
|
||||
return townRoot + "/" + DirMayor + "/" + FileAccountsJSON
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user