This is a command line client for the Fugue API.
For CLI documentation and examples, see the Fugue docs site.
For information about enabling a client in your account, see the API User Guide. More details of the underlying Swagger API are available here.
This project is under active development and is not yet stable. Commands will change as we incorporate feedback.
The easiest way to install the client is to download a prebuilt binary from the releases page.
Detailed installation steps are below:
You can also build from source.
For more information, see the CLI documentation.
- Select the prebuilt
fugue-darwin-amd64
binary from the releases page and save it to disk (do not open it):
-
cd
into the directory where you downloadedfugue-darwin-amd64
. -
Rename the binary
fugue
and move it to a location in your$PATH
, such as/usr/local/bin
. You can do both with the following command:
mv fugue-darwin-amd64 /usr/local/bin/fugue
- Change file permissions to enable execution:
chmod 755 /usr/local/bin/fugue
- Set environment variables FUGUE_API_ID and FUGUE_API_SECRET:
export FUGUE_API_ID=61ae1bed-1b6f-1234-5678-1a2b3c4d5e6f
export FUGUE_API_SECRET=f7a89ac99cab9dd2948712345678901234567890
- You should be able to run the
fugue
executable now:
fugue
If you get an error message that the application cannot be opened, see these instructions.
- Select the prebuilt
fugue-linux-amd64
binary from the releases page and save it to disk (do not open it):
-
cd
into the directory where you downloadedfugue-linux-amd64
. -
Rename the binary
fugue
and move it to a location in your$PATH
, such as/usr/local/bin
. You can do both with the following command:
sudo mv fugue-linux-amd64 /usr/local/bin/fugue
- Change file permissions to enable execution:
chmod 755 /usr/local/bin/fugue
- Set environment variables FUGUE_API_ID and FUGUE_API_SECRET:
export FUGUE_API_ID=61ae1bed-1b6f-1234-5678-1a2b3c4d5e6f
export FUGUE_API_SECRET=f7a89ac99cab9dd2948712345678901234567890
- You should be able to run the
fugue
executable now:
fugue
- Download the prebuilt
fugue.exe
binary from the releases page and save it to disk (do not open it):
- Open up cmd (Windows Command Shell) and create the directory
C:\Fugue\bin
:
md C:\Fugue\bin
cd
into the directory where you downloadedfugue.exe
and move the binary toC:\Fugue\bin
:
move fugue.exe C:\Fugue\bin
- Update
PATH
environment variable to add the new directory to your user path:
setx PATH "%PATH%;C:\Fugue\bin"
- Set environment variables FUGUE_API_ID and FUGUE_API_SECRET:
setx FUGUE_API_ID 61ae1bed-1b6f-1234-5678-1a2b3c4d5e6f
setx FUGUE_API_SECRET f7a89ac99cab9dd2948712345678901234567890
-
Close the cmd window and open a new one so the environment variables take effect.
-
You should be able to run the
fugue
executable now:
fugue --version
Regula is available as a Docker image on DockerHub here.
To use the Fugue client Docker image, run:
docker run --rm -it -e FUGUE_API_ID=<your API ID> -e FUGUE_API_SECRET=<your API secret> fugue/fugue-client
When integrating this in a CI pipeline, we recommend pinning the image to a specific version, e.g. fugue/fugue-client:v0.19.1
. See the tags page for the current list of available tags.
The client uses the following required environment variables:
FUGUE_API_ID
- your API client IDFUGUE_API_SECRET
- your API client secret
Install Go:
brew install go
Build the client executable:
make build
Install to $GOPATH/bin:
make install
Show usage:
fugue -h
Fugue API Client
Usage:
fugue [command]
Available Commands:
create Create a resource
delete Delete a resource
get Retrieve a resource
help Help about any command
list List a collection of resources
scan Trigger a scan
sync Sync files to your account
update Update a resource
Flags:
-h, --help help for fugue
--json outputs the Fugue API JSON response
--version version for fugue
Use "fugue [command] --help" for more information about a command.
You may use the shorthand env
instead of environment
when running commands.
For example:
fugue list envs
To see the HTTP headers and the json
exchanged between the CLI and the Fugue API, set the environment variable DEBUG=1
. For example:
DEBUG=1 fugue list environments