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" | shOr, you can download the appropriate binary from the releases page:
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 pingThe dump command fetches the current configuration of the backend and saves it in the ADC configuration file format:
adc dump -o adc.yamlThe diff command compares the configuration in the specified ADC configuration file with the current configuration of the backend:
adc diff -f adc.yamlThe sync command synchronizes the configuration in the specified ADC configuration file with the backend:
adc sync -f adc.yamlThe convert command converts API specifications to ADC configuration. Currently, it supports converting an OpenAPI 3 specification to ADC configuration.
adc convert openapi -f openapi.yamlThe lint command verifies the provided ADC configuration file locally.
adc lint -f adc.yamlTo build ADC from source, install Nx and run:
pnpm install
nx build cliTo use the binary, run:
node dist/apps/cli/main.js -hThis project is licensed under the Apache 2.0 License.