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<i32>,
        spec_stdin: bool,
    },
    Del {
        id: i64,
    },
    Find {
        status: Option<String>,
        parent: Option<String>,
    },
    Start {
        id: i64,
        with_events: bool,
    },
    Done,
    PickNext {
        format: String,
    },
    SpawnSubtask {
        name: String,
        spec_stdin: bool,
    },
    Switch {
        id: i64,
    },
    Search {
        query: String,
    },
}

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<i32>

Task priority

§spec_stdin: bool

Read spec from stdin

§

Del

Delete a task

Fields

§id: i64

Task ID

§

Find

Find tasks with filters

Fields

§status: Option<String>

Filter by status

§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: Subtasks of the current focused task (depth-first)
  2. Second priority: Top-level tasks (breadth-first)

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

§

Switch

Switch to a specific task (atomic: update to doing + set current)

Fields

§id: i64

Task ID

§

Search

Search tasks by content using full-text search

Fields

§query: String

Search query (supports FTS5 syntax like “bug AND NOT critical”)

Trait Implementations§

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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