Skip to main content

Command

Enum Command 

Source
pub enum Command {
Show 14 variants List(ListArgs), Init(Option<String>, Option<String>), InitAll, Deinit(bool), Hook(HookEvent), Status, Report(ReportArgs), Entries(EntryArgs), Path, Update, Completions(Shell), Complete(Candidates), Version, Help,
}
Expand description

What to do, as chosen on the command line.

Variants§

§

List(ListArgs)

list: print tasks as markdown.

§

Init(Option<String>, Option<String>)

init [NAME] [--repo REPO]: make the current directory a project, named NAME or after the folder, and the repository REPO in it.

§

InitAll

init --all: bring every registered repository’s agent instructions up to this version’s.

§

Deinit(bool)

deinit [--purge]: undo init for the current directory’s project, or the one --project names; true also deletes its .brain/.

§

Hook(HookEvent)

hook prompt|stop: what Claude Code’s hooks run (see [hook]).

§

Status

status: print the running tasks for status bars.

§

Report(ReportArgs)

report: print a time report as markdown.

§

Entries(EntryArgs)

add, show, search, start, comment, …: entries by id, for agents and scripts.

§

Path

path: print the data folder.

§

Update

update: install the latest release.

§

Completions(Shell)

completions SHELL: print a tab completion script.

§

Complete(Candidates)

complete ids|projects|tags …: what the completion scripts offer, one per line. The words after it are the command line being completed, ignored but for its --project.

§

Version

--version / -V.

§

Help

--help / -h.

Implementations§

Source§

impl Command

Source

pub fn parse(args: impl IntoIterator<Item = String>) -> Result<Self>

Parses the arguments after the program name.

Source

pub fn run(self, program: Program, project: Option<&str>) -> Result<()>

Runs the command on the brain of project (by name), else the one found from here. Everything except --version and --help refuses to run as root.

Trait Implementations§

Source§

impl Debug for Command

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Command

Source§

impl PartialEq for Command

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Command

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.