The CLI in the cloud shell uses environment variables for its configuration:
env | grep OCI
The relevant entries are:
OCI_CLI_CONFIG_FILE = /etc/oci/config
OCI_CLI_PROFILE = eu-amsterdam-1
Now, create the oci-cli-rc file:
oci setup oci-cli-rc
Edit the file: ~/.oci/oci_cli_rc
Create a section with the name taken from the OCI_CLI_PROFILE variable:
[eu-amsterdam-1]
compute.compartment-id = ocid1.compartment.oc1..xyz
And test if it works:
oci compute instance list OID
Name of availability domain: PvAq:eu-amsterdam-1-AD-1 [to discover: Create a new VM instance]