cobra-scaffolder

Solid

Generate Cobra/Viper-based Go CLI applications with persistent flags, subcommands, and configuration management. Creates production-ready Go CLI with modern patterns.

AI & Automation 814 stars 53 forks Updated today MIT

Install

View on GitHub

Quality Score: 95/100

Stars 20%
97
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Cobra Scaffolder Generate a complete Cobra CLI application with Viper configuration, proper Go module structure, and best practices. ## Capabilities - Generate Go-based Cobra CLI projects - Create command hierarchy with persistent and local flags - Integrate Viper for configuration management - Set up automatic environment variable binding - Implement shell completion generation - Configure go.mod and build workflows ## Usage Invoke this skill when you need to: - Bootstrap a new CLI application using Cobra - Create a Go CLI with hierarchical commands - Integrate Viper for multi-source configuration - Build cross-platform native binaries ## Inputs | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | projectName | string | Yes | Name of the CLI project (kebab-case) | | modulePath | string | Yes | Go module path (e.g., github.com/user/project) | | description | string | Yes | Short description of the CLI | | commands | array | No | List of commands to scaffold | | useViper | boolean | No | Integrate Viper config (default: true) | | useCobra | boolean | No | Use cobra-cli generator patterns (default: true) | ### Command Structure ```json { "commands": [ { "name": "serve", "description": "Start the server", "persistentFlags": [ { "name": "config", "shorthand": "c", "type": "string", "usage": "config file path" } ], "flags": [ { "name": "port", "shorthand": "p", "type": "int", "d...

Details

Author
a5c-ai
Repository
a5c-ai/babysitter
Created
4 months ago
Last Updated
today
Language
JavaScript
License
MIT

Related Skills