TaskCommands

Enum TaskCommands 

Source
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>,
    },
    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

§name: String

Task name

§parent: Option<i64>

Parent task ID

§spec_stdin: bool

Read spec from stdin

§

Get

Get a task by ID

Fields

§id: i64

Task ID

§with_events: bool

Include events summary

§

Update

Update a task

Fields

§id: i64

Task ID

§name: Option<String>

New task name

§parent: Option<i64>

New parent task ID

§status: Option<String>

New status

§complexity: Option<i32>

Task complexity (1-10)

§priority: Option<String>

Task priority (critical, high, medium, low)

§spec_stdin: bool

Read spec from stdin

§

Del

Delete a task

Fields

§id: i64

Task ID

§

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

Fields

§status: Option<String>

Filter by status (todo, doing, done)

§parent: Option<String>

Filter by parent ID (use “null” for no parent)

§

Start

Start a task (atomic: update status + set current)

Fields

§id: i64

Task ID

§with_events: bool

Include events summary

§

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:

  1. First priority: ‘doing’ subtasks of current focused task
  2. Second priority: ‘todo’ subtasks of current focused task
  3. Third priority: Top-level ‘doing’ tasks
  4. 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.

Fields

§format: String

Output format (text or json)

§

SpawnSubtask

Create a subtask under current task and switch to it

Fields

§name: String

Subtask name

§spec_stdin: bool

Read spec from stdin

§

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

§blocked_task_id: i64

Task ID that has the dependency (blocked task)

§blocking_task_id: i64

Task ID that must be completed first (blocking task)

§

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.

Fields

§task_id: Option<i64>

Task ID (optional, uses current task if omitted)

Trait Implementations§

Source§

impl Clone for TaskCommands

Source§

fn clone(&self) -> TaskCommands

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl FromArgMatches for TaskCommands

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for TaskCommands

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,