config, create, and whoami.
bannerify --help, or bannerify <command> --help, to print the options of a command. Run bannerify with no arguments to start the guided setup when no key is saved and the terminal is interactive. In any other case it prints the help.
Global flags
config
Manage the settings that the CLI keeps between runs. The commands work likegit config.
Keys
The CLI does not check a value when it saves it. A
defaultFormat other than png, jpeg, or webp fails later, when you run create image.
get and list hide the middle of the apiKey, for example abcd****mnop. Add --show to print it in full:
config set apiKey with no value asks for the key and hides what you type. Add --show to see it as you paste a long key:
get and list print the values to stdout, and list prints the path of the config file to stderr. The file is $XDG_CONFIG_HOME/bannerify/config.json, or ~/.config/bannerify/config.json, with 0600 permissions.
create
Generate an image or a PDF from a template.Options
Without
--out, the CLI writes <templateId>.<format> to the current folder, or to outputDir when you set it. A PDF gets the extension pdf.
Modifications
--modifications takes an array of objects. Each object names a layer with name and sets its fields. The object format that the MCP tools accept does not work here.
--modifications and --modifications-file, the CLI joins the two arrays, with the file first.
An unknown layer name is ignored without an error, so check the spelling if a value does not change. Modifications lists the fields of every layer type.
Examples
whoami
Check the API key and print the workspace that it belongs to.key source is flag, env, or config. It tells you which key a script uses. Without --json, whoami prints this text to stderr, so read the result in a script with --json.
Run whoami first in a new environment. It reports a key problem before a long batch fails.
Use it from a script or an agent
The CLI never prompts when stdin or stdout is not a terminal, or whenCI is set. A missing key fails at once and prints the commands that fix it.
JSON output
Add--json to read the result from a script. On success, create image prints one object:
create pdf leaves out format. When you write the file to stdout, path is stdout. whoami prints the workspace and the key source:
create fails, it prints the error object from the API and exits with a non-zero code:
whoami --json fails, error holds only a message.
Do not combine --out=- with --json. Both write to stdout, so the JSON line would follow the bytes of the file. Write the file to a path instead.
Exit codes
The API reports an unknown key as
BAD_REQUEST, so create exits with 1 for a wrong key. Run whoami to check a key: it exits with 2, or with 1 when you add --json.