Minimaz Logo

Minimaz CLI

Minimal input. Clean output

Version: v0.5.1

About

Minimaz is a minimal, low-dependency static site builder and project initializer focused on speed, simplicity, and clean output. It supports HTML, CSS, JavaScript, and TypeScript (.ts → .js), with optional bundling and minification.

Designed for small static sites, utility tools, prototypes, and teams that want reproducible minimal build systems.

Features

Initialize projects from templates
Save, list, delete, and update global templates
Minify HTML, CSS, JS, and compiled TS
Optional CSS and JS bundling
Include external styles/scripts (relative, absolute, node_modules)
Configurable via minimaz.config.json
Path replacement support for asset links
Optional npm initialization
Optional Git repository initialization
Git provider / remote URL support
Interactive prompts with 60s timeout
Alias support: minimaz or mz
Lightweight and fast

Installation

Run directly using npx or as a global module:

npx minimaz init my-site
cd my-site
npx minimaz build

Global installation:

npm install -g minimaz-cli
minimaz init my-site
During npm install, a post-install script runs to finalize setup automatically.

Project Structure

my-site/
├── dist/              # Output folder (generated)
├── public/            # Static assets
├── src/               # HTML, CSS, JS, TS files
├── minimaz.config.json
├── package.json       # Optional (if npm init used)
├── .gitignore
└── ...

Configuration

{
    "input": {
        "dir": "./src",
        "mapping": {
            "pages": "",
            "public": ""
        },
        "externals": {
            "node_modules/bootstrap-icons/font/fonts": "public/fonts"
        },
        "exclude": []
    },
    "output": {
        "dir": "./dist",
        "replace": {
            "/": "/public/"
        },
        "css": {
            "bundling": true,
            "minify": true
        },
        "js": {
            "bundling": true,
            "minify": true
        },
        "html": {
            "minify": true
        }
    }
}

Commands

Build & Maintenance

# Build and minify the project
minimaz build (mz b)

# Delete the dist folder
minimaz clear (mz c)

# Validate HTML, CSS, JS, TS, and JSON files
minimaz validate --path=/path/to/file

Project Initialization

# Initialize a new project
minimaz init <project-name> [options] (mz i)

Options:
  -t, --template <name>    # Use specific template (default: 'default')
  --npm                    # Init npm (creates package.json & runs install)
  --git                    # Initialize git repository
  --gitprovider <provider> # 'github', 'gitlab', or existing repo URL
  --gitremote <url>        # Specify custom remote URL

Template Management

Global templates are stored in ~/.minimaz/templates

# Save current folder as a new template
minimaz template [folder-path] (mz t)

# List all global templates
minimaz template --list (-l)

# Delete a template (asks for confirmation)
minimaz template --delete <name> (-d)

# Update templates from current folder or defaults
minimaz template --update [name] (-u)

System & Help

# Setup or overwrite global settings
minimaz config (mz config --overwrite)

# Show help for a specific command
minimaz help <command> (mz h build)

# Show Minimaz CLI version
minimaz version (mz v)

Upcoming & Future Features

Planned improvements and roadmap direction. Scope is intentionally controlled to preserve simplicity.

@minimaz Package Distribution

Planned

Publish Minimaz as an installable scoped package.

npm install -g @minimaz/cli

Template Git Integration

Planned

Pull project templates directly from remote Git repositories.

minimaz template <repo-url>

minimaz convert

Planned

Convert and optimize assets (e.g. JPEG → WebP).

minimaz convert input.jpg --to webp

minimaz analyze

Planned

Static analysis to detect build errors, broken links, duplicate IDs, and missing assets.

minimaz analyze

minimaz optimize

Research

Extended optimization pipeline (HTML, CSS, JS, images). Scope under evaluation.

minimaz blocks

Planned

Inject reusable HTML blocks into files.

<block src="header.html"></block>

minimaz translate

Concept

Internationalization or content conversion system. Direction to be defined.

SCSS / Extended CSS Support

Planned

Optional support for SCSS and other preprocessors.

Global Folder

~/.minimaz/templates

Use templates to quickly initialize consistent projects across environments.