Giter Site home page Giter Site logo

megabyte-labs / task-dash Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 3.21 MB

A gorgeous TUI menu for go-task/task

Home Page: https://megabyte.space

License: Other

Ruby 2.84% Dockerfile 0.05% Shell 17.47% JavaScript 0.52% Go 78.89% PowerShell 0.23%
automation cli go go-lang golang mblabs megabytelabs professormanhattan terminal washingtondc

task-dash's Introduction

Task Dash - A TUI for Scripts



A gorgeous TUI menu for go-task/task


Table of Contents

Overview

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.

Go CLI Boilerplate

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.

Installation

There are several ways you can install this CLI. You can:

  1. Use our bash scripts which will handle everything automatically with as few dependencies as possible
  2. Compile the program using Go and add it to your PATH
  3. Install it via an NPM convienience wrapper
  4. Download the pre-built binary from the GitLab or GitHub releases page and then place it in your PATH

Quick Method

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'))

Compile Program with Go

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

NPM Install Method

Every release is bundled into an NPM package that you can install by running the following command:

npm install -g task-dash

Pre-Built Binary

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

Usage

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

Man Page

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.

Contributing

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

Open Collective sponsors GitHub sponsors Patreon

License

Copyright Β© 2020-2021 Megabyte LLC. This project is MIT licensed.

task-dash's People

Contributors

professormanhattan avatar semantic-release-bot avatar yusufmalikul avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

gedw99

task-dash's Issues

naming clash

πŸ’‘ Feature/Idea

task-dash OR task ?

there is both naming even in the README, which is confusing.

Suggest "task-dash"

πŸ‘ Can you contribute?

No response

`task --menu` fails when running it on this project -- requires task --menu --taskfile Taskfile.yml

❔ What are you experiencing an issue with?

Latest Release

❔ Version

this

🐞 Description

task --menu fails when running it on this project -- requires task --menu --taskfile Taskfile.yml

⏺️ Steps To Reproduce

npm run build
task --menu

πŸ“’ Relevant Log Output

❯ ./task --menu
yaml: input error: read /Users/bzalewski/task-dash: is a directory
❯ ./task --menu --taskfile Taskfile.yml # works

πŸ’‘ Possible Solution

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.