A modern, unified CLI tool for Base Stack development. Generate backend modules (Go) and frontend modules (Nuxt/TypeScript) with a single tool, powered by Mamba.
- Unified Interface: Single CLI for both backend and frontend generation
- Backend Generation: Go modules with models, services, controllers, and validators
- Frontend Generation: Nuxt modules with TypeScript types, Pinia stores, Vue components, and pages
- Modern UX: Powered by Mamba for enhanced terminal features (colors, spinners, progress bars)
- Smart Conventions: Automatically infers field types and relationships
Before installing Bui, ensure you have:
- Go 1.21+ - Install Go
- Image Processing Libraries (required for media handling):
- macOS:
brew install webp libheif - Ubuntu/Debian:
sudo apt install libwebp-dev libheif-dev
- macOS:
- PostgreSQL (or another database)
- Node.js 18+ - Install Node.js
- Bun (recommended) - Fast JavaScript runtime:
- macOS/Linux:
curl -fsSL https://bun.sh/install | bash - Windows:
powershell -c "irm bun.sh/install.ps1 | iex" - Verify:
bun --version
- macOS/Linux:
curl -fsSL https://raw.githubusercontent.com/base-al/bui/refs/heads/main/install.sh | bashInstallation modes:
- Non-interactive (piped): Installs to
~/.base/bin(requires adding to PATH) - Interactive (download & run): Choose local or global (
/usr/local/binwith sudo)
Alternative - Install via Go:
go install github.com/base-al/bui@latestDownload pre-built binaries from GitHub Releases for your platform:
- macOS (darwin_amd64, darwin_arm64)
- Linux (linux_amd64, linux_arm64)
- Windows (windows_amd64, windows_arm64)
# Generate a backend module with API endpoints
bui generate backend product name:string price:float stock:int description:text
# Short aliases
bui g be product name:string price:float
bui g api product name:string price:floatGenerates:
app/models/product.go- GORM modelapp/products/service.go- Business logicapp/products/controller.go- HTTP handlersapp/products/module.go- Module registrationapp/products/validator.go- Input validation
# Generate a frontend module with UI
bui generate frontend product name:string price:float stock:int description:text
# Short aliases
bui g fe product name:string price:float
bui g ui product name:string price:floatGenerates:
admin/app/modules/products/types/product.ts- TypeScript interfacesadmin/app/modules/products/stores/products.ts- Pinia store with CRUDadmin/app/modules/products/components/ProductTable.vue- Data tableadmin/app/modules/products/components/ProductFormModal.vue- Form modaladmin/app/modules/products/utils/formatters.ts- Formatting utilitiesadmin/app/pages/app/products/index.vue- List pageadmin/app/pages/app/products/[id].vue- Detail page
string- Text fieldtext- Textarea fieldint,uint- Integer numbersfloat,float32,float64- Decimal numbersbool- Boolean/checkbox
The CLI intelligently detects field purposes by name:
email- Email inputpassword- Password inputurl,link- URL inputdescription,content,bio- Textareastatus,category,type- Select dropdown
Bui uses base framework for api, check base.al/docs
# Show version
bui version
# Start the application (backend)
bui startBui uses Mamba, a modern drop-in replacement for Cobra with:
- 100% Cobra API compatibility
- Enhanced terminal UX (colors, spinners, progress bars)
- Built on Charm libraries
- No breaking changes when migrating
bui/
├── commands/ # CLI commands
│ ├── backend/ # Backend generation
│ ├── frontend/ # Frontend generation
│ ├── generate.go # Generate command router
│ ├── root.go # Root command
│ ├── start.go # Start command
│ └── version.go # Version command
├── utils/ # Utilities and templates
├── version/ # Version management
├── go.mod
├── main.go
└── README.md
# Install dependencies
go mod tidy
# Build
go build -o bui
# Run
./bui --helpCurrent version: 0.1.0
MIT