Sake
sake
is a CLI tool that enables you to run commands on servers via ssh
. Think of it like make
, you define servers and tasks in a declarative configuration file and then run the tasks on the servers.
It has many ergonomic features such as auto-completion
of tasks, servers and tags. Additionally, it includes sub-commands to let you easily
ssh
into servers or docker containers
- list servers/tasks
- create tasks that queries server info and present it in a compact table format
Interested in managing your git repositiories in a similar way? Checkout mani!
Table of Contents
Installation
sake
is available on Linux and Mac.
-
Binaries are available on the release page
-
via cURL
curl -sfL https://raw.githubusercontent.com/alajmo/sake/main/install.sh | sh
-
via Homebrew
brew tap alajmo/sake
brew install sake
-
Via GO install
go get -u github.com/alajmo/sake
Auto-completion is available via sake completion bash|zsh|fish
and man page via sake gen
.
Building From Source
Requires go 1.18 or above.
- Clone the repo
- Build and run the executable
make build && ./dist/sake
Usage
Create a New Sake Config
Run the following command:
$ sake init
Initialized sake in /tmp/sake
- Created sake.yaml
Following servers were added to sake.yaml
Server | Host
-----------+---------
localhost | 0.0.0.0
Run Some Commands
# List all servers
$ sake list servers
Server | Host
-----------+---------
localhost | 0.0.0.0
# List all tasks
$ sake list tasks
Task | Description
------+-------------
ping | Pong
# Run Task
$ sake run ping --all
TASK ping: Pong ************
0.0.0.0 | pong
# Count number of files in each server in parallel
$ sake exec --all --output table --parallel 'find . -type f | wc -l'
Server | Output
-----------+--------
localhost | 1
Documentation
The MIT License (MIT)
Copyright (c) 2022 Samir Alajmovic