Get Started with the APIMatic CLI
Sign in to the APIMatic CLI and find your way around its commands and help.
Most APIMatic CLI commands need you to be signed in to an APIMatic account. If you don't have one yet, sign up for free.
Note: You need the APIMatic CLI installed. See Install the APIMatic CLI.
Sign in
With your APIMatic account
apimatic auth loginThe CLI opens your default browser so you can sign in securely. Then confirm your session:
apimatic auth statusThe output shows the account you're signed in as and the SDK languages available on your plan.
With an API key
Use an API key when a browser isn't available, such as on a build server:
apimatic auth login --auth-key=<your-api-key>Override the API key for one command
Most commands that need authentication, such as portal generate, sdk generate, and api validate, also accept --auth-key. It overrides the signed-in session for that command only, which is useful in CI/CD pipelines. sdk publish doesn't take --auth-key, so in CI sign in first with apimatic auth login --auth-key=....
apimatic portal generate --auth-key=$APIMATIC_API_KEYSign out
apimatic auth logoutHow commands are organized
Related commands are grouped into topics. Run a command as apimatic <topic> <command>, for example apimatic sdk generate.
| Topic | What it covers |
|---|---|
quickstart | Interactive setup for your first portal or SDK |
api | Validate and transform API definitions |
sdk | Generate, customize, and publish APIMatic SDKs |
portal | Generate and preview developer portals |
plugin | Generate and publish APIMatic Context Plugins |
publishing | Manage SDK publishing profiles |
auth | Sign in, sign out, and check your session |
Get help
List every topic and command:
apimatic helpShow help for one command, including its flags and examples:
apimatic help sdk generate
apimatic sdk generate --helpAdd -n (--nested-commands) to include the commands nested under a topic.
Next steps
See the CLI Reference for every command and flag, or follow the Quickstart to build your first portal.