Skip to content

Commit

Permalink
Merge pull request #4 from wesen/task/add-config-edit-helpers
Browse files Browse the repository at this point in the history
Add command-line configuration management tools
  • Loading branch information
wesen authored Feb 11, 2025
2 parents 7a7582a + 9a60ef1 commit 241832e
Show file tree
Hide file tree
Showing 11 changed files with 839 additions and 18 deletions.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,39 @@ go-go-mcp can be configured using YAML configuration files that allow you to:
- Control access through blacklists/whitelists
- Manage security through parameter filtering

### Command-Line Configuration Management

The `config` command group provides tools to manage your configuration:

```bash
# Create a new configuration file
go-go-mcp config init

# Edit configuration in your default editor
go-go-mcp config edit

# List available profiles
go-go-mcp config list-profiles

# Show details of a specific profile
go-go-mcp config show-profile default

# Add a tool directory to a profile
go-go-mcp config add-tool default --dir ./tools/system

# Add a specific tool file to a profile
go-go-mcp config add-tool default --file ./tools/special-tool.yaml

# Create a new profile
go-go-mcp config add-profile production "Production environment configuration"

# Duplicate an existing profile
go-go-mcp config duplicate-profile development staging "Staging environment configuration"

# Set the default profile
go-go-mcp config set-default-profile production
```

For detailed configuration documentation, use:
```bash
# View configuration file documentation
Expand Down
44 changes: 43 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -894,4 +894,46 @@ Enhanced the example commands documentation:

Fixed linter error in randomInt function by renaming variables to avoid conflict with predeclared identifiers.

- Renamed min to minVal and max to maxVal in randomInt function
- Renamed min to minVal and max to maxVal in randomInt function

# Configuration Management Commands

Added a new `config` command group to manage go-go-mcp configuration files and profiles:
- `init`: Create a new minimal configuration file
- `edit`: Edit configuration in default editor
- `list-profiles`: List all available profiles
- `show-profile`: Show full configuration of a profile
- `add-tool`: Add tool directory or file to a profile
- `add-profile`: Create a new profile
- `duplicate-profile`: Create a new profile by duplicating an existing one

# YAML Editor and Config Management

Added a new YAML editor package in clay for manipulating YAML files while preserving comments and structure:
- Added YAMLEditor type with methods for manipulating YAML nodes
- Added helper functions for creating and manipulating YAML nodes
- Added support for preserving comments and formatting
- Added deep copy functionality for YAML nodes

Updated the config commands to use the new YAML editor:
- Added ConfigEditor type for managing go-go-mcp configuration
- Updated all config commands to use the new editor
- Added set-default-profile command
- Improved error handling and validation

# Profiles Path Helper

Added a helper package for managing profiles configuration paths:
- Added GetDefaultProfilesPath to get the default XDG config path
- Added GetProfilesPath to handle both default and custom paths
- Updated all config commands to use the new helpers
- Updated start command to use the new helpers

# Update Configuration Documentation with CLI Tools

Updated the configuration documentation to include the command-line configuration management tools:

- Added config command examples to README.md
- Updated configuration file tutorial with CLI tool usage
- Added CLI-based configuration workflow to MCP in Practice guide
- Improved documentation organization and clarity
Loading

0 comments on commit 241832e

Please sign in to comment.