minop

command module
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: GPL-3.0 Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

MINOP

A simple tool for remote task orchestration and batch execution.

English · 简体中文

Action Status Codecov Go Report Card Go Reference Git tag Go Version


Installation

Install from Source

To install minop from source, ensure you have Go installed and run:

go install github.com/cqroot/minop@latest

Download Pre-compiled Binaries

Download the binary for your platform from the releases page and add its directory to your system's PATH.

Usage

minop reads two configuration files:

File Flag Purpose
hosts.yaml -H / --hosts-file Hosts grouped by role. Stable across runs; usually version-controlled.
minop.yaml -t / --task Tasks to execute. Changes from run to run.

Both files are looked up in the current working directory by default.

Hosts File (hosts.yaml)

A flat YAML map from role name to a list of host strings in the format <user>:<password>@<address>:<port>. The role named all is special: every task targets it unless the task specifies a different role.

all:
  - root:PASSWORD@127.0.0.1:8001

main:
  - root:PASSWORD@127.0.0.1:8002
  - root:PASSWORD@127.0.0.1:8003

Tasks File (minop.yaml)

A list of tasks under the tasks key. Each task supports one of three operation types: copy, shell, or local.

tasks:
  - name: Copy file to the remote host
    copy: test.txt
    to: /tmp/test.txt

  - name: Copy directory to the remote host
    copy: testdir
    to: /tmp/testdir

  - name: List /tmp on the remote host
    shell: ls /tmp

Run Tasks

minop run                   # use ./hosts.yaml and ./minop.yaml
minop run -H ./prod-hosts.yaml  # custom hosts file
minop run -t ./deploy.yaml      # custom tasks file
minop run -p 20                 # run with concurrency 20 (default 10)

Inspect Configuration

minop host                  # show the parsed hosts as a tree
minop task                  # list the tasks defined in minop.yaml
minop check                 # validate minop.yaml and list its tasks

Interactive CLI

minop cli                   # REPL: type a command, hit Enter, run on every host

Type exit (or quit) to leave the CLI, and help to see built-in shortcuts.

Contributing

Contributions are welcome! Feel free to open an issue to report bugs, suggest new features, or submit a pull request.

License

This project is open source, licensed under the GPL-3.0 License.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
cli

Jump to

Keyboard shortcuts

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