pub struct Config {
pub review: bool,
pub commit: bool,
pub pull_request: bool,
pub pull_request_draft: bool,
pub worktree: bool,
pub worktree_path_pattern: String,
pub worktree_cleanup: bool,
}Expand description
Configuration for controlling which states are executed in the autom8 state machine.
This struct represents the user’s preferences for which steps of the automation pipeline should be executed. Each field corresponds to a state in the state machine.
§Default Behavior
By default, all states are enabled (true), meaning the full pipeline runs:
review → commit → pull request.
§Serialization
This struct supports TOML serialization via serde. Missing fields in a config file
will default to true, allowing partial configs to work correctly.
§Example
# Enable/disable the review state (code review before committing)
review = true
# Enable/disable the commit state (creating git commits)
commit = true
# Enable/disable the pull request state (creating PRs)
pull_request = trueFields§
§review: boolWhether to run the review state.
When true, code changes are reviewed before committing.
When false, the review step is skipped.
commit: boolWhether to run the commit state.
When true, changes are committed to git.
When false, changes are left uncommitted.
pull_request: boolWhether to run the pull request state.
When true, a pull request is created after committing.
When false, no PR is created.
pull_request_draft: boolWhether to create pull requests in draft mode.
When true, PRs are created as drafts (not ready for review).
When false, PRs are created as regular (ready for review) PRs.
Note: Only applies when pull_request = true. Has no effect otherwise.
worktree: boolWhether to automatically create worktrees for runs.
When true, autom8 creates a dedicated worktree for each run,
enabling multiple parallel sessions for the same project.
When false, autom8 runs on the current branch (default behavior).
Note: Requires a git repository. Has no effect outside of git repos.
worktree_path_pattern: StringPattern for worktree directory names.
Placeholders:
{repo}- The repository name{branch}- The branch name (slugified: slashes replaced with dashes)
Default: {repo}-wt-{branch}
Example: For repo “myproject” and branch “feature/login”, creates “myproject-wt-feature-login”
worktree_cleanup: boolWhether to remove worktrees after successful completion.
When true, autom8 automatically removes the worktree directory after
a successful run (Completed state). Failed runs keep their worktrees.
When false, worktrees are preserved for manual inspection/cleanup.
Note: Only applies when worktree = true. Has no effect otherwise.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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