RestAPI Terminal (RAT)

Introduction

Our CLI (Command Line Interface) tool provides developers with a straightforward way to interact with our RestAPI.com. It is a single file binary. The main purpose of rat is to provide a simple way to deploy your web app, either from locally or from a CI/CD pipeline.

rat help

Installation

We suggest installing our CLI from gg . This will install and run the tool locally for your operating system and architecture. Use the following commands for Linux and macOS:

wget ggcmd.io/gg.cmd
sh gg.cmd rat@1

Use the following commands for Windows (PowerShell):
wget ggcmd.io -OutFile gg.cmd
.\gg.cmd rat@1
For more information, visit the gg GitHub page.
For a complete list of commands and options, use the help command:
rat help
If you want to download the binary directly you can check out this link for a list of versions

Versioning and gg

We suggest using @<version> to specify the version of rat you want to use.
We guarantee that the arguments will not change between major versions.
At writing, the latest version is 1.

Skipping the version will always use the latest version.

sh gg.cmd rat

CI / CD

You can use rat in your CI/CD pipeline to deploy your web app. In order to do this you need to set up a service account. Once you have the service account set up, you need to define the following environment variables:

Environment VariableDescription

RAT_CLIENT_ID

Client ID of your service account

RAT_CLIENT_SECRET

Client secret of your service account

Then you can upload using the rat upload command.
We suggest adding gg.cmd to your repo and make it executable, then you can include the environment variables above and execute the following command in your CI/CD pipeline:
./gg.cmd rat@1 upload -a <your api name or id> <directory to deploy>
It is also possible to simply download gg.cmd every time. It is a small file and will not take long to download.