Interactive CLI to scaffold Modus 2.0 web component applications for React and Angular - templates bundled, works offline
npm install @julianoczkowski/create-trimble-appInteractive CLI to scaffold Modus 2.0 web component applications for React and Angular.
Templates are bundled directly - no external downloads, works fully offline.
> Get Started Now:
>
> ``bash`
> npx @julianoczkowski/create-trimble-app@latest
>
---
- š¦ Bundled Templates - Templates included in package, no network required
- š Secure - No runtime external dependencies
- āļø React - React + Vite + Modus 2.0 Components + Cursor Rules
- š
°ļø Angular - Angular + Modus 2.0 Web Components + Cursor Rules
- šÆ Interactive - Premium CLI experience with Trimble branding
- ā” Fast - Local file copy, instant setup
`bash`
npx @julianoczkowski/create-trimble-app@latest
This will guide you through:
1. Framework selection (React or Angular)
2. Installation location choice
3. Project name input
4. Optional dependency installation
`bashCreate with project name
npx @julianoczkowski/create-trimble-app@latest my-app
CLI Options
| Option | Description |
| ------------------------ | -------------------------------------- |
|
[project-name] | Name of the project to create |
| -f, --framework | Framework to use (react, angular) |
| --current-folder | Install in current folder |
| --dry-run | Preview what would be created |
| --verbose | Enable verbose output for debugging |
| --info | Show information about this CLI |
| --no-install | Skip automatic dependency installation |
| -v, --version | Display version number |
| -h, --help | Display help |Supported Frameworks
| Framework | Description | What's Included |
| -------------- | ------------ | -------------------------------------------------------------------------------------------------------- |
| āļø React | React + Vite | Modus 2.0 Components, TypeScript, Tailwind CSS, 40+ Cursor Rules, GitHub Templates, Code Quality Scripts |
| š
°ļø Angular | Angular 20+ | Modus 2.0 Web Components, TypeScript, Tailwind CSS, 11 Cursor Rules, GitHub Workflows, Demo Components |
What's Included in Each Template
Both templates come fully configured with:
`
your-project/
āāā .cursor/ # Cursor IDE rules for Modus development
ā āāā rules/ # 40+ AI development rules
ā āāā commands/ # AI-powered scaffolding commands
āāā .github/ # Issue templates, PR template, CI workflows
āāā .husky/ # Git hooks (pre-commit)
āāā .vscode/ # VS Code extensions & settings
āāā docs/ # Documentation
āāā scripts/ # Code quality check scripts
āāā src/ # Source code with demo components
āāā package.json # All dependencies configured
āāā README.md # Getting started guide
`$3
Both templates include AI-powered Cursor commands for rapid scaffolding:
| Command | Description |
| -------------------- | ----------------------------------------------------------------- |
|
scaffold-shell-app | Create a complete app shell with navbar, side navigation, routing |To use: Open Cursor IDE, press
Cmd+K (Mac) or Ctrl+K (Windows/Linux), and run the command. The AI will guide you through a conversational setup flow to customize your navigation items.Architecture
`
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā npx create-trimble-app ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā 1. Parse CLI arguments (Commander.js) ā
ā 2. Show branded welcome header (boxen + Trimble Blue) ā
ā 3. Interactive prompts with threaded UI (@clack/prompts) ā
ā 4. Copy bundled template (local file copy) ā
ā 5. Update package.json with project name ā
ā 6. Install dependencies silently (optional) ā
ā 7. Show beginner-friendly success message ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
`For detailed architecture documentation, see docs/architecture.md.
Security
This CLI is designed with security as a priority:
- No External Downloads - Templates are bundled in the npm package
- Works Offline - No network required to create projects
- npm Provenance - Published with provenance attestation
- Minimal Dependencies - Only essential runtime dependencies
Unlike other scaffolding tools that download templates from GitHub at runtime, this CLI bundles templates directly. This eliminates:
- Supply chain attacks from compromised repositories
- Network failures during project creation
- Version drift between CLI and templates
Requirements
- Node.js 18 or higher
- npm, yarn, or pnpm
Development
`bash
Clone this repository
git clone https://github.com/julianoczkowski/create-trimble-app.git
cd create-trimble-appInstall dependencies
npm installRun locally
npm run devRun tests
npm testTest specific commands
node bin/create-trimble-app.js --help
node bin/create-trimble-app.js my-app --framework react --dry-run
`For detailed testing instructions, see docs/local-testing.md.
Documentation
| Document | Description |
| -------------------------------------- | ------------------------------ |
| Architecture | How the CLI works internally |
| Local Testing | How to test during development |
Contributing
1. Fork the repository
2. Create your feature branch (
git checkout -b feature/amazing-feature)
3. Run tests (npm test)
4. Commit your changes (git commit -m 'Add some amazing feature')
5. Push to the branch (git push origin feature/amazing-feature`)MIT Ā© Julian Oczkowski
Report bugs, request features, and discuss ideas:
- Modus Web Components Documentation
- Modus Icons
- Trimble Modus Design System
---
Made with ā¤ļø for the Trimble community