Skip to content

Conversation

@pmarsceill
Copy link
Owner

Summary

  • Add persistent configuration management using Viper
  • Users can set defaults via ~/.mapd/config.yaml
  • Configuration values can be overridden by environment variables (MAP_* prefix) or CLI flags
  • Priority order: flag > env > config > default

New Commands

  • map config list (alias: ls) - List all configuration values
  • map config get <key> - Get a specific value
  • map config set <key> <value> - Set and persist a value

Configuration Options

# ~/.mapd/config.yaml
socket: /tmp/mapd.sock
data-dir: ~/.mapd

agent:
  default-type: claude        # claude or codex
  default-count: 1            # number of agents to spawn
  default-branch: ""          # git branch for worktrees
  use-worktree: true          # worktree isolation
  skip-permissions: true      # skip permission prompts

Test plan

  • make build succeeds
  • make test passes
  • golangci-lint run passes
  • map config list displays all config values
  • map config set agent.default-type codex persists to config file
  • map config get agent.default-type returns the set value
  • Config file is created at ~/.mapd/config.yaml

Closes #17

🤖 Generated with Claude Code

pmarsceill and others added 2 commits January 23, 2026 07:45
Add persistent configuration management using Viper, allowing users to
set defaults via ~/.mapd/config.yaml. Configuration values can be
overridden by environment variables (MAP_* prefix) or CLI flags.

New commands:
- map config list (alias: ls) - List all configuration values
- map config get <key> - Get a specific value
- map config set <key> <value> - Set and persist a value

Configuration options:
- socket: daemon socket path
- data-dir: data directory path
- agent.default-type: claude or codex
- agent.default-count: number of agents to spawn
- agent.default-branch: git branch for worktrees
- agent.use-worktree: worktree isolation
- agent.skip-permissions: skip permission prompts

Closes #17

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Document the new Viper configuration support including:
- Config file location and format
- Config commands (list, get, set)
- All configuration options with defaults
- Environment variable support
- Add viper to dependencies table

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@pmarsceill pmarsceill force-pushed the feat/viper-config-support branch from d76e8bd to 9dabba8 Compare January 23, 2026 12:46
@pmarsceill pmarsceill merged commit 450a245 into main Jan 23, 2026
5 checks passed
@pmarsceill pmarsceill deleted the feat/viper-config-support branch January 23, 2026 12:59
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.

Allow users to set configs using Viper

2 participants