展示HN:Tascli,一个基于命令行的人工任务和记录管理器
Show HN: Tascli, a command line based (human) task and record manager

原始链接: https://github.com/Aperocky/tascli

## tascli:一个简单的命令行任务与记录追踪器 tascli 是一个快速、本地的 CLI 工具,用于直接从 Unix 终端管理任务和记录。它将数据存储在 SQLite 数据库中(`~/.local/share/tascli/tascli.db` – 可通过 `config.json` 配置)。 **任务:** 使用灵活的时间字符串(“today”、“tomorrow”、“4/15”、“weekly Friday”)创建带截止日期的任务,并使用 `-c` 对其进行分类。支持重复任务(“daily”、“monthly 17th”)。使用 `tascli list task` 列出任务,使用 `--search` 搜索,或按类别过滤。使用 `tascli done [index]` 将任务标记为完成。 **记录:** 使用 `tascli record` 追踪事件,指定类别(`-c`)和可选时间戳(`-t`)。使用 `tascli list record` 列出记录,按日期过滤(`-d 1` 表示最后一天),或搜索。 **主要特点:** * **灵活的时间戳:** 支持各种日期和时间格式。 * **重复任务:** 轻松安排重复任务。 * **可搜索:** 快速查找任务和记录。 * **可配置:** 自定义数据库位置。 使用 `cargo install tascli` 或 `brew tap Aperocky/tascli && brew install tascli` 安装。使用 `tascli --help` 获取详细的命令选项。

Hacker News 新闻 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 展示 HN: Tascli,一个基于命令行(人工)任务和记录管理器 (github.com/aperocky) 6 分,作者 Aperocky 1 小时前 | 隐藏 | 过去 | 收藏 | 讨论 `cargo install tascli` 使用 tascli 简单管理你的任务和记录,它体积小、速度快、简单易用。 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系方式 搜索:
相关文章

原文

Crates.io tests benchmark Downloads

A simple, fast, local CLI tool for tracking tasks and records from unix terminal.

Installation:

cargo install tascli
# or use brew
brew tap Aperocky/tascli
brew install tascli

tascli demo

Tasks and records are stored in ~/.local/share/tascli/tascli.db (configurable) with rusqlite.

Create tasks with deadlines:

# Basic tasks
tascli task "Create readme" today
tascli task "Publish package" tomorrow
tascli task "Do taxes" 4/15

# With category
tascli task -c work "Read emails" week

Create recurring tasks:

tascli task "write diary" daily
tascli task "mortgage payment" "monthly 17th"

List tasks:

# List active tasks
$ tascli list task

output:

Task List:
----------------------------------------------------------------------------------------------
| Index  | Category            | Content                               | Deadline            |
----------------------------------------------------------------------------------------------
| 1      | life (recurring)    | write diary                           | Today               |
----------------------------------------------------------------------------------------------
| 2      | tascli              | Add pagination capability for tascli  | Sunday              |
|        |                     | list actions                          |                     |
----------------------------------------------------------------------------------------------
| 3      | tascli              | Add readme section on timestring      | Sunday              |
|        |                     | format                                |                     |
----------------------------------------------------------------------------------------------
| 4      | life                | Do state taxes                        | Sunday              |
----------------------------------------------------------------------------------------------
| 5      | tascli              | Sort list output by time instead of   | Sunday              |
|        |                     | internal id                           |                     |
----------------------------------------------------------------------------------------------
| 6      | tascli              | Fix length issue for unicode chars    | Sunday              |
----------------------------------------------------------------------------------------------
| 7      | life                | Two month pictures - follow the lead  | 4/23                |
|        |                     | from the previous one month pictures  |                     |
----------------------------------------------------------------------------------------------

Complete tasks:

# Mark index 1 as done
tascli done 1

Completing a task or a recurring tasks will generate a corresponding record.

Search tasks:

tascli list task --search "rust"

List all tasks in tascli category (including completed)

tascli list task -s all -c tascli

