CLI
The Fubam CLI provides a simple command-line interface for managing projects, building templates, and running development environments.
It is designed to keep workflows minimal, fast, and fully aligned with Fubam’s lightweight philosophy.
The CLI helps automate common tasks such as project initialization, rendering templates, and exporting optimized output.
1. Installation
If Fubam is installed via pip, the CLI becomes available automatically:
pip install fubamVerify installation:
fubam --versionIf installed correctly, the current version will be displayed.
2. Initialize a Project
Create a new Fubam project:
fubam init my-projectThis generates a recommended project structure:
my-project/
├── Templates/
│ ├── layouts/
│ ├── components/
│ └── pages/
├── static/
└── fubam.config.pyTemplates/contains.pmxfilesstatic/stores assets (CSS, JS, images)fubam.config.pyholds project configuration
3. Run Development Server
Start the development environment:
fubam serve- Launches a local development server
- Automatically renders templates
- Enables rapid prototyping
- Designed for small-scale development and testing
By default, the server runs at:
http://localhost:80004. Build / Export Project
To generate optimized static output:
fubam buildThis will:
- Render all templates
- Apply optimization steps
- Inject SEO enhancements
- Minify assets (if enabled)
- Export final HTML files
The output is typically generated in:
dist/5. Configuration Options
You can customize CLI behavior inside fubam.config.py.
Example configuration:
DEBUG = True
MINIFY = True
INLINE_ASSETS = False
OUTPUT_DIR = "dist"Configuration allows control over:
- Debug mode
- Optimization pipeline
- Asset handling
- Export directory
6. Common Commands
fubam init <project-name> # Create new project
fubam serve # Start development server
fubam build # Export optimized output
fubam --version # Show current version
fubam help # Display available commands7. Best Practices
- Use
serveduring development - Use
buildfor production export - Keep configuration minimal
- Organize templates clearly before building
- Enable optimization flags for production
Summary
- The Fubam CLI simplifies project management
- Supports initialization, development, and export
- Aligns with Fubam’s lightweight philosophy
- Automates rendering and optimization workflows