Configuration

Project files and environment variables used by Miblo and your generated Rust API.

On this page

Important files

FilePurpose
miblo.yamlVersion 1 project, model, field and route definition.
.miblo/state.jsonPinned packs, fingerprints and merge baselines.
.miblo/backups/Source backups created during model changes.
.envPrivate runtime configuration.
.env.exampleShareable example.
migrations/Versioned SQL history.
Cargo.lockDependency versions.

Commit source, migrations, miblo.yaml and .miblo/state.json. Private .env files are hidden in the explorer; .env.example remains visible.

Environment variables

VariablePurpose
DATABASE_URLAPI connection; database-command fallback when absent from .env.
SERVER_ADDRESS / SERVER_PORTServer listener; refresh after changes.
MIBLO_TEMPLATE_DIRLocal development pack.
MIBLO_TEMPLATE_BASE_URLTemplate distribution server.
MIBLO_CACHE_DIRTemplate cache.
MIBLO_LANGUAGEen or fr: language override at startup.
MIBLO_CONFIG_DIRUser preferences directory.
VISUAL / EDITOREditor and arguments.
MIBLO_NO_ANIMATIONDisables startup animation when set.

For the address monitored by the workspace, environment values take priority over .env and project defaults. Wildcard bind addresses are checked through loopback. Avoid conflicting values.

User preferences

The language choice is saved in settings.json, outside your API projects:

  • macOS: ~/Library/Application Support/miblo/settings.json
  • Linux: $XDG_CONFIG_HOME/miblo/settings.json, or ~/.config/miblo/settings.json
  • Windows: %APPDATA%\miblo\settings.json

XDG_CONFIG_HOME also takes precedence on macOS. MIBLO_CONFIG_DIR overrides this directory on all platforms.

At startup, MIBLO_LANGUAGE=en or MIBLO_LANGUAGE=fr overrides the saved preference. Without either, Miblo uses English. You can still switch from the menu during the session.

If saving fails, Miblo reports it and applies the choice for the current session. An invalid preferences file does not prevent startup and is not overwritten.

Create from a definition

A YAML file can describe a new project:

miblo.yaml
schema_version: 1
name: team-api
stack: rust-axum-sqlite
port: 3000
resources:
  - name: User
    path: /users
    fields:
      - name: name
        type: string
shell
miblo new --config path/to/miblo.yaml --yes

The destination directory must not exist. Editing this file in an existing project does not migrate its database: use miblo edit to add fields.

Project versions

FormatVersion
miblo.yaml definitionschema_version: 1
Current templatesPack 0.6.0, format 3
Template formats read by the CLI1, 2 and 3

A project can contain models from different packs. Legacy config.yaml files are not converted automatically. Engine changes, renames and removals require manual migrations.

Search for a feature or command.

↑ ↓ browse Enter to open