Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
B

bashful

> 编程语言
Open source

Use a yaml file to stitch together commands and bash snippits and run them with a bit of style. Why? Because your bash script should be quiet and shy-like (...

1.2K stars0 likes0 views
WebsiteGitHub

About

Use a yaml file to stitch together commands and bash snippits and run them with a bit of style. Why? Because your bash script should be quiet and shy-like (...

bashful

This is beta quality! Use at your own risk.

Use a yaml file to stitch together commands and bash snippets and run them with a bit of style. Why? Because your bash script should be quiet and shy-like (...and not such a loud mouth).

"But why would you make this monstrosity?" you ask... because &>/dev/null and | tee -a some.log and set -e; do something; set +e and other similar things is getting annoying. And besides... why shouldn't your bash script output look pretty?

Features:

  • Run bash snippits ('tasks') in series or parallel
  • A nice vertical progress bar to show current task status (with inline realtime stdout/stderr)
  • Download url references to bash scripts and executables
  • Bundle set of scripts and listed resources into a single simi-portable executable
  • Log all task stdout/stderr to a log file
  • ETA for running tasks (that have already been run before)
  • Configuration yaml block to control the behavior/look & feel
  • Detailed error reports when commands fail
  • Control which failing command should halt execution

Installation

Ubuntu/Debian

wget https://github.com/wagoodman/bashful/releases/download/v0.0.10/bashful_0.0.10_linux_amd64.deb
sudo apt install ./bashful_0.0.10_linux_amd64.deb

RHEL/Centos

wget https://github.com/wagoodman/bashful/releases/download/v0.0.10/bashful_0.0.10_linux_amd64.rpm
rpm -i bashful_0.0.10_linux_amd64.rpm

Mac

brew tap wagoodman/bashful
brew install bashful

or download a Darwin build from the releases page.

Go tools

go get github.com/wagoodman/bashful

Getting Started

There are a ton of examples in the example/ dir, but here are a few:

1. The simplest of examples:

tasks:
    - cmd: echo "Hello, World!"

To run it:

bashful run hello.yaml

2. A more realistic example: a build and deployment description

# ci.yaml
tasks:
    - name: Building app
      cmd: go build -ldflags '-linkmode external -extldflags -static -s'
      tags: build

    - name: Packaging app
      cmd: docker build -t my-awesome-app:v1 .
      tags: build

    - name: Publishing image
      cmd: docker push my-awesome-app:v1
      tags: deploy

    - name: Deploying app
      cmd: kubectl run my-awesome-app --image=docker.io/wagoodman/my-awesome-app:v1 --pt=80
      tags: deploy

Run all of the tasks...

bashful run ci.yaml

...Or run just the build steps:

bashful run ci.yaml --tags build

3. Have an installer run things in parallel...

# install.yaml
tasks:
    - name: Installing bridgy
      parallel-tasks: 
        - cmd: sudo apt-get install -y tmux sshfs
        - cmd: pip install --user bridgy

...Or make an installer that downloads and runs everything it needs:

# install.yaml
tasks:
    # The given url gets executed by default
    - name: Installing Cuda and Bazel
      url: https://raw.githubusercontent.com/jasimpson/tensorflow-on-aws/master/toa_part_1of2.sh

    # Or you can control how the url asset () gets used
    - name: Installing Tensorflow
      url: https://raw.githubusercontent.com/jasimpson/tensorflow-on-aws/master/toa_part_2of2.sh
      cmd: source ~/.bashrc && 

Package up the installed into a single executable and give it to someone else to run (must be the same architecture and OS type):

bashful bundle install.yaml
# now you have a new executable called "install.bundle", which can simply be executed
./install.bundle

Note: the bundle feature is pretty experimental right now.

You can even persist environment variables across tasks:

tasks:
  - cmd: export VAR1=isnowset
  - cmd: eval "export VAR2=isnowreallyset"
  - cmd: echo ${VAR1} ${VAR2}

Note: you cannot persist environment variables from a parallel step.

4. Include other yaml files in your bashful run.yaml. This way you can centralize your common yaml snippets for reusability:

# run.yaml

$include: example/common-config.yml

x-reference-data:
  all-apps: &app-names
    - $include example/common-apps.yml

tasks:

  - name: Cloning Repos
    parallel-tasks:
      - name: "Cloning "
        cmd: example/scripts/random-worker.sh 2 
        ignore-failure: true
        for-each: *app-names

  - name: Building Repos
    parallel-tasks:
      - name: "Building "
        cmd: example/scripts/random-worker.sh 1 
        ignore-failure: true
        for-each: *app-names
# example/common-config.yml

config:
  show-failure-report: false
  show-summary-errors: true
  max-parallel-commands: 6
  show-task-times: true
# example/common-apps.yml

- some-lib-4
- utilities-lib
- important-lib
- some-app1
- some-app3

Will generate:

…

5. Pass arbitrary arguments to jobs.

$ bashful run some.yaml first-argument 20

Which can be used as bash $# parameters (in this case $1 and $2):

tasks:
    - name: Show some stuff!
      cmd: echo $1
    - name: Show some other stuff!
      cmd: echo $2

There are a ton of examples in the example/ dir. Go check them out!

Configuration Options

Here is an exhaustive list of all of the config options (in the config yaml block). These options are global options that apply to all tasks within the yaml file:

…

The tasks block is an ordered list of processes to run. Each task has several options that can be configured:

…

There are a ton of examples in the example/ dir. Go check them out!

Runtime Options

…

Wish list

All feature requests are welcome!

  • at least 70% test coverage
  • truly cross platform (windows)
  • Multiple (serial) commands for a single task (cmd: [run something, run another thing])
  • Multiple url references for a single task (url: [https://someurl.com/some-script.sh, https://anotherurl.com/another-script.sh])
  • Allow parallel tasks within parallel tasks (really just allow deeper nesting of any kind of task)
  • Interact with the mouse to see more/less tasks (https://godoc.org/github.com/nsf/termbox-go#Event)

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Gobashbuild-toolgolanginstaller

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言