Universal config CLI tool for setting up Claude Code repositories
Project description
claudefig
Universal configuration manager for Claude Code projects with preset templates and interactive TUI.
User Configuration Directory:
- Windows:
C:\Users\{username}\.claudefig\ - Linux:
/home/{username}/.claudefig/ - macOS:
/Users/{username}/.claudefig/
Overview
claudefig helps you quickly onboard Claude Code to your repositories with a powerful preset and config CLI/TUI. Instead of manually creating or copying over configuration files for new projects, claudefig lets you use presets and dynamically updated project configs to generate pre-defined coding CLI workflows.
Features
Core Features
- Preset System - Choose from built-in templates or create your own
- Repository Scanning - Create presets from existing Claude Code configurations (
presets create-from-repo) - Interactive TUI - User-friendly terminal interface with preset wizard for managing configurations
- File Instances - Fine-grained control over which files to generate
- Validation - Automatic validation with helpful error/warning messages
- Flexible Configuration - Stored in
claudefig.toml(project) or~/.claudefig/(global home directory)
Interface Options
Both the TUI and CLI provide comprehensive functionality. Some features are interface-specific to leverage each interface's strengths:
- TUI: Interactive component browsing, visual file selection, preset wizard
- CLI: Scriptable commands, preset editing, file sync operations
See FEATURE_PARITY.md for a detailed comparison.
Supported File Types
claudefig can generate and manage these Claude Code configuration files:
- CLAUDE.md (
~/.claudefig/components/claude_md/) - Local Settings (
~/.claudefig/components/settings_json_local/) - Team Settings(
~/.claudefig/components/settings_json/) - Slash Commands (
~/.claudefig/components/commands/) - Sub-Agents (
~/.claudefig/components/agents/) - Hooks (
~/.claudefig/components/hooks/) - Skills (
~/.claudefig/components/skills/) - Output Styles (
~/.claudefig/components/output_styles/) - Status Line (
~/.claudefig/components/statusline/) - MCP Servers (
~/.claudefig/components/mcp/) - Plugins (
~/.claudefig/components/plugins/) - .gitignore (
~/.claudefig/components/gitignore/)
Preset System
Presets are reusable templates that are a saved state of an existing project config setup:
- Built-in Presets - Built in preset(s) that come with claudefig from the presets lib package
- User Presets - Create and store your own custom presets in
~/.claudefig/presets/; Presets Guide for tutorial on how to build properly - Preset Components - Component(s) associated with a preset are stored in presets own components folder
~/.claudefig/presets/{preset_name}/components/; both the TUI and CLI distinguish between global components and preset components via suffixes:(g)represents~/.claudefig/components/and(p)represents~/.claudefig/presets/{preset_name}/components/
File Instance Management
File Instances combine a file type, preset, and target path:
- Create multiple instances of the same file type (e.g., multiple CLAUDE.md files)
- Define instance path(s) if applicable (e.g., CLAUDE.md or .gitignore files)
- Enable/disable instances without deleting them
- Override preset variables per instance
- Full validation with conflict detection
Installation
From PyPI (Recommended)
pip install claudefig
From Source
git clone https://github.com/robmcdonald5/claudefig.git
cd claudefig
pip install -e .
For Development
git clone https://github.com/robmcdonald5/claudefig.git
cd claudefig
pip install -e ".[dev]"
pre-commit install
Quick Start
Option 1: Interactive TUI (Recommended)
Launch the interactive terminal interface:
claudefig
The TUI lets you:
- Browse and apply presets
- Create presets from existing repositories (Preset Wizard with component selection)
- Manage file instances (add, edit, enable/disable)
- Preview configurations before generating
- Navigate with keyboard shortcuts
- Initialize config and presets
Option 2: Quick CLI Init
Apply the default preset and generate files:
claudefig init
This creates a basic Claude Code setup with default configurations
Option 3: Custom CLI Usage
Customized workflows using the CLI:
All claudefig inline features can be used directly by the CLI
User Guides
- Getting Started with Presets - Learn about the preset system
- Customizing Your Configuration - All claudefig config options are defined here
- CLI Reference - Complete CLI reference
Project Documentation
- Installation Guide - Installation instructions
- Quick Start - Get up and running quickly
- Usage Examples - Common workflows and examples
- Architecture Documentation - System architecture and design patterns
- MCP Security Guide - Security best practices for MCP servers
- Contributing Guidelines - How to contribute
- Changelog - Version history
Requirements
- Python 3.10 or higher
- Click >= 8.0
- Rich >= 13.0
Contributing
We welcome contributions! Please see our Contributing Guidelines for details on:
- How to submit bug reports
- Development setup
- Code style guidelines
- Testing requirements
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
Built for use with Claude Code, Anthropic's official CLI for Claude.
Support
- GitHub Issues - Bug reports
- GitHub Discussions - Questions and community support
Changelog
See CHANGELOG.md for a history of changes to this project.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file claudefig-1.0.1.tar.gz.
File metadata
- Download URL: claudefig-1.0.1.tar.gz
- Upload date:
- Size: 246.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fabf808184fbb15548af66e8a958e32a604c292040f9f49f82605f7f3e5ddee8
|
|
| MD5 |
0fc852da97e905fa5e852ac5612c1ba5
|
|
| BLAKE2b-256 |
4aeb6a95f96d659270b8ee0b63595e16f4b73676822329b98467b6cca99c33b1
|
Provenance
The following attestation bundles were made for claudefig-1.0.1.tar.gz:
Publisher:
release.yml on robmcdonald5/claudefig
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claudefig-1.0.1.tar.gz -
Subject digest:
fabf808184fbb15548af66e8a958e32a604c292040f9f49f82605f7f3e5ddee8 - Sigstore transparency entry: 760537431
- Sigstore integration time:
-
Permalink:
robmcdonald5/claudefig@01667537c8cfef97c134f535462d100ad0e39abb -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/robmcdonald5
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@01667537c8cfef97c134f535462d100ad0e39abb -
Trigger Event:
push
-
Statement type:
File details
Details for the file claudefig-1.0.1-py3-none-any.whl.
File metadata
- Download URL: claudefig-1.0.1-py3-none-any.whl
- Upload date:
- Size: 194.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51a3660155c7337d9407a98d74518c224963ce6460d31375b650c17c5c2293a9
|
|
| MD5 |
1c8c3d0223cdc533246dd999362baa11
|
|
| BLAKE2b-256 |
fc453c45bd98898c528e433a1c9f39a244e457ddc13fae1991f7d08ffa6b6b67
|
Provenance
The following attestation bundles were made for claudefig-1.0.1-py3-none-any.whl:
Publisher:
release.yml on robmcdonald5/claudefig
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claudefig-1.0.1-py3-none-any.whl -
Subject digest:
51a3660155c7337d9407a98d74518c224963ce6460d31375b650c17c5c2293a9 - Sigstore transparency entry: 760537433
- Sigstore integration time:
-
Permalink:
robmcdonald5/claudefig@01667537c8cfef97c134f535462d100ad0e39abb -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/robmcdonald5
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@01667537c8cfef97c134f535462d100ad0e39abb -
Trigger Event:
push
-
Statement type: