CLI command reference

Miblo commands and options for project creation, models, routes, databases and templates.

On this page

Help and main commands

shell
miblo --help
miblo --version
miblo new --help
miblo route add --help
CommandPurpose
mibloOpen the workspace in an interactive terminal.
miblo ui --project PATHOpen a project.
miblo new [NAME]Create an API.
miblo add [NAME] [FIELD]...Add a model.
miblo edit NAME [FIELD]...Add optional fields.
miblo route add NAME --path PATHCreate a route.
miblo run --project PATHRun cargo run.
miblo doctor --project PATHCheck metadata, registries and prerequisites.
miblo db ACTION --project PATHcheck, init, migrate or schema.
miblo template updateUpdate templates for future additions.

Create: miblo new

shell
miblo new shop-api --database sqlite --port 3000 \
  --resource Product --field title:string --field price:float --yes
OptionPurpose
--output PATHDestination; an existing directory is refused.
--database sqlite|mysqlSQLite by default interactively; MySQL with --yes and no explicit engine.
--port PORTDefault: 3000.
--resource NAME / --field FIELDInitial model and repeated fields.
--config PATHVersion 1 YAML definition.
--template-dir PATHLocal pack; incompatible with direct URL/digest options.
--template-url URLDirect archive URL.
--template-base-url URLDistribution server.
--template-version VERSIONPack version.
--sha256 HEXKnown digest without fetching a sidecar.
--yes / --dry-runAccept choices / preview without writing the project.
--offline / --cache-dir PATHTemplate cache options.

Add and update models

shell
miblo add User name:string email:string:unique --yes
miblo edit User 'nickname:string?' --yes

Supply fields positionally or with repeated --field options, never both. The legacy miblo add resource User --field name:string --yes syntax is still accepted.

Shared options: --project, --yes, --dry-run, --offline, --cache-dir. add also accepts --path. edit requires optional fields and an existing model.

Create a route

shell
miblo route add create_member --resource User --action create --path /members --yes
miblo route add activate --method POST --path '/users/{id}/activate' --resource User --json-body --yes

--action list|get|create|update|delete requires --resource and determines the method. Without an action, --method and --json-body describe a custom stub. Other options: --project, --yes, --dry-run, --offline, --cache-dir.

Update templates

shell
miblo template update --project team-api --dry-run
miblo template update --project team-api

Options: --template-dir or --template-url, --template-version, --template-base-url, --project, --dry-run, --offline and --cache-dir. Check --help for your installed version before automating a new workflow.

Search for a feature or command.

↑ ↓ browse Enter to open