Nestie is a beautiful, interactive CLI tool built in Go that makes creating NestJS projects and modules effortless. With its intuitive TUI interface powered by Bubble Tea, Nestie streamlines your NestJS development workflow.
- Interactive Module Creation: Beautiful TUI for selecting and configuring modules
- Smart Module Detection: Automatically scans existing modules in your project
- Proper Entity Generation: Creates entity files with correct
.entity.tsnaming insrc/entities/ - Intelligent Import Consolidation: Consolidates multiple imports from the same module into single statements in ALL files (both within and outside the module folder) - e.g.,
import { A, B, C } from '@/module' - Clean Index Generation: Creates index.ts files excluding test/spec files and module name files to prevent naming conflicts
- Non-Interactive Generation: All components generate without user prompts (resource option removed for reliability)
- Flexible Configuration: Project-level configuration with
.nestie.json - Post-Processing Options: Clean imports, @/ path conversion, and formatter integration
- Multiple Output Modes: Execute commands directly or output for manual execution
- Full-Screen Mode: Immersive full-screen TUI experience
go install github.com/asboy2035/Nestie@latestOr build from source:
git clone https://github.com/asboy2035/Nestie.git
cd nestie
go build -o nestie .- NestJS CLI must be installed globally:
npm install -g @nestjs/cli - Go 1.21 or higher
nestie new my-awesome-projectnestie addnestie add usersWhen you provide a module name, Nestie skips the module selection screen and goes directly to the configuration options.
--config <path>: Specify custom config file path--nestOnly: Output commands without executing them--fullScreen: Run in full-screen mode
Create a .nestie.json file in your project root to customize default settings:
{
"$schema": "https://github.com/asboy2035/Nestie/raw/refs/heads/master/schema.json",
"generation": {
"controller": true,
"service": true,
"entity": false,
"interface": false,
"resource": false,
"middleware": false,
"pipe": false,
"provider": false
},
"process": {
"use@": false,
"cleanImports": false,
"formatter": "prettier"
}
}The JSON schema provides:
- IntelliSense: Auto-completion in VS Code, WebStorm, and other IDEs
- Validation: Real-time validation of your configuration
- Documentation: Hover tooltips with property descriptions
- Type Safety: Prevents configuration errors before runtime
controller: Generate controller (default: true)service: Generate service (default: true)entity: Generate entity class (default: false)interface: Generate interface (default: false)middleware: Generate middleware (default: false)pipe: Generate pipe (default: false)provider: Generate provider (default: false)
use@: Convert imports to use@/path style (default: false)cleanImports: Create index.ts files and clean imports (default: false)formatter: Run formatter after generation (prettier,eslint,oxfmt,oxlint)
Nestie features a beautiful, colorful terminal interface with:
- Module Selection: Choose between creating new modules or adding to existing ones
- Component Configuration: Interactive checkboxes for selecting components
- Confirmation Screen: Review your selections before generation
- Results Display: Clear feedback on generation success or failure
↑/↓orj/k: Navigate optionsSpace: Toggle checkboxesTab: Switch between new/existing modulesEnter: Confirm selectionEsc: Go backq: Quit
nestie/
├── cmd/ # CLI commands
│ ├── root.go # Root command setup
│ ├── new.go # New project command
│ ├── add.go # Add module command
│ └── utils.go # Utility functions
├── internal/
│ ├── config/ # Configuration management
│ ├── generator/ # NestJS command generation
│ ├── scanner/ # Module detection
│ └── tui/ # Terminal UI components
│ ├── app.go # TUI application
│ ├── model.go # Bubble Tea model
│ └── view.go # UI rendering
├── schema.json # JSON schema for .nestie.json
└── main.go # Application entry point
go mod tidy
go build -o nestie .go test ./...Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
- Bubble Tea - Fantastic TUI framework
- Lip Gloss - Beautiful styling
- Cobra - Powerful CLI framework
- NestJS - The amazing framework this tool supports