2.2 KiB
2.2 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
Config-Man is a Python CLI tool for managing encrypted static configuration files stored in object storage with Cloudflare CDN distribution. It's primarily used for game application configuration management with support for multi-version management and update strategies.
Code Architecture
Core Components
src/config_man/core/- Core business logic modules:config_manager.py- Handles storage and CDN configuration file operationsdisplay_manager.py- Manages configuration display and comparisonview_command.py- Implements the view command functionalitysuggest_update_command.py- Implements the suggest-update command functionalityforce_update_command.py- Implements the force-update command functionality
CLI Layer
src/config_man/cli/main.py- Main CLI entry point using Click framework- Commands: view, suggest-update, force-update, show-config, setup-cloudflare, set-config
Utilities
src/config_man/utils/- Utility modules for crypto, config management, and mock functionality
Common Development Commands
Installation and Setup
# Install dependencies
pip install -r requirements.txt
# Install in development mode
pip install -e .
# Install with development dependencies
pip install -e ".[dev]"
Running the CLI
# Run the CLI tool
python main.py --help
# Or if installed
config-man --help
Testing
# Run all tests
pytest
# Run tests with coverage
pytest --cov=src/config_man
# Run tests with coverage report
pytest --cov=src/config_man --cov-report=html
Code Quality
# Format code with black
black .
# Lint with flake8
flake8 .
# Type checking with mypy
mypy src/
Configuration
- Uses
config-man.jsonfor runtime configuration - Supports environment variables for Cloudflare CDN settings
- Configuration can be modified with
config-man set-configcommand
Key Dependencies
- click>=8.0.0 - CLI framework
- pycryptodome>=3.19.0 - Encryption/decryption
- tabulate>=0.9.0 - Table formatting
- requests>=2.31.0 - HTTP requests
- rich>=13.0.0 - Rich text formatting
- rclone - Required for storage operations