Templates and offline mode

Download versioned Miblo templates, verify their checksums and reuse them offline.

▶ Watch the demo
On this page

Available packs

New projects use format 3 and template packs 0.6.0. The CLI also reads formats 1 and 2.

Each archive has a .sha256 sidecar. Projects pin the version, URL, digest and fingerprint. Templates are downloaded separately, not embedded in the binary.

Use the cache

shell
miblo add Note body:text --yes --offline

Offline mode requires previously downloaded templates. --cache-dir or MIBLO_CACHE_DIR selects the cache directory; otherwise XDG_CACHE_HOME, LOCALAPPDATA or ~/.cache/miblo is used.

The template cache is separate from Cargo’s cache. Offline compilation also requires the Rust dependencies.

Update templates

Press u, choose GitHub Releases, a local directory or a URL, then confirm Update (update).

shell
miblo template update --project team-api

The new pack is used for future models and routes. Existing models retain their pinned templates, source files and migrations.

Host or develop a pack

shell
miblo new team-api --database sqlite \
  --template-base-url https://templates.example.com --yes

miblo new team-api --database sqlite \
  --template-url https://templates.example.com/custom/api.tar.gz \
  --template-version 0.6.0 --yes
shell
miblo new team-api --database sqlite \
  --template-dir ../miblo_templates/rust_sqlite_template_v4 --yes

Replace example URLs with your server. A base URL is followed by /v0.6.0/<stack>.tar.gz. --sha256 HEX supplies a known digest. HTTPS is required except for loopback testing.

A local pack contains manifest.json and Handlebars files. Keep it available and unchanged. Releases avoid maintaining a local template directory.

Download verification

Miblo verifies SHA-256 and rejects corrupt archives, links, unexpected files and paths escaping the extraction directory. A new version requires a new archive.

A checksum verifies downloaded content; it is not a publisher signature.

Search for a feature or command.

↑ ↓ browse Enter to open