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.

Tip

Cloud Shell: The CLI is pre-configured with your credentials and ready to use immediately from within Cloud Shell. For more information on using the CLI from within Cloud Shell, see Getting Started with Cloud Shell.

Oracle Linux Cloud Developer image: The CLI is pre-installed on the Oracle Linux Cloud Developer platform image. For more information, see Oracle Linux Cloud Developer.

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: You can get immediate help on any CLI command. To get started, run oci --help from the command line. You can also 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.6 and later running on MacOS, Windows, or supported Linux and UNIX-like operating systems:

  • Oracle Linux 6.10, Oracle Linux 7.7 and 7.8, and Oracle Linux 8.0
  • Oracle Autonomous Linux 7.8
  • Oracle Linux Cloud Developer 8.x
  • CentOS 7.x, CentOS Stream 8
  • Ubuntu 16.04, Ubuntu 18.04, and Ubuntu 20.04
Note

You need to upgrade to Python version 3.6 or later to continue receiving support from Oracle. OCI support for Python version 2.x is being deprecated. Versions of the OCI CLI released after August 1st, 2021, (version 3.x.x and later), will not work with Python version 2.7. Versions of the OCI CLI released before August 1st 2021, (version 2.x.x), will continue to work with Python versions 2.7 by setting the environment variable OCI_CLI_ALLOW_PYTHON2 to True.

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.

Services Supported

  • AI Anomaly Detection
  • AI Language
  • AI Speech
  • AI Vision
  • Analytics Cloud
  • Announcements
  • API Gateway
  • Classic Migration Service
  • Application Dependency Management
  • Application Performance Monitoring
  • Audit
  • Autoscaling (Compute)
  • Bastion
  • Big Data Service
  • Blockchain Platform
  • Budgets
  • Build
  • Certificates
  • Cloud Bridge
  • Cloud Guard
  • Cloud Migrations
  • Compute Instance Agent (Oracle Cloud Agent)
  • Container Engine for Kubernetes
  • Content Management
  • Core Services (Networking, Compute, Block Volume)
  • Data Connectivity Management
  • Database Migration
  • Data Catalog
  • Data Flow
  • Data Labeling
  • Data Integration
  • Data Labeling
  • Data Safe
  • Data Science
  • Data Transfer
  • Database
  • Database Management
  • Database Tools
  • DevOps
  • Digital Assistant
  • Digital Media
  • Disaster Recovery
  • DNS
  • Email Delivery
  • Enterprise Manager Warehouse
  • Events
  • File Storage
  • Functions
  • Fusion Apps as a Service
  • Generic Artifacts
  • Golden Gate
  • Governance Rules
  • Health Checks
  • IAM
  • Integration Generation 2
  • Java Management
  • Key Management (for the Vault service)
  • License Manager
  • Limits
  • Load Balancer
  • Logging
  • Logging Analytics
  • Logging Search
  • Logging Ingestion
  • Managed Access
  • Management Agent Cloud
  • Management Dashboard
  • Marketplace
  • Monitoring
  • MySQL Database
  • Network Firewall
  • Network Load Balancing
  • Network Monitoring
  • Networking Topology
  • NoSQL Database Cloud
  • Notifications
  • Object Storage
  • OCI Registry
  • OneSubscription
  • Operations Insights
  • Operator Access Control
  • Optimizer
  • Organizations
  • OS Management
  • Process Automation
  • Quotas
  • Resource Manager
  • Search
  • Secret Management (for the Vault service)
  • Secret Retrieval (for the Vault service)
  • Service Catalog
  • Service Connector Hub
  • Service Mesh
  • Source Code Management
  • Stack Monitoring
  • Streaming
  • Support Management
  • Threat Intelligence
  • Usage
  • Visual Builder
  • VMWare Solution
  • Web Application Acceleration and Security
  • Work Requests (Compute, Database)