img-cli

provider

Install provider plugins, save their API keys, and choose between them.

Quick start

img-cli provider add vibetoken
img-cli provider login vibetoken
img-cli provider list

Subcommands

  • add: install a provider
  • update: fetch installed providers again
  • list: list installed providers
  • login: save a provider's API key
  • logout: delete a provider's saved key
  • default: use a provider when -m names only a model
  • host: show or pick a regional host
  • remove: uninstall a provider

provider add

img-cli provider add <name|owner/repo|file|url> [--yes]
Argument Installs
vibetoken An official provider: vibetoken, routerbase, grsai, or laozhang.
owner/repo img-cli.toml from that GitHub repository's default branch.
owner/repo/path/acme.toml@v1.2.0 Another file in the repository, at a tag, branch, or commit.
./acme.toml A file on disk.
https://example.com/acme.toml A file at a URL.

Before installing from GitHub or a URL, add shows the file's title, description, and author, and every host your API key will be sent to, then asks to continue. Pass --yes to skip the question in scripts; without a terminal, add refuses unless you do. img-cli sends the key only to those hosts, even when a template builds a URL elsewhere.

A file from GitHub is pinned to the commit it was downloaded at. add records where each file came from, so provider update can fetch it again.

Adding a file whose name is already installed replaces it. A provider that extends another needs the parent installed too.

img-cli provider add someone/img-cli-acme
img-cli provider add ./my-provider.toml --yes

provider update

img-cli provider update [name...] [--yes]

Fetches each installed provider again from where it was added: the official file in this build, the GitHub repository at its tag or default branch, the URL, or the local file. Without names, every provider is updated. If the new file sends the key to different hosts, update shows them and asks again; --yes accepts.

img-cli provider update
img-cli provider update acme

provider list

img-cli provider list

Shows each installed provider, its base URL, and where its key comes from (env, file, or none). * marks the default.

provider login

img-cli provider login <name>

Reads the key from a hidden prompt, or from stdin when piped, and saves it in the config file, readable only by you. See Authentication.

provider logout

img-cli provider logout <name>

Deletes the saved key from the config file.

provider default

img-cli provider default <name>

After this, -m can name a model of this provider without the provider: prefix. The first provider you add becomes the default.

provider host

img-cli provider host <name>            # list hosts; * marks the current one
img-cli provider host <name> <host>     # pick one
img-cli provider host <name> default    # go back

For vendors with regional endpoints listed in the plugin's [hosts]. An https:// URL in place of a host name sets your own endpoint, for vendors where each account has one:

img-cli provider host azure https://my-resource.openai.azure.com/openai

provider remove

img-cli provider remove <name>

Deletes the plugin file, its saved key, and its cached model list. Task records stay.