A gorgeous TUI menu for go-task/task
Task Dash is a gorgeous manager for user defined scripts. It works well together with go-task since it reads data in the Taskfile.yml format. With Task Dash, you can make it super easy for your developers to browse through, read about, and execute your project's tasks. It combines several elements from the Charm Bracelet TUI libraries. It bundles together features like an interactive task selector, the ability to search for a particular task, and a styled terminal program for viewing markdown files. With Task Dash, you can bundle documentation and scripts into an interactive way for developers to get started as quickly as possible.
This repository is home to a Go CLI boilerplate / template that should be used as a starting point for Go CLI projects. It includes all the common files that are shared across Megabyte Labs projects along with some Go-specific configurations.
There are several ways you can install this CLI. You can:
- Use our bash scripts which will handle everything automatically with as few dependencies as possible
- Compile the program using Go and add it to your
PATH
- Install it via an NPM convienience wrapper
- Download the pre-built binary from the GitLab or GitHub releases page and then place it in your
PATH
If you are looking to install the CLI as quickly as possible then you can run the following script which will install the binary to your /usr/local/bin
folder on macOS or Linux:
curl -sS https://install.doctor/task-dash | bash
Or, if you are on Windows, you can install it by running:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://install.doctor/task-dash?os=win'))
You can install the CLI by compiling it from the source as long as you have a recent version of Go installed:
git clone https://github.com/megabyte-labs/task-dash.git
cd {{#withLast (split repository.github "/")}}this/withLast
go build -o dist/task cmd/task/task.go
sudo mv ./dist/task /usr/local/bin
After you compile the program, you should then move the binary file to a location that is in your PATH
(which is what the last line does in the snippet above).
Every release is bundled into an NPM package that you can install by running the following command:
npm install -g task-dash
If you trust us (and you should not.. trust.. anybody.. EVER), then you can also download the binary directly from the Task Dash GitLab release page or the GitHub release page. After you download the release, you will have to either place the binary somewhere in your PATH
or run the installer (in the case of the .deb
or .rpm
releases, for instance).
All of the usage instructions can be found by running task-dash --help
. After running the command, you should be greeted with the following output:
Usage: task [-ilfwvsd] [--init] [--list] [--force] [--watch] [--verbose] [--silent] [--dir] [--taskfile] [--dry] [--summary] [task...]
Runs the specified task(s). Falls back to the "default" task if no task name
was specified, or lists all tasks if an unknown task name was specified.
Example: 'task hello' with the following 'Taskfile.yml' file will generate an
'output.txt' file with the content "hello".
'''
version: '3'
tasks:
hello:
cmds:
- echo "I am going to write a file named 'output.txt' now."
- echo "hello" > output.txt
generates:
- output.txt
'''
Options:
-c, --color colored output. Enabled by default. Set flag to false or use NO_COLOR=1 to disable (default true)
-C, --concurrency int limit number tasks to run concurrently
-d, --dir string sets directory of execution
-n, --dry compiles and prints tasks in the order that they would be run, without executing them
-x, --exit-code pass-through the exit code of the task command
-f, --force forces execution even when the task is up-to-date
-h, --help shows Task usage
-i, --init creates a new Taskfile.yaml in the current folder
-l, --list lists tasks with description of current Taskfile
-a, --list-all lists tasks with or without a description
--menu show menu
-o, --output string sets output style: [interleaved|group|prefixed]
--output-group-begin string message template to print before a task's grouped output
--output-group-end string message template to print after a task's grouped output
-p, --parallel executes tasks provided on command line in parallel
-s, --silent disables echoing
--status exits with non-zero exit code if any of the given tasks is not up-to-date
--summary show summary about a task
-t, --taskfile string choose which Taskfile to run. Defaults to "Taskfile.yml"
-v, --verbose enables verbose mode
--version show Task version
-w, --watch enables watch of the given task
Alternatively, if you installed the package via NPM or an installer that set up the man page (e.g. .deb
or .rpm
), then you can find usage instructions by running man task-dash
.
Contributions, issues, and feature requests are welcome! Feel free to check the issues page. If you would like to contribute, please take a look at the contributing guide.
Sponsorship
Dear Awesome Person,
I create open source projects out of love. Although I have a job, shelter, and as much fast food as I can handle, it would still be pretty cool to be appreciated by the community for something I have spent a lot of time and money on. Please consider sponsoring me! Who knows? Maybe I will be able to quit my job and publish open source full time.
Sincerely,
Brian Zalewski
Copyright © 2020-2021 Megabyte LLC. This project is MIT licensed.