@igniter-js/cli v0.1.11
Igniter CLI
Code generation CLI for Igniter.js projects - the essential tool to boost productivity with Igniter Framework.
Why Igniter CLI?
- Feature-First Architecture: Generate complete features with best practices and proper structure
- Type Safety: All generated code is fully typed with TypeScript
- Best Practices: Follows modern development patterns and industry standards
- Framework Integration: Seamlessly integrates with Next.js and the Igniter Framework
- Developer Experience: Intuitive commands and helpful error messages
- Productivity Boost: Automates repetitive tasks and enforces consistency
- Cross-Platform: Works seamlessly on Windows, macOS, and Linux
š¦ Installation
# Global installation (recommended)
npm install -g @igniter-js/cli
# Or using npx for one-time execution
npx @igniter-js/cliš Quick Start
# Initialize a new project with Igniter Framework in the current directory
igniter init
# Initialize a new project in a specific directory
igniter init -d my-igniter-app
# Generate a new feature
igniter generate feature -n users
# Generate features from Prisma models
igniter generate featureš ļø Available Commands
init
Initializes a new Next.js project with the complete Igniter Framework structure:
# Initialize in the current directory
igniter init
# Initialize in a specific directory (creates the directory if it doesn't exist)
igniter init -d my-igniter-appOptions:
-d, --dir <directory>: Directory to initialize the project in
This command:
- Creates a Next.js application with TypeScript, Tailwind, and ESLint
- Sets up the recommended folder structure for Igniter Framework
- Initializes Prisma ORM
- Configures testing environment with Vitest
- Installs and configures Shadcn/UI
- Creates necessary Igniter Framework files
- Sets up Docker for development
analyze
Analyzes the current project:
igniter analyzeThis command checks your project's structure and configuration, providing insights and optimization suggestions.
generate feature (alias: g)
Generates a complete feature:
# Generate a specific feature
igniter generate feature -n users
# Generate a feature with specific fields
igniter generate feature -n products -f name:string price:number
# Generate multiple features from Prisma models
igniter generate featureThis command:
- Creates the feature folder structure
- Generates base files (controller, procedures, interfaces)
- Configures the feature based on Prisma model if available
šļø Generated Project Structure
src/
āāā app/ # Application routes
āāā configs/ # Global configurations
āāā core/
ā āāā design-system/ # Shadcn/UI components
ā āāā utils/ # Utility functions
ā āāā providers/ # Contexts and providers
ā āāā factories/ # Base classes
āāā igniter.ts # Core initialization
āāā igniter.client.ts # Client implementation
āāā igniter.context.ts # Context management
āāā igniter.router.ts # Router configuration
āāā features/ # Application features
ā āāā [feature]/
ā āāā presentation/ # Feature presentation layer
ā ā āāā components/ # Feature-specific components
ā ā āāā hooks/ # Custom hooks
ā ā āāā contexts/ # Feature contexts
ā ā āāā utils/ # Utility functions
ā āāā controllers/ # Feature controllers
ā ā āāā [feature].controller.ts
ā āāā procedures/ # Feature procedures/middleware
ā ā āāā [feature].procedure.ts
ā āāā [feature].interfaces.ts # Type definitions
ā āāā index.ts # Feature exportsš Platform Compatibility
Igniter CLI is designed to work seamlessly across different platforms:
- Windows: Full compatibility with Windows command prompt and PowerShell
- macOS/Linux: Native support for Unix-based terminals
- Path handling: Automatic path normalization across different operating systems
- Terminal output: Adaptive terminal styling based on platform capabilities
The CLI automatically detects your operating system and adjusts its behavior accordingly to ensure a consistent experience.
š§ Advanced Configuration
The Igniter CLI can be configured through environment variables:
# Example of advanced configuration
IGNITER_TEMPLATE_DIR=/path/to/templates igniter generate feature -n customš Complete Documentation
For complete Igniter Framework documentation, visit our official documentation.
š¤ Contributing
Contributions are welcome! Please read our contribution guide to learn how to participate.
š License
This project is licensed under the MIT License.