No prompts
When stdin is not a terminal, or with--output json, bqto does not prompt. It acts as if you
gave --no-input: a missing value is an error.
Run one command through the session
With-- CMD, bqto runs the command once the tunnel is up. When the command exits, bqto ends the
session and deletes the bastion.
If the default port is taken, bqto uses the next free one. So two jobs on one host can run at the
same time. Always read the port from the environment.
bqto passes its stdin to the command. To pass a long query, use stdin or a file, not nested quotes.
A longer session
With--output json, bqto prints one JSON object for each service on stdout once the tunnel is
up:
- Use
hostandport.remoteis the address of the service. tls: truemeans that your client must use TLS.authsays which credential the service takes:password(an AUTH string) oriam(an access token).
expires in any case.
When a program starts bqto
A program that starts bqto, such as a menu bar app, can die without a signal. With--end-on-stdin-close, bqto ends the session and deletes the bastion when its stdin closes. The
program keeps a pipe to the stdin of bqto open and never writes to it:
-- CMD.
Exit codes
With
-- CMD, a code alone does not say whether bqto or the command failed. Look for the error:
line of bqto on stderr first.
In CI
- In GitHub Actions, use bqto-action.
- On GitLab CI, Cloud Build, Jenkins, and other CI systems, install bqto and run
bqto connect --no-input ... -- CMD. - In CI, run bqto where no one else shares the machine. Security explains why.
- With bqto Pro in CI, pass the key in
BQTO_LICENSE_KEY. See License key.