codenoid / sake

sake is a CLI tool that helps you configure servers, think of it like make but for servers

Home Page:https://sakecli.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status Release License Go Report Card

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 config 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

demo

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 install github.com/alajmo/sake@latest

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.

  1. Clone the repo
  2. Build and run the executable (for your target platform)
    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

License

The MIT License (MIT)

Copyright (c) 2022 Samir Alajmovic

About

sake is a CLI tool that helps you configure servers, think of it like make but for servers

https://sakecli.com

License:MIT License


Languages

Language:Go 84.7%Language:Roff 13.1%Language:Shell 1.6%Language:Makefile 0.6%