@trailhead/create-cli
v1.1.0
Published
CLI generator for creating projects with @trailhead/cli
Maintainers
Readme
@trailhead/create-cli
Modern CLI generator built with functional programming principles and the @trailhead/cli framework
Generate well-structured, type-safe CLI applications using the @trailhead/cli framework with Result types, functional patterns, and comprehensive testing utilities.
Installation
# Run directly with npx (no installation required)
npx @trailhead/create-cli my-awesome-cli
# Or install globally
npm install -g @trailhead/create-cli
create-trailhead-cli my-awesome-cliQuick Example
# Generate a new CLI project
npx @trailhead/create-cli my-cli
# With options
npx @trailhead/create-cli my-cli --package-manager pnpm
# See all options
npx @trailhead/create-cli --helpGenerated projects include:
import { createCommand } from '@trailhead/cli'
import { ok } from '@trailhead/core'
const helloCommand = createCommand({
name: 'hello',
description: 'Say hello',
action: async (options, context) => {
context.logger.info('Hello, World!')
return ok(undefined)
},
})Key Features
- CLI Framework foundation - Built on @trailhead/cli for robust command handling
- Functional programming - Pure functions, immutable data, composition patterns
- Template system - Handlebars-based templates with intelligent caching
- Testing ready - Vitest setup with high-ROI test patterns
- Type-safe - Full TypeScript support with Result types
Documentation
- API Documentation - Complete API reference
- Getting Started - Generate your first CLI in 5 minutes
- Customize Templates - Modify or create templates
- Template Architecture - Understanding the design
License
MIT © esteban-url
