cli-configuration-management

Manage CLI configuration files with TOML, Zod, and OS keyring integration.

6|1|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/RepairYourTech/cfsa-antigravity --skill cli-configuration-management
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli-configuration-management
Source: https://github.com/RepairYourTech/cfsa-antigravity/tree/main/.agent/skill-library/surface/cli/cli-configuration-management
Command: npx skills add https://github.com/RepairYourTech/cfsa-antigravity --skill cli-configuration-management

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @iarna/toml, zod, keytar, inquirer, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a comprehensive framework for managing configuration files in command-line interface (CLI) tools, ensuring consistency, security, and user-friendliness.

Core Features & Use Cases

  • Config File Formats: Supports TOML, YAML, JSON, JSON5/JSONC, and INI with recommendations.
  • XDG Base Directory Spec: Adheres to standard locations for config, data, and cache files.
  • Config Precedence: Defines a clear hierarchy for merging settings (env vars > flags > project > user > defaults).
  • Secret Handling: Guides against storing secrets in config files, recommending OS keyring or environment variables.
  • Validation & Migration: Integrates Zod for schema validation and versioned migration strategies.
  • CLI Subcommands: Outlines patterns for init, config set, config get, and config list.
  • Use Case: When developing a new CLI tool, use this Skill's patterns to implement a flexible and secure configuration system that respects user preferences and environment variables.

Quick Start

Implement CLI configuration management by following the XDG Base Directory spec and defining a clear precedence order for settings.

Frequently Asked Questions about cli-configuration-management

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage CLI configuration files using the XDG Base Directory specification?

CLI configuration management involves structuring settings according to the XDG Base Directory spec, placing config, data, and cache files in standard OS locations to ensure user preferences are respected and organized.

What is the best way to handle secrets in command-line tool configurations?

Secret handling in CLI configurations should avoid storing sensitive data in plain config files, instead utilizing OS keyring integration via keytar or environment variables for secure access and management.

How do I validate TOML configurations and manage schema migrations for CLI tools?

Validating TOML configurations uses Zod schema validation to enforce structure, while versioned migration strategies systematically update older configuration formats to the current schema during CLI execution.

How do I set configuration precedence for environment variables, flags, and project settings in a CLI?

Configuration precedence in CLI tools defines a clear hierarchy for merging settings, typically prioritizing environment variables, then command-line flags, project files, user files, and finally default values.

Does this CLI configuration approach support formats other than TOML?

Yes, CLI configuration management supports multiple file formats including TOML, YAML, JSON, JSON5/JSONC, and INI, providing recommendations and implementation patterns for each to suit different project requirements.

Why should I not store secrets directly in my CLI tool's config file?

Storing secrets in CLI config files exposes sensitive data to unauthorized access, which is why utilizing OS keyring integration or environment variables is recommended for secure secret handling.