*This page
applies to **Apigee** and **Apigee hybrid**.*


*View [Apigee Edge](https://docs.apigee.com/api-platform/get-started/what-apigee-edge) documentation.*
![](https://fonts.gstatic.com/s/i/googlematerialicons/help/v13/gm_grey-24dp/1x/gm_help_gm_grey_24dp.png)


The `gcloud apigee` CLI enables you to perform the following:

- View API proxies
- Create and manage API products
- Deploy and undeploy API proxies, and view deployment details
- View information about developers and apps
- List your environments and organizations
- Manage third-party applications that call Apigee API proxies


In addition, the `gcloud beta apigee` CLI enables you to deploy and manage archives in your Apigee environment.

The following sections describe how to install, authorize, and use the `gcloud apigee` and `gcloud beta apigee` CLIs, and optionally set environment variables.

## Before you begin


Ensure that you have met the [prerequisites](https://docs.cloud.google.com/apigee/docs/api-platform/get-started/overview.md.txt#prerequisites) for using Apigee,
including installing the [Google Cloud SDK](https://docs.cloud.google.com/sdk/install).

> [!NOTE]
> **Note:** As an alternative, you can use the [Google Cloud Shell](https://console.cloud.google.com/?cloudshell=true). The Google Cloud Shell is a command-line environment that already includes the Google Cloud SDK, so you wouldn't need to install it.

## Installing the gcloud beta apigee components


To access the `gcloud beta apigee` commands, you must install the
complete gcloud beta component, as follows:

```
gcloud components install beta
```


To confirm that the beta component has been installed, enter the following command:

```
gcloud components list
```


You should see the beta component in the list, as follows:

| Status | Name | ID | Size |
|---|---|---|---|
| Installed | gcloud Beta Commands | beta | \< 1 MiB |


For more information, see [Managing SDK components](https://docs.cloud.google.com/sdk/docs/components.md.txt).

## Authenticate for the gcloud CLI


See
[Authenticate for the gcloud CLI](https://docs.cloud.google.com/sdk/docs/authenticate.md.txt#user-accounts) for
instructions on how to authenticate.


For example, to authorize access using your user account and perform other common Cloud SDK setup steps, use the following
command:

```
gcloud init
```


Follow the prompts to authenticate the account, grant access permissions, and initialize your Cloud SDK installation, as described in [Initialize the gcloud CLI](https://docs.cloud.google.com/sdk/docs/initialize.md.txt).


Alternatively, to authorize access without performing any additional set up, use the following command:

```
gcloud auth login
```


Follow the browser-based authorization flow to authenticate the account and grant access permissions.

For more information about authorizing and revoking access to the gcloud CLI, see
[Credentials](https://docs.cloud.google.com/sdk/docs/cheatsheet.md.txt#credentials).

## Setting environment variables for gcloud commands


The Apigee API and gcloud CLI examples provided throughout the documentation use one or more of the environment variables defined
in the following table.

By setting the environment variables upfront to meaningful values in your environment, you can copy and paste the example requests
to execute them in your own environment with minimal or no modifications.

| Environment variable | Description |
|---|---|
| `$API` | Name of your API proxy. |
| `$APIPRODUCT` | Name of the API product. |
| `$APP` | ID of an app. |
| `$DEVELOPER_EMAIL` | Email address of the developer. |
| `$ENV` | Name of your environment, such as `test` or `prod`. |
| `$ID` | Resource ID. |
| `$KEY` | Consumer key. |
| `$NAME` | Name of your resource. |
| `$ORG` | Your Apigee organization. |
| `$REV` | Revision number of your API proxy. |
| `$SHAREDFLOW` | Name of your shared flow. |
| `$TYPE` | [Resource type](https://docs.cloud.google.com/apigee/docs/api-platform/develop/resource-files.md.txt#resourcetypes). |

## Using the gcloud CLI


Use the `gcloud` CLI as follows:

```
gcloud apigee GROUP [GCLOUD_WIDE_FLAG …]
```


For more information about the available command groups and flags, see [gcloud apigee](https://docs.cloud.google.com/sdk/gcloud/reference/apigee.md.txt).


For example, the following command lists the API proxies in your organization:

```
gcloud apigee apis list --organization=$ORG
```


The following provides an example of the response for the `my-org` organization:

```
Using Apigee organization `myorg`
 - hello-world
 - weather-app
 
```

## More information


For more information, see:

- [gcloud apigee](https://docs.cloud.google.com/sdk/gcloud/reference/apigee.md.txt)
- [gcloud beta apigee](https://docs.cloud.google.com/sdk/gcloud/reference/beta/apigee.md.txt)
- [gcloud command-line tool overview](https://docs.cloud.google.com/sdk/gcloud.md.txt)
- [Managing SDK components](https://docs.cloud.google.com/sdk/docs/components.md.txt)
- [Scripting gcloud CLI commands](https://docs.cloud.google.com/sdk/docs/scripting-gcloud.md.txt)