Master the Megaport CLI
Learn real Megaport CLI workflows: provision services, troubleshoot connectivity, and automate repeatable network operations from your terminal or browser.
Run CLI commands in your terminal or try the live browser demo.
What Is the Megaport CLI?
A single command-line tool for provisioning and managing your entire Megaport network — ports, virtual cross connects, cloud routers, and more.
Provision Infrastructure
Create ports, VXCs, MCRs, MVEs, and cloud on-ramps directly from your terminal — no portal clicks required.
Multiple Input Modes
Interactive prompts for exploration, CLI flags for scripting, and JSON file input for full automation and CI/CD pipelines.
Try It in the Browser
A live WASM-powered terminal lets you explore commands without installing anything — great for learning and quick demos.
This tutorial walks you through installation, core concepts, and hands-on workflows — from your first command to multi-cloud automation.
Get started →Everything You Need
Built for power users, accessible to everyone.
9 Resource Types
Ports, VXCs, MCR, MVE, Internet Exchange, and more — the complete Megaport platform.
3 Input Modes
Interactive prompts for beginners, CLI flags for power users, JSON files for automation.
Runs in the Browser
Compiled to WebAssembly — try every command live without installing anything.
Multi-Cloud Ready
Native connectors for AWS Direct Connect, Azure ExpressRoute, and Google Cloud Interconnect.
Automation Friendly
Structured JSON output, exit codes, and JSON input mode for CI/CD pipelines and scripts.
Docker Deploy
Run the web terminal in any environment with a single Docker command.
Up and Running in Minutes
Three steps from zero to managing your first resource.
Step 1 of 3
Mac & Linux via Homebrew
Then verify:
megaport-cli version
- The easiest way to install on macOS or Linux.
- Run "brew upgrade megaport-cli" to update.
- Tap is auto-updated with each new release.
Enter your API key and secret
- Use production for live resources and real changes.
- Use staging while learning and testing safely.
- Switch profiles quickly with config use-profile.
List all your ports
- Run get/status/update commands on any returned UID.
- Use --output json for script-friendly automation.
- Add --profile to target another environment quickly.
How It Works
The CLI talks directly to the Megaport API — in your terminal or your browser.
You
Developer
CLI
Terminal
WASM
Browser
Megaport API
9 Resource Types
Complete CLI coverage across the entire Megaport platform.
Why Use the CLI?
Move faster, reduce errors, and scale your network operations.
Minutes
vs. days with manual processes
Provision a port, connect to AWS, and route traffic — all from one terminal session.
Repeatable
Script once, deploy everywhere
JSON templates and CI/CD pipelines replace portal clicks with auditable, version-controlled infrastructure.
800+
Data centres in 26 countries
Query live availability, filter by metro, and connect to any cloud provider — all via API.