ibmi <command> [arguments] [options]. Global options (--system, --format, --raw, --stream, --watch, --output, --tools, --no-color) apply to every command.
SQL Execution
ibmi sql [statement]
Execute a SQL query against the target system.
SQL source priority: positional argument >
--file > piped stdin.
Read-only mode is enabled by default. To execute INSERT, UPDATE, DELETE, or DDL statements, pass
--no-read-only explicitly or set readOnly: false in your system config.Multi-System Execution
Run the same SQL query against multiple IBM i systems in parallel by passing a comma-separated list of system names to--system. Each system name must be defined in your CLI configuration file — either the user-level config at ~/.ibmi/config.yaml or a project-level .ibmi/config.yaml.
Usage
Output format
Each row in the output includes aSYSTEM column identifying which system returned it. The JSON envelope includes a systems array with per-system row counts, timing, and any errors:
Limitations
--watchis not supported with multiple systems.- If one system is unreachable, its results appear as an error row without affecting the other systems.
- All systems share the same
--limitvalue. When no--limitis specified, the smallestmaxRowsacross all target systems is used.
Schema Discovery
ibmi schemas
List available schemas (libraries) on the system.
ibmi tables <schema>
List tables, views, and physical files in a schema.
ibmi columns <schema> <table>
Get column metadata for a specific table.
ibmi related <library> <object>
Discover objects that depend on a database file (views, indexes, triggers, foreign keys, logical files).
ibmi describe <objects>
Generate DDL (CREATE statements) for one or more SQL objects using QSYS2.GENERATE_SQL.
Valid
--type values: ALIAS, CONSTRAINT, FUNCTION, INDEX, MASK, PERMISSION, PROCEDURE, SCHEMA, SEQUENCE, TABLE, TRIGGER, TYPE, VARIABLE, VIEW, XSR
Objects are specified as LIBRARY.OBJECT or just OBJECT (defaults to QSYS2). When describing multiple objects, each is queried independently — a failure on one object produces an ERROR: row without affecting the others.
ibmi validate "<sql>"
Validate SQL syntax and verify referenced objects exist without executing the query.
QSYS2.PARSE_STATEMENT and cross-references tables, columns, and routines against the system catalog.
YAML Tool Execution
ibmi tool <name>
Execute a YAML-defined SQL tool. Requires --tools to specify the YAML file(s).
snake_case to --kebab-case:
ibmi tools
List available tools from loaded YAML files.
ibmi toolsets
List available toolsets from loaded YAML files.
System Management
ibmi system <subcommand>
Manage named system connections in .ibmi/config.yaml.