Skip to content

v0.6.0

Choose a tag to compare

@jkaninda jkaninda released this 15 Jul 17:23
· 25 commits to main since this release
6fd2f7a

What's Changed

  • feat(cli): multi-context config, TLS trust, --server, and browser login by @jkaninda in https://github.com/miabi-io/miabi-cli/pull/6
    Contexts (~/.miabi/config.yaml):

    • A config is now a set of named contexts (server + token + workspace/app)
      plus a current pointer. login writes one, named by --context, else the
      server host, else "default" (re-logging into the same server refreshes it in
      place).
    • New context command (alias ctx): list/ls, current, use, delete/rm, with
      shell completion; global --context (env MIABI_CONTEXT) targets a context for a
      single call. Resolution is flags → env → active context, so env-only CI keeps
      working with no config file.
    • Backward compatible: the old flat url: and the intermediate single server:
      block both migrate into a "default" context on load and rewrite to the new
      form on the next save.

    TLS trust (per context):

    • server.ca (path to a PEM bundle) and server.insecure_skip, wired into the
      HTTP client via a custom TLS config; flags --certificate-authority (env
      MIABI_CA) and --insecure-skip-tls-verify (env MIABI_INSECURE_SKIP_TLS_VERIFY).
    • A bad CA bundle fails loudly rather than silently falling back to system roots.
    • Skipping verification prints a stderr warning on every use (suppressed for
      -o json/yaml) — kept as an escape hatch for homelab self-signed / IP access,
      but never silent.

    Flags/env:

    • --server (env MIABI_SERVER) is now preferred; --url is deprecated but still
      works (hidden from help, prints a deprecation notice). MIABI_SERVER is
      preferred over the legacy MIABI_URL.

    login:

    • login --web opens the console's "Copy login command" page and reads the
      pasted token, then validates and saves it — no hand-copying --token.

    Storage:

    • The token is stored base64-encoded in the file (light obfuscation, not
      encryption; the file stays mode 0600). Code always sees plaintext; legacy
      plaintext tokens are still read.

Full Changelog: https://github.com/miabi-io/miabi-cli/compare/v0.5.0...v0.6.0