--system flag.
Config File Locations
The CLI loads configuration from two locations. Project-level config overrides user-level config:
The CLI walks up the directory tree from your current working directory to find the nearest
.ibmi/config.yaml — similar to how .gitignore files work.
The
.ibmi/ directory is automatically added to .gitignore when you create your first system with ibmi system add. This prevents credentials from being committed to version control.Config File Format
System Properties
Environment Variable Expansion
Use${VAR_NAME} syntax in config values to reference environment variables. These are expanded at load time:
.env file rather than in the config file itself.
System Resolution Order
When a command needs a system connection, the CLI resolves it in this priority order:1
--system flag
Explicit flag always wins.
2
IBMI_SYSTEM environment variable
Set in your shell or
.env file.3
Config default
The
default: key in your config file.4
Implicit single system
If only one system is configured, it’s used automatically.
5
Legacy DB2i_* environment variables
Falls back to
DB2i_HOST, DB2i_USER, DB2i_PASS, and DB2i_PORT from the environment. This provides zero-config compatibility with existing MCP server setups.Password Resolution
When a system connection requires authentication:- Config
passwordfield — including${ENV_VAR}expansion - Interactive prompt — if running in a TTY, prompts for password with hidden input
- Error — if non-interactive (piped) and no password is available
Managing Systems
Useibmi system subcommands to manage connections:
Output Format Priority
When determining the output format, the CLI checks in this order:--rawflag (equivalent to--format json)--format <type>flagformat:in config file- Auto-detect:
tablefor TTY,jsonfor piped output