pub enum Command {
Init {
name: String,
dir: Option<PathBuf>,
},
Validate {
path: PathBuf,
max_size_mb: Option<u64>,
no_color: bool,
},
RunExternal {
env: Option<String>,
token: Option<String>,
bot_id: Option<String>,
},
}Variants§
Init
Scaffold a new bot project from the starter template.
Fields
Validate
Run pre-upload checks: size, file_structure, cargo_metadata, imports, bot_impl, decide_method.
Note: there is no --check-connectivity flag (cf. the Python
and JavaScript SDKs). In Rust the protocol-conformance harness
ships as a library function — chipzen_bot::run_conformance_checks
— which runs 4 canned scenarios:
connectivity_full_match— handshake + 1 hand + match_endmulti_turn_request_id_echo— 3 turn_requests, request_id echoaction_rejected_recovery— safe-fallback retry on rejectionretry_storm_bounded— reactive response to 3 back-to-back action_rejected messages
Drive your bot through these from tests/conformance.rs and run
via cargo test. The scaffolded starter at
packages/rust/starters/rust/ includes a working template.
The validator is a courtesy linter — the authoritative gate is server-side seccomp + cap-drop on the bot container.
Fields
RunExternal
Resolve + print the external-API remote-play connection (lobby URL, env, token presence) from chipzen.toml + flags, without connecting.
Unlike Python’s chipzen run-external my_bot.py, the Rust chipzen-sdk
binary cannot dynamically load and run a bot from a file — a Rust bot
is compiled into its own binary. So this subcommand is a config doctor:
it does the same chipzen.toml discovery + env-aware URL resolution
run_external_bot does and reports what it found, so you can verify
your setup before wiring chipzen_bot::run_external_cli into your bot
binary’s main (the scaffolded starter ships a run-external mode
that calls it). The token is never printed.
Trait Implementations§
Source§impl FromArgMatches for Command
impl FromArgMatches for Command
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for Command
impl Subcommand for Command
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand