Tue Feb 7 11:00:49 AM 2023
We've happy to release the first version of our command line interface (CLI). It's fully open source, with official binary releases for most platforms, including Linux, macOS, NetBSD, FreeBSD, OpenBSD, Windows and Solaris.
Getting set up is pretty easy. Once you've got the program installed on your machine, try running the program without any arguments:
% ttyops usage: ttyops <command> [<args>] The commands are: alert Create, list, ack and resolve alerts service List services schedule List schedules and see who's on-call version List ttyops version information 'ttyops <subcommand>' to show usage for each subcommand.
You'll want to configure the app with an API token, available on the dashboard for your team. With that token, an example config could be created such as:
mkdir -p ~/.config/ttyops cat << EOF > ~/.config/ttyops/config.toml token = "Bearer <token>" endpoint = "https://ttyops.com/api/v1" EOF
Make sure to fill in the token with the secret token. Now, you can list alerts for your team and see who's on-call for each schedule:
% ttyops alert list ID TITLE STATUS SERVICE ASSIGNED 5137c935 InstanceDown firing default email@example.com % ttyops schedule list NAME ON-CALL always on-call firstname.lastname@example.org
Creating and ack/resolving alerts works like you'd expect, too:
% ttyops service list NAME default alert created % ttyops alert list ID TITLE STATUS SERVICE ASSIGNED 5137c935 InstanceDown firing default email@example.com 7c018c76 OnFire firing default firstname.lastname@example.org % ttyops alert ack 7c018c76 alert acknowledged % ttyops alert list ID TITLE STATUS SERVICE ASSIGNED 5137c935 InstanceDown firing default email@example.com 7c018c76 OnFire acknowledged default firstname.lastname@example.org