ADC is a command line utility that interfaces with API7 Enterprise and Apache APISIX Admin APIs.
The following backend types are supported in ADC:
The following converters are supported to convert API specifications to ADC configuration:
The easiest way to install ADC is through the install script:
curl -sL "https://run.api7.ai/adc/install" | sh
Or, you can download the appropriate binary from the releases page:
wget https://github.com/api7/adc/releases/download/v0.12.0/adc_0.12.0_linux_amd64.tar.gz
tar -zxvf adc_0.12.0_linux_amd64.tar.gz
mv adc /usr/local/bin/adc
Pre-built binaries for amd64
and arm64
on Linux, Windows, and macOS are available now.
You can configure ADC through environment variables or command line flags. Run adc help [command]
to see the available configuration options for a command.
ADC supports dotenv, so you can store and use your environment variables in a .env
file. The examples below show how to configure ADC for both API7 Enterprise and Apache APISIX backends.
ADC_BACKEND=api7ee
ADC_SERVER=https://localhost:7443
ADC_TOKEN=<token generated from the dashboard>
ADC_SERVER=http://localhost:9180
ADC_TOKEN=<APISIX Admin API key>
This section highlights some of the common ADC commands.
The ping
command verifies the configuration by trying to connect to the configured backend:
adc ping
The dump
command fetches the current configuration of the backend and saves it in the ADC configuration file format:
adc dump -o adc.yaml
The diff
command compares the configuration in the specified ADC configuration file with the current configuration of the backend:
adc diff -f adc.yaml
The sync
command synchronizes the configuration in the specified ADC configuration file with the backend:
adc sync -f adc.yaml
The convert
command converts API specifications to ADC configuration. Currently, it supports converting an OpenAPI 3 specification to ADC configuration.
adc convert openapi -f openapi.yaml
The lint
command verifies the provided ADC configuration file locally.
adc lint -f adc.yaml
To build ADC from source, install Nx and run:
pnpm install
nx build cli
To use the binary, run:
node dist/apps/cli/main.js -h
This project is licensed under the Apache 2.0 License.