Skip to content

soywod/unfog

Repository files navigation

⏱ Unfog Build Status

Minimalist task & time manager, written in Haskell.

image

Table of contents

Concept

Unfog is a minimalist task & time manager. It helps you to track your projects.

A task is composed of a description, an optionnal due time and can be attached to a project. Each task can be started, stopped, done or deleted. Basic reports can be generated to have an overview of the situation.

Here a basic use case of a working day:

  • Set up the context according to the current project
  • Have a look at existing tasks
  • Add new tasks if necessary
  • Pick one and start it
  • Stop it once finished
  • Repeat the two last points during all the day
  • Check the worktime report at the end of the day

At the end of the project, the worktime report shows useful information about how long it took, how the time was spent, if it fit the initial estimation, how it can be improved etc...

Installation

From binaries

curl -sSL https://raw.githubusercontent.com/soywod/unfog/master/bin/install.sh | bash

Note: Linux, OSX and Windows are supported. See the releases section.

From AUR

For Arch Linux users, there is an AUR package available.

git clone https://aur.archlinux.org/unfog.git
cd unfog
makepkg -isc

From sources

First you need to install stack:

curl -sSL https://get.haskellstack.org/ | sh

Then build from git:

git clone https://github.com/soywod/unfog.git
cd unfog
stack install

Completion

By default, only the bash completion is installed (in /etc/bash_completion.d/).

If you are on zsh or fish, you can get the completion file by running one of this command:

# For zsh users
unfog --zsh-completion-script `which unfog`

# For fish users
unfog --fish-completion-script `which unfog`

Note: you will have to source manually those generated files.

Usage

Add

Add a new task:

unfog add DESC [-p|--project PROJECT] [-d|--due DATE]
  • The description is a list of words
  • The project can be a word
  • The due date can be a date, following one of this format:
    • A full ISO datetime string YYYY-MM-DD HH:MM
    • A ISO date string YYYY-MM-DD (the time will be set at 00:00)
    • A ISO time string HH:MM (the date will be set at now)

image

Info

Show more precise information about a specific task:

unfog info ID

image

List

Show all tasks belonging to the current context:

unfog list

image

Edit

Edit a task:

unfog edit ID [DESC] [-p|--project PROJECT] [-d|--due DATE]

image

Start

Start all tasks matching the ids:

unfog start IDs...

Stop

Stop all tasks matching the ids:

unfog stop IDs...

Done

Do all tasks matching the ids:

unfog done IDs...

Undone

Undo all tasks matching the ids:

unfog undone IDs...

Delete

Delete all tasks matching the ids:

unfog delete IDs...

Note: deleted tasks are excluded from any kind of report.

Undelete

Undelete all tasks matching the ids:

unfog undelete IDs...

Context

unfog context [PROJECT]

Define a project as context. Once set up:

  • The list command will show only tasks belonging to this project
  • When you add a new task, it will automatically be attached to this project (except if you override it with the option --project)
  • The worktime will use this project by default if none is given

image

Note: giving an empty context will clear it.

Worktime

unfog worktime [PROJECT] [-f|--from DATE] [-t|--to DATE] [--more]

Show the total amount of time spent on tasks belonging to the given project, grouped by day. If no project given, the context will be used.

You can also filter them with a date range (--from and --to). Date formats are the same as the due date format.

image

The --more option will group tasks by day and by task in order to have a more refined report:

image

Note: the TOTAL WDAY is the total in worktime days, where a worktime day is define by default at 7.5 hours.

Status

Shows the status of the first active task found (desc + active duration):

unfog status

Useful for interface integration. Example with polybar:

[module/unfog]
type = custom/script
exec = unfog status
interval = 10

image

Upgrade

Upgrade the CLI with the latest release from GitHub:

unfog upgrade

image

Clear cache

Clear the state cache (useful when the store is manually modified and does not match the state anymore):

unfog cache:clear

Common options

JSON

By adding the --json option, the output will be printed in JSON format. This is useful to create user interafaces. Here the list of current implementations:

To have more information about the JSON object shape, see Response.hs.

Contributing

Git commit messages follow the Angular Convention, but contain only a subject.

Use imperative, present tense: “change” not “changed” nor “changes”
Don't capitalize first letter
No dot (.) at the end

Code should be as clean as possible, variables and functions use the camel case convention. A line should be as short as possible to improve readability.

Tests should be added for each new functionality. Be sure to run tests before proposing a pull request.

Credits