Skip to main content

Crate bphelper_cli

Crate bphelper_cli 

Source
Expand description

CLI for battery-pack: create and manage battery packs.

Structs§

AddArgs
BatteryPackDetail
Detailed battery pack info
BatteryPackSummary
Summary info for displaying in a list
Cli
ExampleInfo
InstalledPack
Info about an installed battery pack — its spec plus which crates are currently enabled.
NewArgs
OwnerInfo
TemplateInfo

Enums§

AddTarget
BpCommands
Commands
CrateSource
ResolvedAdd
Result of resolving which crates to add from a battery pack.

Functions§

add_battery_pack
add_dep_to_table
Add a dependency to a toml_edit table (non-workspace mode).
collect_user_dep_versions
Collect the user’s actual dependency versions from Cargo.toml (and workspace deps if applicable).
fetch_battery_pack_detail
Fetch detailed battery pack info from crates.io or a local path
fetch_battery_pack_list
Fetch battery pack list, dispatching based on source.
find_installed_bp_names
Extract battery pack crate names from a parsed Cargo.toml.
load_installed_packs
Load all installed battery packs with their specs and active features.
main
Main entry point for the CLI.
read_active_features
Read active features for a battery pack from user’s package metadata.
read_active_features_ws
Read active features from workspace.metadata.battery-pack[bp_name].features.
resolve_add_crates
Pure resolution logic for cargo bp add flags.
resolve_template
sync_dep_in_table
Sync a dependency in-place: update version if behind, add missing features. Returns true if changes were made.
validate_battery_pack_cmd
validate_templates
Validate that each template in a battery pack generates a project that compiles and passes tests.

Type Aliases§

TemplateConfig
Backward-compatible alias for bphelper_manifest::TemplateSpec.