sake

command module
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 8, 2022 License: MIT Imports: 1 Imported by: 0

README

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

  1. Clone the repo
  2. 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

License

The MIT License (MIT)

Copyright (c) 2022 Samir Alajmovic

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Source: https://github.com/goware/prefixer Singleton module
Source: https://github.com/goware/prefixer Singleton module
dao
run

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL