adc

command module
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

README

APISIX Declarative CLI (ADC)

ADC is a command line utility to interface with APISIX's API.

It is built using the Cobra library.

Installation

ADC can be installed using the go install command:

go install github.com/api7/adc@latest

This will install the adc binary to your $GOPATH/bin directory.

You can also download the appropriate binary from the releases page:

wget https://github.com/api7/adc/releases/download/v0.1.0/adc_0.1.0_linux_amd64.tar.gz
tar -zxvf adc_0.1.0_linux_amd64.tar.gz
mv adc /usr/local/bin/adc

[!IMPORTANT] Make sure that these directories are in your $PATH environment variable.

Usage

To view a list of all available commands, run:

adc --help

To learn how to use a particular subcommand, for example, ping run:

adc ping --help
adc configure
adc configure

Configures ADC with APISIX's server address and token. Running this command will prompt you for an APISIX server address and API token and saves them to a configuration file.

By default, ADC creates a configuration file at $HOME/apisix.yaml and this can be changed manually.

adc ping
adc ping

Pings the configured APISIX instance to verify connectivity.

adc validate
adc validate -f apisix.yaml

Validates the provided APISIX configuration file.

adc sync
adc sync

Syncs the local configuration present in the $HOME/apisix.yaml file (or specified configuration file) to the connected APISIX instance.

adc dump
adc dump --output apisix.yaml

Dumps the configuration of the connected APISIX instance to the specified configuration file.

adc diff
adc diff

Shows the differences in configuration between the connected APISIX instance and the local configuration file.

adc openapi2apisix
adc openapi2apisix -o apisix.yaml -f openAPI.yaml

Converts the configuration in OpenAPI format (openAPI.yaml) to APISIX configuration (apisix.yaml).

adc version
adc version

Prints the version of ADC. See Installation for details on installing the latest version.

adc completion
adc completion <bash|zsh|fish|powershell>

Generates autocompletion scripts for the specified shell.

License

This project is licensed under the Apache 2.0 License.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL