https://github.com/fumeapp/taskin
Add user-friendly tasks to your terminal
https://github.com/fumeapp/taskin
charmbracelet cli golang tasks
Last synced: 7 months ago
JSON representation
Add user-friendly tasks to your terminal
- Host: GitHub
- URL: https://github.com/fumeapp/taskin
- Owner: fumeapp
- License: apache-2.0
- Created: 2024-05-04T21:51:58.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-14T21:15:11.000Z (9 months ago)
- Last Synced: 2025-03-24T20:38:13.105Z (7 months ago)
- Topics: charmbracelet, cli, golang, tasks
- Language: Go
- Homepage:
- Size: 6.98 MB
- Stars: 12
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
📋 Add user-friendly tasks to your terminal

[](https://github.com/fumeapp/taskin/releases)
[](https://goreportcard.com/report/github.com/fumeapp/taskin)
[](https://pkg.go.dev/github.com/fumeapp/taskin)
[](https://github.com/fumeapp/taskin/actions/workflows/lint.yml)
[](https://github.com/fumeapp/taskin/actions/workflows/test.yml)
[](https://github.com/fumeapp/taskin/pulls)
[](https://github.com/fumeapp/taskin/actions/workflows/examples.yml)
[](https://www.phorm.ai/query?projectId=4d6b35fb-2ee0-40a3-ad5f-952dc5f69365)
> [!TIP]
>
> All output is Github Action friendly!
> You can view the output of each example [here](https://github.com/fumeapp/taskin/actions/workflows/examples.yml)
## Installation
```bash
go get github.com/fumeapp/taskin
```
## Examples
Simplest way to line up and fire off tasks
https://github.com/fumeapp/taskin/blob/3cd766c21e5eaba5edb33f38d3781d6cf814f9f9/examples/simple/main.go#L11-L33

Using a progress bar for a task
https://github.com/fumeapp/taskin/blob/06b4d112f7d2dcf9fb4ee9b210f0be2d5cda03b5/examples/progress/main.go#L11-L24

Customize colors, spinner, and progress bar
https://github.com/fumeapp/taskin/blob/3cd766c21e5eaba5edb33f38d3781d6cf814f9f9/examples/custom/main.go#L13-L54

Nest tasks inside tasks
https://github.com/fumeapp/taskin/blob/3cd766c21e5eaba5edb33f38d3781d6cf814f9f9/examples/multi/main.go#L23-L34

## Usage inside a task
The `*taskin.Task` struct passeed into your task has some useful properties that you can use to customize the task view.
### Change the title
Already demonstrated in most of the examples, you can change `t.Title` at any time
### Hide a view
Sometimes you might need to temporarily hide you task view in order to prompt a user for input.
You can do this by toggling the task.HideView boolean.
```go
Task: func(T *taskin.Task ) error {
t.HideView = true
if err := PromptForInput(); err != nil {
t.HideView = false
return err
}
t.HideView = false
t.Title = "Input received"
return nil
}
```