No description
  • Rust 97.3%
  • Nix 2.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
JMARyA d4b63ad620
Some checks are pending
moira/test moira/test — succeeded
moira/flake/packages.default@x86_64-linux packages.default — queued
moira/flake/checks.vk@x86_64-linux checks.vk — queued
moira/flake/checks.vk-clippy@x86_64-linux checks.vk-clippy — queued
moira/flake/checks.vk-doc@x86_64-linux checks.vk-doc — queued
moira/flake/checks.vk-fmt@x86_64-linux checks.vk-fmt — queued
fix: handle omitted zero-valued fields from Vikunja 2.4.0
`vk prj ls` panicked on every server running 2.4.0 or newer:

  thread 'main' panicked at src/ui/project.rs:18:42:
  called `Option::unwrap()` on a `None` value

Vikunja 2.4.0 switched its structs to omitzero, so zero-valued fields
are dropped from the JSON rather than sent as 0 or "". ModelsProject is
unchanged between 2.1.0 and 2.5.0, which is why this still compiled —
but a top-level project used to arrive as parent_project_id: 0 and now
arrives with the field absent, so serde yields None. The generated
client spells the new behaviour out on ModelsTask.deleted_at: "omitzero
keeps the field out of the JSON of regular tasks".

Every field that is legitimately zero or empty is affected, so this
fixes the class rather than the one call site:

  - parent_project_id: absent and 0 both mean "top level"
  - hex_color: absent and "" both mean "no colour", for projects and
    for labels — an uncoloured label would have panicked identically
  - title: absent and "" both mean "untitled"

list_projects also returned via get(&0).unwrap(), which panicked when
an account had no top-level projects at all; it now returns cleanly.
The duplicated colour branches collapse into project_color().

Carries the rustfmt and clippy cleanup for these files, including the
allow(dead_code) markers noted below.

Refs #26

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 11:35:54 +02:00
.hooks add cog 2025-12-02 11:41:51 +01:00
.moira fix: ci 2026-05-18 09:34:18 +02:00
src fix: handle omitted zero-valued fields from Vikunja 2.4.0 2026-08-17 11:35:54 +02:00
.gitignore init 2024-06-06 08:48:36 +02:00
Cargo.lock chore(deps): upgrade all crates and vikunjars to 2.5.0 2026-08-17 11:35:35 +02:00
Cargo.toml chore(deps): upgrade all crates and vikunjars to 2.5.0 2026-08-17 11:35:35 +02:00
cog.toml add cog 2025-12-02 11:41:51 +01:00
flake.lock fix: nix build 2026-01-21 22:01:46 +01:00
flake.nix ci: declare moiraFlake so the crane checks actually get built 2026-08-07 21:56:22 +02:00
README.md docs: rewrite README with new vision and config design 2026-03-02 17:56:27 +01:00
renovate.json Add renovate.json 2026-03-21 03:02:20 +00:00

vk

A fast, opinionated terminal interface for Vikunja. Built for people who live in the terminal.

  ◆  Fix authentication bug           [Hydra]      ★   2d ago
  ◆  Update README                    [vk]              just now
  ◆  Design CLI vision                [vk]          ★   just now
  ◆  vikunja-rs patches               [Sidequest]       overdue 2d

Install

cargo install --git https://git.hydrar.de/jmarya/vk

Setup

vk stores its config at ~/.config/vk.toml.

Login with your credentials:

vk login --host vikunja.example.com --username user --password pass
vk login --host vikunja.example.com --username user --password pass --totp 123456

Or set up the config manually with an API token:

host  = "https://vikunja.example.com"
token = "your-api-token"

Usage

vk                   # your tasks
vk -d                # include done tasks
vk -f                # favorites only
vk --from myproject  # tasks from a specific project
vk -l mylabel        # tasks with a specific label
vk stats             # dashboard with stats overview

Tasks:

vk new "fix the bug"                         # create in default project
vk new "fix the bug" --project myproject     # create in specific project
vk new "fix the bug" --due 2024-12-31        # with due date
vk new "fix the bug" --label urgent          # with label
vk new "fix the bug" --priority 4           # with priority

vk info 42           # full task detail
vk edit 42           # edit a task
vk done 42           # mark as done
vk done -u 42        # undo
vk fav 42            # mark as favorite
vk fav -u 42         # undo
vk rm 42             # delete

Comments:

vk comments 42       # show comments
vk comment 42 "text" # post a comment

Relations:

vk relation 7 parent 42    # make #42 a parent of #7
vk relation 42 blocked 7   # mark #42 as blocked by #7
vk relation 42 sub 7       # make #7 a subtask of #42
vk relation --delete 42 blocked 7

Assignments:

vk assign user 42    # assign user to task
vk assign -u user 42 # unassign

Labels:

vk label urgent 42   # add label to task
vk label -u urgent 42

vk labels ls
vk labels new urgent --color ff0000
vk labels rm urgent

Projects:

vk prj ls
vk prj add "My Project" --description "..." --color 8800ff
vk prj add "Sub Project" --parent "My Project"
vk prj rm "My Project"

Configuration

Full config reference with defaults:

host  = "https://vikunja.example.com"
token = "your-token"

# display
bullet          = "◆"        # task bullet — any string works
show_id         = false       # show task ID in the list
show_age        = true        # show relative timestamp
show_labels     = false       # show label chips in the task list
date_format     = "relative"  # "relative" | "absolute" | "hidden"

# behaviour
default_view    = "tasks"     # what `vk` shows with no args: "tasks" | "stats"
default_project = "Inbox"     # project used by `vk new` when --project is omitted
page_size       = 25          # tasks shown in list view
sort_by         = "created"   # "created" | "due" | "priority" | "updated"
order           = "desc"      # "asc" | "desc"

# vk stats
stats_logo      = true        # show ASCII logo in stats view