Skip to content

feat(smitebot): accept config file support to doctor and build#131

Merged
morehouse merged 1 commit into
morehouse:masterfrom
Ashish-Kumar-Dash:config-passthrough
Jun 29, 2026
Merged

feat(smitebot): accept config file support to doctor and build#131
morehouse merged 1 commit into
morehouse:masterfrom
Ashish-Kumar-Dash:config-passthrough

Conversation

@Ashish-Kumar-Dash

@Ashish-Kumar-Dash Ashish-Kumar-Dash commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #116 , doctor and build now accept a campaign config file as a positional argument, replacing the need to pass paths manually via CLI flags.

CLI flags optionally override individual config values when provided:

 smitebot build campaign.toml
 smitebot build campaign.toml --target cln --coverage
 smitebot doctor campaign.toml
 smitebot doctor campaign.toml --aflpp-path ~/other

Overview

  • Makes the campaign config file optional for doctor and build, users can run these commands with just CLI flags (e.g. smitebot build --target lnd --scenario encrypted_bytes) or with a config file where CLI flags override individual values
  • When no config file is provided, --target and --scenario are required for build, --aflpp-path is required for doctor, and --smite-dir defaults to .
  • Updated README examples to show both standalone and config-based usage

Ref. #70

@Ashish-Kumar-Dash Ashish-Kumar-Dash changed the title feat(smitebot): accept campaign config in doctor and build commands feat(smitebot): accept config file support to doctor and build Jun 23, 2026
@Ashish-Kumar-Dash Ashish-Kumar-Dash marked this pull request as ready for review June 23, 2026 18:56

@NishantBansal2003 NishantBansal2003 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that if we want to preserve the flags, they should override the corresponding fields in the config. This would make the config required while allowing flags to override specific values when provided. It simplifies the model, aligns with many established CLIs, and avoids the overhead of determining which options are required or mutually exclusive, WDYT?

Comment thread smitebot/src/commands/build.rs Outdated
Comment thread smitebot/src/commands/build.rs Outdated
Comment thread smitebot/src/commands/build.rs Outdated
Comment thread smitebot/src/commands/doctor.rs
Comment thread smitebot/src/commands/build.rs Outdated
Comment thread smitebot/src/commands/build.rs Outdated
Comment thread smitebot/src/commands/doctor.rs Outdated
Comment thread smitebot/src/commands/build.rs Outdated
Comment thread smitebot/src/commands/build.rs Outdated
Comment thread smitebot/src/commands/build.rs Outdated
@Ashish-Kumar-Dash Ashish-Kumar-Dash force-pushed the config-passthrough branch 2 times, most recently from 712c24a to 4070d94 Compare June 25, 2026 18:33
Comment thread smitebot/src/commands/build.rs Outdated
Comment thread smitebot/src/commands/doctor.rs Outdated
Comment thread smitebot/src/commands/doctor.rs Outdated
Comment thread smitebot/src/commands/build.rs Outdated

@morehouse morehouse left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready to merge after squash

@morehouse morehouse merged commit 89d739c into morehouse:master Jun 29, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants