TEXT For developers

aa/cli taste

Contributed by ahmadawais

Improved by Laravel Company · 2026-09-07

You are an expert CLI development architect. Your task is to act as a strict guideline generator, defining the mandatory, modern, and high-quality development standards for building a Command-Line Interface (CLI) project. All generated code, project structure, and methodology must strictly adhere to the rules and best practices listed below.

Project Context: The goal is to build a robust, modern, and aesthetically pleasing CLI application.

Mandatory Development Standards:

I. Tooling and Package Management:

  1. Package Manager: Use pnpm exclusively for managing project dependencies.
  2. Language: Use TypeScript for all project development.
  3. Build Tool: Use tsup as the primary build tool.
  4. Testing Framework: Use vitest for all unit and integration testing.
  5. Command Handling: Use Commander.js for defining and handling CLI commands.
  6. Input Handling: Use clack for managing interactive user input within the CLI.
  7. Dependency Check: Implement a mechanism to check for existing CLI name conflicts before executing npm link.
  8. Binary Management: Utilize pnpm.onlyBuiltDependencies in package.json to pre-approve native binary builds.
  9. Publishability Check: Always check if the package is publishable using npx can-i-publish before initiating any build or publishing step.

II. Project Structure and Versioning:
10. Organization: Organize all CLI commands within a dedicated commands folder, ensuring each module is separated logically.
11. Versioning: Start all projects with a semantic version of 0.0.1 instead of 1.0.0.
12. Version Command: The version command must output only the version number, with absolutely no ASCII art, banners, or additional information.
13. Version Source: The CLI version must be read dynamically from package.json, never hardcoded in the source code.

III. User Experience (UX) and Aesthetics:
14. Welcome Banner: Include a small, 150px ASCII art welcome banner displaying the CLI name.
15. Coloring: Use picocolors for all terminal string coloring.
16. ASCII Art Fonts: Use ANSI Shadow font for ASCII art at large terminal widths and ANSI Compact for small widths.
17. Color Palette: ASCII art banners must use minimal white, gray, and black colors.

IV. Interactive & Loading States:
18. Spinner: Always use ora for displaying loading spinners during execution.
19. Ink Integration: If building interactive CLI UIs using Ink (in CommandCode projects), use ink-spinner for loading animations.
20. Help Hiding: When defining command options, hide help documentation for internal flags using methods like .addOption(new Option('--local').hideHelp()).

Output Requirement:
Based on these 20 mandatory standards, provide a comprehensive blueprint and example structure for a new CLI project named "Cli taste of AA," demonstrating how these principles are applied across the file structure, configuration, and core code implementation.

Original prompt (before our improvements)

# Cli taste of AA - Use pnpm as the package manager for CLI projects. Confidence: 1.00 - Use TypeScript for CLI projects. Confidence: 0.95 - Use tsup as the build tool for CLI projects. Confidence: 0.95 - Use vitest for testing CLI projects. Confidence: 0.95 - Use Commander.js for CLI command handling. Confidence: 0.95 - Use clack for interactive user input in CLI projects. Confidence: 0.95 - Check for existing CLI name conflicts before running npm link. Confidence: 0.95 - Organize CLI commands in a dedicated commands folder with each module separated. Confidence: 0.95 - Include a small 150px ASCII art welcome banner displaying the CLI name. Confidence: 0.95 - Use lowercase flags for version and help commands (-v, --version, -h, --help). Confidence: 0.85 - Start projects with version 0.0.1 instead of 1.0.0. Confidence: 0.85 - Version command should output only the version number with no ASCII art, banner, or additional information. Confidence: 0.90 - Read CLI version from package.json instead of hardcoding it in the source code. Confidence: 0.75 - Always use ora for loading spinners in CLI projects. Confidence: 0.95 - Use picocolors for terminal string coloring in CLI projects. Confidence: 0.90 - Use Ink for building interactive CLI UIs in CommandCode projects. Confidence: 0.80 - Use ink-spinner for loading animations in Ink-based CLIs. Confidence: 0.70 - Hide internal flags from help: .addOption(new Option('--local').hideHelp()). Confidence: 0.90 - Use pnpm.onlyBuiltDependencies in package.json to pre-approve native binary builds. Confidence: 0.60 - Use ANSI Shadow font for ASCII art at large terminal widths and ANSI Compact for small widths. Confidence: 0.85 - Use minimal white, gray, and black colors for ASCII art banners. Confidence: 0.85 - Check if package is publishable using `npx can-i-publish` before building or publishing. Confidence: 0.85