No description
- Rust 97.3%
- Nix 2.6%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
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
`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>
|
||
| .hooks | ||
| .moira | ||
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| cog.toml | ||
| flake.lock | ||
| flake.nix | ||
| README.md | ||
| renovate.json | ||
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