Closed charles37 closed 2 months ago
Can we rename this tool to something easier to type? Realistically I expect this to the one of the primary interfaces that users will use to interact with treadmill, so we might as well call it tml
? I don't think this collides with any existing, popular package either.
Alternatively we can call it treadmill-cli
, and use tml
as an alias.
Edit: it seems like tml
as a crates.io package is taken. Let's perhaps call the crate treadmill-cli
then, and have it's binary be tml
.
Should the switchboard token file also be under XDG_CONFIG?
Right now the options formatting is broken, see the new CI job to see example. I am hoping to get the job list command working soon as well
Switchboard CLI
Switchboard CLI is a command-line interface tool for interacting with the Switchboard API. It provides functionality for user authentication, job management, and system interactions.
Features
Usage
Options
-c, --config <FILE>
: Sets a custom config file-u, --api-url <URL>
: Sets the API URL directly--log
: Enable loggingSubcommands
Login
Job Management
Enqueue a job:
Options for job enqueue:
--ssh-keys <KEYS>
: Comma-separated list of SSH public keys--restart-count <COUNT>
: Remaining restart count--rendezvous-servers <SERVERS>
: JSON array of rendezvous server specifications--parameters <PARAMS>
: JSON object of job parameters--tag-config <CONFIG>
: Tag configuration--override-timeout <TIMEOUT>
: Override timeout in secondsCheck job status:
Cancel a job:
Configuration
The CLI can be configured using a TOML file. By default, it looks for
~/.switchboard_config.toml
, but you can specify a custom path using the-c
option.Example configuration:
Building
To build the project:
Examples
Login:
Enqueue a job with all options:
Check job status:
Cancel a job: