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 1,160 stars 71 forks Updated today MIT

Install

View on GitHub

Quality Score: 96/100

Stars 20%
100
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

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

cobra-viper

Expert skill for building CLI applications with Cobra and Viper, authored by spf13 — the original creator of both libraries. Covers command-first architecture, decoupled business logic, configuration management, environment variable binding, context-aware commands, and in-memory CLI testing. Use when building or reviewing any Go CLI application that uses Cobra and/or Viper.

1 Updated today
chafingdishposition355
AI & Automation Solid

golang-cli

Golang CLI application development. Use when building, modifying, or reviewing a Go CLI tool — especially for command structure, flag handling, configuration layering, version embedding, exit codes, I/O patterns, signal handling, shell completion, argument validation, and CLI unit testing. Also triggers when code uses cobra, viper, or urfave/cli.

1,904 Updated 3 days ago
samber
AI & Automation Listed

golang-cli

Golang CLI application development. Use when building, modifying, or reviewing a Go CLI tool — especially for command structure, flag handling, configuration layering, version embedding, exit codes, I/O patterns, signal handling, shell completion, argument validation, and CLI unit testing. Also triggers when code uses cobra, viper, or urfave/cli.

0 Updated today
guynhsichngeodiec
AI & Automation Solid

viper-go-setup

Set up Viper for Go configuration management with file, env, and flag binding.

1,160 Updated today
a5c-ai
AI & Automation Solid

argparse-scaffolder

Generate argparse-based Python CLI applications with subparsers, type converters, and standard library patterns. Creates lightweight Python CLIs without external dependencies.

1,160 Updated today
a5c-ai