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.
To install and use the CLI, you must have:
- An Oracle Cloud Infrastructure account.
- A user created in that account, in a group with a policy that grants the desired permissions. This account user can be you, another person, or a system that calls the API. For an example of how to set up a new user, group, compartment, and policy, see Adding Users. For a list of other typical Oracle Cloud Infrastructure policies, see Common Policies.
- A keypair used for signing API requests, with the public key uploaded to Oracle.
Only the user calling the API should possess the private key. See Configuring the CLI. Note
To use the CLI without a keypair, you can use token-based authentication. For more information, see Token-based Authentication for the CLI.
- A supported version of Python on a supported operating system.
If you require FIPS-compliance, see Using FIPS-validated Libraries.
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
- CentOS 7.0 and CentOS 8.x
- Ubuntu 16.04, Ubuntu 18.04, and Ubuntu 20.04
Python versions 2.7 and 3.5 are no longer maintained. Versions of the OCI CLI released after May 25th 2021 will not work with Python versions 2.7 or 3.5. Versions of the OCI CLI released before May 25th 2021 will continue to work with Python versions 2.7 and 3.5.
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.
- Analytics Cloud
- API Gateway
- Application Migration
- Application Performance Monitoring
- Autoscaling (Compute)
- Big Data
- Blockchain Platform
- Cloud Guard
- Compute Instance Agent (Oracle Cloud Agent)
- 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 Management
- Digital Assistant
- Email Delivery
- File Storage
- Golden Gate
- Health Checks
- Key Management (for the Vault service)
- Load Balancing
- Logging Analytics
- Logging Search
- Logging Ingestion
- Management Agent Cloud
- Management Dashboard
- MySQL Database
- Network Load Balancing
- NoSQL Database Cloud
- Object Storage
- OCI Registry
- Operations Insights
- OS Management
- Resource Manager
- Secret Management (for the Vault service)
- Secret Retrieval (for the Vault service)
- Service Connector Hub
- Support Management
- VMWare Solution
- Web Application Acceleration and Security
- Work Requests (Compute, Database)
To be notified when a new version of the CLI is released, subscribe to the Atom feed.