Command Line Interface (CLI)

The CLI is a small-footprint tool that you can use on its own or with the Console to complete Oracle Cloud Infrastructure tasks. The CLI provides the same core functionality as the Console, plus additional commands. Some of these, such as the ability to run scripts, extend Console functionality.

This CLI and sample is dual-licensed under the Universal Permissive License 1.0 and the Apache License 2.0; third-party content is separately licensed as described in the code.

The CLI is built on the Oracle Cloud Infrastructure SDK for Python and runs on Mac, Windows, or Linux. The Python code makes calls to Oracle Cloud Infrastructure APIs to provide the functionality implemented for the various services. These are REST APIs that use HTTPS requests and responses. For more information, see About the API.

Installation: See Quickstart.

Reference: For help with a specific command, you can enter help <command> on the command line or view the Command Line Reference. This reference is derived from the APIs and help text in the Python source code.

Requirements

To install and use the CLI, you must have:

Supported Python Versions and Operating Systems

The CLI supports Python versions 3.5 through 3.8 running on MacOS, Windows, or a supported Linux distribution:

  • Oracle Linux 6.10, Oracle Linux 7.3 through 7.5, and Oracle Linux 8.0
  • CentOS 6.9, CentOS 6.10, and CentOS 7.0
  • Ubuntu 16.04 and Ubuntu 18.04
Note

Newer versions of Python may not be immediately supported. The CLI might work on unlisted operating systems, but we do not test them for compatibility.

If you use the CLI installer and do not have Python on your machine, the installer offers to automatically install Python for you. If you already have Python installed on your machine, you can use the python --version command to find out which version is installed.

Warning

Python 2 support ended on December 31, 2019. Versions of the OCI CLI released after January 2020 are not compatible with Python 2.

Services Supported

  • Analytics Cloud
  • Announcements
  • API Gateway
  • Application Migration
  • Audit
  • Autoscaling (Compute)
  • Big Data
  • Blockchain Platform
  • Budgets
  • Container Engine for Kubernetes
  • Content and Experience
  • Core Services (Networking, Compute, Block Volume)
  • Data Catalog
  • Data Flow
  • Data Integration
  • Data Safe
  • Data Science
  • Data Transfer
  • Database
  • Digital Assistant
  • DNS
  • Email Delivery
  • Events
  • Functions
  • File Storage
  • Health Checks
  • IAM
  • Integration
  • Key Management (for the Vault service)
  • Limits
  • Load Balancing
  • Marketplace
  • Monitoring
  • MySQL Database
  • NoSQL Database Cloud
  • Notifications
  • Object Storage
  • OS Management
  • Quotas
  • Resource Manager
  • Search
  • Secret Management (for the Vault service)
  • Secret Retrieval (for the Vault service)
  • Streaming
  • Support Management
  • Usage
  • VMWare Solution
  • Web Application Acceleration and Security
  • Work Requests (Compute, Database)