Getting Started
Build the binary
Section titled “Build the binary”Build the CLI from the api/ directory:
cd apimake build-cliThe compiled binary is written to:
api/bin/gaardRun it directly:
./bin/gaard versionIf you want gaard available on your PATH, install the built binary into a directory that is already on your shell path.
First login
Section titled “First login”Authenticate against the default Gaard app:
./bin/gaard loginThe command prompts for:
- A browser sign-in flow
The CLI opens the browser automatically when possible. If it cannot, it prints a URL you can open manually.
After you approve the request in the browser, the CLI creates a personal access token and stores it in the active config file.
To log into a different environment explicitly:
./bin/gaard login --api http://127.0.0.1:8004 --name localFirst useful commands
Section titled “First useful commands”Check the current identity:
./bin/gaard whoamiList configured environments:
./bin/gaard ctx listPrint structured output for automation:
./bin/gaard whoami -o jsonGlobal flags
Section titled “Global flags”Most commands support these global flags:
-c, --contextto override the context for a single command-t, --tenantto override the tenant for a single command-o, --outputto choosetableorjson--no-colorto disable ANSI colors-v, --verbosefor verbose logging
Built-in help
Section titled “Built-in help”The CLI ships with command help:
./bin/gaard --help./bin/gaard login --help./bin/gaard ctx --help./bin/gaard tenant --help