---
actual_hours: null
assignees: []
created_at: '2025-08-20T09:25:57.936754'
dependencies: []
description: 'Migrate src/claude_mpm/cli/commands/config.py to use the new shared
  utilities.


  ## Current State

  - 295 lines of code with duplicate patterns

  - Manual argument validation

  - Inconsistent error handling

  - Direct console printing


  ## Target State

  - Use BaseCommand inheritance

  - Shared argument parsing patterns

  - Standardized error handling

  - Consistent output formatting


  ## Implementation Steps

  1. Import shared utilities: BaseCommand, handle_cli_errors, add_common_arguments

  2. Create ConfigCommand class inheriting from BaseCommand

  3. Replace argument parsing with shared patterns

  4. Update error handling to use CLIErrorHandler

  5. Implement consistent output formatting

  6. Update argument parser setup

  7. Test functionality preservation


  ## Expected Outcome

  - ~50% code reduction (295 → ~150 lines)

  - Consistent with other refactored commands

  - Better error handling and user experience


  ## Files to Modify

  - src/claude_mpm/cli/commands/config.py

  - src/claude_mpm/cli/parsers/config_parser.py (if exists)


  ## Reference

  - See refactored_config_example.py for implementation pattern'
due_date: null
estimated_hours: null
id: TSK-0128
labels: []
metadata:
  blocked_by: []
  blocks: []
  epic: EP-0002
  estimate: 1h
  github_id: I_kwDOPScCe87HDEve
  github_url: https://github.com/bobmatnyc/claude-mpm/issues/52
  parent: null
  platform: github
  subtasks: []
parent: null
priority: high
status: completed
tags: []
title: Refactor config.py command to use shared utilities
updated_at: '2025-08-20T16:34:47.610187'
---

# Refactor config.py command to use shared utilities

## Description
Migrate src/claude_mpm/cli/commands/config.py to use the new shared utilities.

## Current State
- 295 lines of code with duplicate patterns
- Manual argument validation
- Inconsistent error handling
- Direct console printing

## Target State
- Use BaseCommand inheritance
- Shared argument parsing patterns
- Standardized error handling
- Consistent output formatting

## Implementation Steps
1. Import shared utilities: BaseCommand, handle_cli_errors, add_common_arguments
2. Create ConfigCommand class inheriting from BaseCommand
3. Replace argument parsing with shared patterns
4. Update error handling to use CLIErrorHandler
5. Implement consistent output formatting
6. Update argument parser setup
7. Test functionality preservation

## Expected Outcome
- ~50% code reduction (295 → ~150 lines)
- Consistent with other refactored commands
- Better error handling and user experience

## Files to Modify
- src/claude_mpm/cli/commands/config.py
- src/claude_mpm/cli/parsers/config_parser.py (if exists)

## Reference
- See refactored_config_example.py for implementation pattern

## Details
- **Status**: completed
- **Priority**: high
- **Assignees**: None
- **Tags**: None
- **Created**: 2025-08-20 09:25:57
- **Updated**: 2025-08-20 16:34:47

## Tasks
- [ ] Add task items here

## Notes
_Add any additional notes or context here._
