Skip to content

Add -I/--important flag to new command#87

Open
underwear wants to merge 1 commit intokiblee:masterfrom
underwear:add-important-flag
Open

Add -I/--important flag to new command#87
underwear wants to merge 1 commit intokiblee:masterfrom
underwear:add-important-flag

Conversation

@underwear
Copy link
Copy Markdown
Contributor

@underwear underwear commented Feb 4, 2026

Summary

  • Adds -I/--important boolean flag to the new command
  • When set, sends "importance": "high" in the Graph API request body using the existing TaskImportance enum
  • Defaults to "normal" importance when flag is not provided

Usage

todocli new -I "urgent task"
todocli new --important -l "Work" "urgent task"

Changes

  • todocli/cli.py — add -I/--important argument, pass it to create_task()
  • todocli/graphapi/wrapper.py — accept important param, set "importance" field in request body
  • tests/test_cli_commands.py — 4 new tests for the flag (short, long, default, combined with other flags)

Test plan

  • All 35 unit tests pass (python -m pytest tests/test_cli_commands.py)
  • black --check passes on all changed files
  • Manual test: todocli new -I "TEST important" → verified importance: "high" via API

Closes #84

Adds support for creating tasks with high importance via the
`-I`/`--important` flag on the `new` command. When set, sends
`"importance": "high"` in the Graph API request body.

Closes kiblee#84
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for setting task importance (star/important flag)

1 participant