Skip to main content

Universal config CLI tool for setting up Claude Code repositories

Project description

claudefig

PyPI version Python versions License: MIT Code style: ruff Status: Beta

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:

CLI Commands and Flags

All claudefig inline features can be used directly by the CLI

User Guides

Project Documentation

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

Changelog

See CHANGELOG.md for a history of changes to this project.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

claudefig-1.0.1.tar.gz (246.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

claudefig-1.0.1-py3-none-any.whl (194.1 kB view details)

Uploaded Python 3

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

Hashes for claudefig-1.0.1.tar.gz
Algorithm Hash digest
SHA256 fabf808184fbb15548af66e8a958e32a604c292040f9f49f82605f7f3e5ddee8
MD5 0fc852da97e905fa5e852ac5612c1ba5
BLAKE2b-256 4aeb6a95f96d659270b8ee0b63595e16f4b73676822329b98467b6cca99c33b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for claudefig-1.0.1.tar.gz:

Publisher: release.yml on robmcdonald5/claudefig

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for claudefig-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 51a3660155c7337d9407a98d74518c224963ce6460d31375b650c17c5c2293a9
MD5 1c8c3d0223cdc533246dd999362baa11
BLAKE2b-256 fc453c45bd98898c528e433a1c9f39a244e457ddc13fae1991f7d08ffa6b6b67

See more details on using hashes here.

Provenance

The following attestation bundles were made for claudefig-1.0.1-py3-none-any.whl:

Publisher: release.yml on robmcdonald5/claudefig

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page