Quick links
Installation
macOS
Homebrew
Install: brew install fastly/tap/fastly
Upgrade: brew upgrade fastly
Windows
scoop
Install:
scoop bucket add fastly-cli https://github.com/fastly/scoop-cli.git
scoop install fastly
Upgrade: scoop update fastly
Linux
Debian/Ubuntu Linux
Install and upgrade:
- Download the
.deb
file from the releases page sudo apt install ./fastly_*_linux_amd64.deb
install the downloaded file
Fedora Linux
Install and upgrade:
- Download the
.rpm
file from the releases page sudo dnf install fastly_*_linux_amd64.rpm
install the downloaded file
Centos Linux
Install and upgrade:
- Download the
.rpm
file from the releases page sudo yum localinstall fastly_*_linux_amd64.rpm
install the downloaded file
openSUSE/SUSE Linux
Install and upgrade:
- Download the
.rpm
file from the releases page sudo zypper in fastly_*_linux_amd64.rpm
install the downloaded file
From a prebuilt binary
Download the latest release from the releases page.
Unarchive the binary and place it in your $PATH. You can verify the integrity
of the binary using the SHA256 checksums file fastly_x.x.x_SHA256SUMS
provided
alongside the release.
Verify it works by running fastly version
.
$ fastly version
Fastly CLI version vX.Y.Z (abc0001)
Built with go version go1.13.1 linux/amd64
The Fastly CLI will notify you if a new version is available, and can update
itself via fastly update
.
Usage
The Fastly CLI interacts with the Fastly API via an API token. You'll need to create an API token for yourself, and then provide it to the Fastly CLI in one of three ways:
- Stored in a config file by running
fastly configure
- Explicitly via the
--token, -t
flag - Implicitly via the
FASTLY_API_TOKEN
environment variable
To see an overview of all commands, simply run fastly
with no arguments.
Succinct help about any command or subcommand is available via the -h, --help
flag. Verbose help about any command or subcommand is available via the help
argument, e.g. fastly help service
.
Development
The Fastly CLI requires Go 1.13 or above. Clone this repo
to any path and type make
to run all of the tests and generate a development
build locally.
git clone git@github.com:fastly/cli
cd cli
make
./fastly version
The make
task requires the following executables to exist in your $PATH
:
If you have none of them installed, or don't mind them being upgraded automatically, you can run make dependencies
to install them.
Contributing
We're happy to receive feature requests and PRs. If your change is nontrivial, please open an issue to discuss the idea and implementation strategy before submitting a PR.
Issues
If you encounter any non-security-related bug or unexpected behavior, please file an issue using the bug report template.
Security issues
Please see our SECURITY.md for guidance on reporting security-related issues.