pub enum TaskCommands {
Add {
name: String,
parent: Option<i64>,
spec_stdin: bool,
},
Get {
id: i64,
with_events: bool,
},
Update {
id: i64,
name: Option<String>,
parent: Option<i64>,
status: Option<String>,
complexity: Option<i32>,
priority: Option<String>,
spec_stdin: bool,
},
Del {
id: i64,
},
List {
status: Option<String>,
parent: Option<String>,
sort_by: Option<String>,
limit: Option<i64>,
offset: Option<i64>,
},
Start {
id: i64,
with_events: bool,
},
Done,
PickNext {
format: String,
},
SpawnSubtask {
name: String,
spec_stdin: bool,
},
DependsOn {
blocked_task_id: i64,
blocking_task_id: i64,
},
Context {
task_id: Option<i64>,
},
}Variants§
Add
Add a new task
Fields
Get
Get a task by ID
Update
Update a task
Fields
Del
Delete a task
List
List tasks with filters
Examples: ie task list # List all tasks ie task list todo # List todo tasks ie task list doing # List doing tasks ie task list done # List done tasks ie task list –limit 20 –offset 0 # Paginate results ie task list –sort-by priority # Sort by priority
Fields
Start
Start a task (atomic: update status + set current)
Done
Complete the current focused task (atomic: check children + update status + clear current) This command only operates on the current_task_id. It will:
-
Check all subtasks are done
-
Update the task status to done
-
Clear the current_task_id
Prerequisites: A task must be set as current (via
current --set <ID>)
PickNext
Intelligently recommend the next task to work on
This command uses a context-aware priority model to recommend a single task:
- First priority: ‘doing’ subtasks of current focused task
- Second priority: ‘todo’ subtasks of current focused task
- Third priority: Top-level ‘doing’ tasks
- Fourth priority: Top-level ‘todo’ tasks
Within the same priority level, ‘doing’ tasks are prioritized over ‘todo’ tasks. The command is non-interactive and does not modify task status.
SpawnSubtask
Create a subtask under current task and switch to it
DependsOn
Switch to a specific task (atomic: update to doing + set current) Add a dependency between tasks
Creates a dependency where BLOCKED_TASK depends on BLOCKING_TASK. The BLOCKING_TASK must be completed before BLOCKED_TASK can be started.
Example: task depends-on 42 41 means Task 42 depends on Task 41
(Task 41 must be done before Task 42 can start)
Fields
Context
Get task context (ancestors, siblings, children)
Shows the full family tree of a task to understand its strategic context. If no task ID is provided, uses the current focused task.
Trait Implementations§
Source§impl Clone for TaskCommands
impl Clone for TaskCommands
Source§fn clone(&self) -> TaskCommands
fn clone(&self) -> TaskCommands
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl FromArgMatches for TaskCommands
impl FromArgMatches for TaskCommands
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for TaskCommands
impl Subcommand for TaskCommands
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for TaskCommands
impl RefUnwindSafe for TaskCommands
impl Send for TaskCommands
impl Sync for TaskCommands
impl Unpin for TaskCommands
impl UnwindSafe for TaskCommands
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more