Example output:

Task List:
----------------------------------------------------------------------------------------------
| Index  | Category            | Content                               | Deadline            |
----------------------------------------------------------------------------------------------
| 1      | baby (Recurring)    | Mix egg yolk milk for Rowan           | Daily (fulfilled)   |
----------------------------------------------------------------------------------------------
| 2      | tascli              | Fix addition and modification commands| Today (completed)   |
|        |                     | output to have N/A for index          |                     |
----------------------------------------------------------------------------------------------
| 3      | tascli              | Insert guardrail against accidental   | Today (completed)   |
|        |                     | valid syntax like 'task list' that is |                     |
|        |                     | mistakenly made                       |                     |
----------------------------------------------------------------------------------------------
| 4      | tascli              | Create a gif for readme               | Today (completed)   |
----------------------------------------------------------------------------------------------
| 5      | tascli              | Add pagination capability for tascli  | Sunday              |
|        |                     | list actions                          |                     |
----------------------------------------------------------------------------------------------
| 6      | tascli              | Add readme section on timestring      | Sunday              |
|        |                     | format                                |                     |
----------------------------------------------------------------------------------------------

Create records (for tracking events):

# With current time
tascli record -c feeding "100ML"

# With specific time
tascli record -c feeding -t 11:20AM "100ML"

List records:

# -d 1 stand for only get last 1 day of record
tascli list record -d 1

Search records:

tascli list record --search "secret"

Example output:

Records List:
----------------------------------------------------------------------------------------------
| Index  | Category            | Content                               | Created At          |
----------------------------------------------------------------------------------------------
| 1      | feeding             | 110ML                                 | Today 1:00AM        |
----------------------------------------------------------------------------------------------
| 2      | feeding             | breastfeeding                         | Today 4:10AM        |
----------------------------------------------------------------------------------------------
| 3      | feeding             | 100ML                                 | Today 7:30AM        |
----------------------------------------------------------------------------------------------
| 3      | life (Recurring)    | write diary                           | Today 10:30AM       |
----------------------------------------------------------------------------------------------
| 4      | feeding             | 110ML                                 | Today 11:20AM       |
----------------------------------------------------------------------------------------------

This application accepts flexible time strings in various formats:

  • Simple dates: today, tomorrow, yesterday, friday, eom (end of month), eoy (end of year)
  • Date formats: YYYY-MM-DD, MM/DD/YYYY, MM/DD (current year)
  • Time formats: HH:MM, 3:00PM, 3PM
  • Combined: 2025-03-24 15:30, tomorrow 3PM

When only a date is provided, the time defaults to end of day (23:59:59). When only a time is provided, the date defaults to today.

Recurring Formats (schedules) are applicable to tasks:

  • Recurring Formats: daily, daily 9PM, weekly, weekly Friday 9AM, weekly mon-fri, monthly 1st
  • Recurring Formats (II): every day, every 9PM, every monday, every 9th of the month, every 2/14

If storing the db file in location other than ~/.local/share/tascli/tascli.db is preferred, create a config file:

{
    "data_dir": "/where/you/want/it"
}

at ~/.config/tascli/config.json to adjust the location of the stored file. Note, if you already have existing tasks, you may want to move/copy the db file there first.

tascli uses clap for argument parsing, use --help to get help on all levels of this cli:

aperocky@~$ tascli -h
Usage: tascli <COMMAND>

Commands:
  task    add task with end time
  record  add record
  done    Finish tasks
  update  Update tasks or records wording/deadlines
  delete  Delete Records or Tasks
  list    list tasks or records
  help    Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version
aperocky@~$ tascli task -h
add task with end time

Usage: tascli task [OPTIONS] <CONTENT> [TIMESTR]

Arguments:
  <CONTENT>  Description of the task
  [TIMESTR]  Time the task is due, default to EOD

Options:
  -c, --category <CATEGORY>  Category of the task
  -h, --help                 Print help
联系我们 contact @ memedata.com