Megaport CLI Overview
This topic provides an introduction to Megaport services and the Megaport command line interface (CLI) (currently in alpha version), aimed at users who are getting started with the Megaport CLI.
What is Megaport?
Megaport is a global Network as a Service (NaaS) provider that makes it easy to connect your network to cloud services such as AWS, Microsoft Azure, and Google Cloud without needing complex physical infrastructure.
It uses a software-defined network (SDN) to let you create scalable, secure, and on-demand virtual connections called Virtual Cross Connects (VXCs), between data centers, cloud providers, and enterprise networks. If you are new to Megaport, see Introducing Megaport.
What is a CLI?
A CLI is a text-based interface used to interact with a computer’s operating system or software by typing specific commands into a terminal or console.
Unlike a graphical user interface (GUI), which relies on icons, menus, and mouse clicks, a CLI processes lines of text to execute tasks, manage files, and run scripts.
It is favored by developers and system administrators for its speed, precision, and ability to automate complex workflows through scripting. While it requires an understanding of specific command syntax, it offers direct control over a system’s underlying architecture that visual interfaces often lack.
What is the Megaport CLI?
The Megaport CLI gives you direct, programmable access to the Megaport software-defined networking platform from your terminal. Whether you’re provisioning a single Port or automating a multicloud network across three continents, the CLI is the fastest path from intent to infrastructure.
Detailed guidance on installation, authentication, first commands, core concepts, tutorials, live demos, and reference material is available at Master the Megaport CLI.
What are the key benefits of Megaport CLI?
The Megaport CLI enhances speed and efficiency by replacing multi-step web wizards with single-command executions, allowing you to manage network resources in seconds without navigating the Portal.
Built with an automation-first approach, the Megaport CLI integrates seamlessly into Continuous Integration (CI) and Continuous Deployment (CD) pipelines, and Infrastructure as Code (IaC) workflows.
The Megaport CLI is suitable for network engineers, cloud and platform engineers, DevOps and site reliability engineers, solution architects, and other technical roles.
What can you do with the Megaport CLI?
The Megaport CLI allows you to order and manage services, administer your account, and view billing information, providing the same functionality as the Portal.
For example:
-
Provision and manage infrastructure – Create and manage Ports, VXCs, MCRs, MVEs, Internet Exchange connections, NAT Gateways and other services.
-
Connect to any CSP – Enable multicloud connections such as AWS Direct Connect, Azure ExpressRoute, Google Cloud Interconnect, and so on.
In addition, the Megaport CLI offers several features that are not available in the Portal.
-
Explore the network – Browse more than 1,100 locations across 30 countries and list CSPs and their port configurations.
-
Automate operations – Use script-friendly JSON input and output. This feature is ideal for managing CI and CD pipelines. The standout automation features of the CLI are three input modes: interactive prompts, CLI flags, and
--json(inline input)--json-file(file-based input) configurations. -
Run it anywhere – Full platform coverage and flexible deployment options, running natively on all major operating systems, within Docker containers, or directly in the browser through WebAssembly.