Skip to main content

apigee-cli

Python version Downloads License

Maintenance Status

This tool is no longer actively maintained.

It remains usable, but no new features or fixes are planned.

If you encounter any broken versions, please report them via the Forked repository, thanks.

Authentication Support Notice

We exclusively use SSO.

Basic and MFA authentication may still work, but they are no longer tested or guaranteed.

Overview

The Apigee Edge command-line interface is an unofficial Python CLI built to simplify and automate Apigee API usage.

  • Originally built for Darumatic clients

  • Designed for Apigee Edge

  • Supports common API management workflows

Recently Tested

The following commands and features were validated during final updates and refactoring:

Authentication

  • SSO login flow (primary supported method)

  • Basic auth (not actively tested)

  • MFA auth (not actively tested)

Core Functionality

  • list and get subcommands for:

    • apis

    • keyvaluemaps

    • caches

    • targetservers

    • sharedflows

    • apps

  • apis subcommands:

    • deploy

    • pull

  • push and delete commands for:

    • keyvaluemaps

    • caches

    • targetservers

  • backups command:

    • Core functionality appears to work, but testing has been limited

    • New --async feature has been introduced and appears to function correctly

    • Fixed issue where user roles were not being downloaded correctly during backups

  • More commands and features will be tested and added here over time.

Deprecation

This tool was designed for Apigee Edge, which is being phased out in favor of Apigee X (ApigeeX).

No major enhancements for ApigeeX compatibility are planned.

Recommendation

For new implementations, consider:

  • Official Google Cloud / Apigee tooling

  • Direct ApigeeX API usage

  • Modern CI/CD integrations

This CLI is best suited for:

  • Legacy automation

  • Transitional environments

  • Existing scripts that depend on it

Installation

The easiest way to install apigee-cli is to use pip in a virtualenv:

$ pip install apigeecli

or, if you are not installing in a virtualenv, to install globally:

$ sudo pip install apigeecli

or for your user:

$ pip install --user apigeecli

If you have the apigee-cli installed and want to upgrade to the latest version you can run:

$ pip install --upgrade apigeecli

Getting Started

Before using apigee-cli, you need to tell it about your Apigee Edge credentials. You can do this in three ways:

  • Environment variables

  • Config file

  • Command-line arguments

The steps below show how to use command-line arguments to configure your Apigee Edge credentials.

Basic authentication

$ apigee configure -P default -u MY_EMAIL -p MY_PASS -o MY_ORG -mfa '' -z '' --no-token --prefix ''

Multi-factor authentication (MFA)

$ apigee configure -P default -u MY_EMAIL -p MY_PASS -o MY_ORG -mfa MY_KEY -z '' --no-token --prefix ''

SSO authentication

$ apigee configure -P default -u MY_EMAIL -p none -o MY_ORG -mfa '' -z MY_ZONENAME --no-token --prefix ''

If you are not currently signed in by your identity provider, you will be prompted to sign in:

$ apigee apis list
SSO authorization page has automatically been opened in your default browser.
Follow the instructions in the browser to complete this authorization request.

If your browser did not automatically open, go to the following URL and sign in:

https://{zoneName}.login.apigee.com/passcode

then copy the Temporary Authentication Code.

Please enter the Temporary Authentication Code:

zoneName will be the Identity zone name you previously configured.

Refer to the official Apigee documentation to learn more about how to Access the Edge API with SAML.

Testing your credentials

Run the following command to get a list of API proxies in your default Apigee organization:

$ apigee apis list
["helloworld", "oauth"]

Troubleshooting

If you encounter issues with commands, check the log file for detailed debug information and error messages:

~/.apigee/exceptions.log

This file can help diagnose installation problems, missing dependencies, or errors related to Apigee Edge.

You can also use the verbose flags -v or -vv with commands to see more detailed request information.

SSL / TLS Issues

If you encounter SSL errors such as:

requests.adapters.SSLError

This may be caused by corporate security proxies.

As a workaround, you can disable SSL verification by setting the following environment variable.

export APIGEE_CLI_ENABLE_SSL_VERIFY=false

Plugins (Optional)

The plugin system was designed for clients in large organisations to extend apigeecli with custom workflows and easily distribute reusable tools across teams.

Typical use cases include:

  • Self-service generation and deployment of API proxies from OpenAPI specifications

  • Integration with and automated provisioning of CI/CD pipelines

  • Validation of custom apiproxy policies against organisational standards

  • Security scanning of API resources using Apigee Edge Admin APIs

  • Operational and governance tooling built on top of existing platform APIs

Plugin repositories are configured as sources. The CLI can add, remove, edit, install, update, and inspect these sources.

Configure plugin sources

Add a plugin source:

apigee plugins add https://github.com/mdelotavo/apigee-cli-plugins.git

By default, the repository name is used as the source key. To specify your own key:

apigee plugins add https://github.com/mdelotavo/apigee-cli-plugins.git --key example

Remove a configured plugin source by key or URL:

apigee plugins remove apigee-cli-plugins

apigee plugins remove https://github.com/mdelotavo/apigee-cli-plugins.git

For bulk edits, you can edit the configuration directly:

apigee plugins configure

To automatically apply configuration changes after saving (install new plugins, update existing plugins, and prune removed repositories):

apigee plugins configure -a

You can also edit the configuration manually in ~/.apigee/plugins/config:

[sources]
apigee-cli-plugins = https://github.com/mdelotavo/apigee-cli-plugins.git

Install and manage plugins

Install new plugins and update existing ones:

apigee plugins update

Inspect configured and installed plugins:

apigee plugins show
apigee plugins show -n apigee-cli-plugins

Remove plugin repositories that are no longer configured:

apigee plugins prune

If you first remove a source with apigee plugins remove, running apigee plugins prune will remove the corresponding local repository.

If one or more dependencies could not be installed automatically, the CLI will report the failures and display the appropriate pip command to install the remaining packages manually.

Creating plugins

This section shows how to start prototyping plugins on your local machine.

Create a new local plugin:

apigee plugins new test

Show the generated command help:

apigee run test hello --help

Run the example command:

apigee test hello \
   "Hello, World!" \
   --count 3 \
   --format json \
   -vv \
   --enabled \
   --tag alpha \
   --tag beta

Edit the generated source code:

vim ~/.apigee/plugins/test/plugin_*.py

Getting Help

Disclaimer

This tool is not affiliated with Apigee or Google and is highly experimental.

Metadata

Release files for apigeecli 0.56.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apigeecli 0.56.2
File Size Uploaded Provenance
apigeecli-0.56.2.tar.gz 63.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for apigeecli 0.56.2
File Interpreter ABI Platform
apigeecli-0.56.2-py3-none-any.whl Python 3 none any Details

Total release size: 149.2 kB

Release files / apigeecli-0.56.2.tar.gz

Download URL apigeecli-0.56.2.tar.gz
Size 63.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d910183a3724ca5ab44ff0b652db569cdae804fb85cfeefb5a7ce649deb2187a
BLAKE2b-256 checksum
How to use checksums
3bade53b3dd0a8a264feec7030aa68475806d9ed17479fdc6a7af2462a99e93e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release files / apigeecli-0.56.2-py3-none-any.whl

Download URL apigeecli-0.56.2-py3-none-any.whl
Size 85.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3b381c9c5cd04b0d23f3f9c9d39a87fbcb47b3ace43e38a0b618f0cbe6de67ef
BLAKE2b-256 checksum
How to use checksums
983d1ee9db279dc963a972353612e7e008d01d6f2e277cff8fd3c73537d54211
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Security for apigeecli 0.56.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.56.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page