pub enum Commands {
New {
name: String,
},
Init {
name: Option<String>,
},
Build {
release: bool,
verify: bool,
license: Option<String>,
lib: bool,
target: Option<String>,
},
Verify {
license: Option<String>,
},
Run {
release: bool,
interpret: bool,
args: Vec<String>,
},
Check,
Publish {
registry: Option<String>,
dry_run: bool,
allow_dirty: bool,
},
Login {
registry: Option<String>,
token: Option<String>,
},
Logout {
registry: Option<String>,
},
}Expand description
Available CLI subcommands.
Each variant represents a distinct operation that largo can perform.
Commands are grouped into three categories:
§Project Management
§Build & Run
Build- Compile the projectRun- Build and executeCheck- Type-check without buildingVerify- Run Z3 static verification
§Package Registry
Variants§
New
Create a new LOGOS project in a new directory.
Scaffolds a complete project structure including:
Largo.tomlmanifest filesrc/main.lgentry point with a “Hello, world!” example.gitignoreconfigured for LOGOS projects
§Example
largo new my_project
cd my_project
largo runInit
Initialize a LOGOS project in the current directory.
Similar to New but works in an existing directory.
Creates the manifest and source structure without creating a new folder.
§Example
mkdir my_project && cd my_project
largo initBuild
Build the current project.
Compiles the LOGOS source to Rust, then invokes cargo build on the
generated code. The resulting binary is placed in target/debug/ or
target/release/ depending on the mode.
§Verification
When --verify is passed, the build process includes Z3 static
verification of logical constraints. This requires:
- A Pro+ license (via
--licenseorLOGOS_LICENSEenv var) - The
verificationfeature enabled at build time
§Example
largo build # Debug build
largo build --release # Release build with optimizations
largo build --verify # Build with Z3 verificationFields
license: Option<String>License key for verification.
Can also be set via the LOGOS_LICENSE environment variable.
Verify
Run Z3 static verification without building.
Performs formal verification of logical constraints in the project using the Z3 SMT solver. This catches logical errors that would be impossible to detect through testing alone.
Requires a Pro+ license.
§Example
largo verify --license sub_xxxxx
# Or with environment variable:
export LOGOS_LICENSE=sub_xxxxx
largo verifyFields
Run
Build and run the current project.
Equivalent to largo build followed by executing the resulting binary.
The exit code of the built program is propagated.
With --interpret, skips Rust compilation and uses the tree-walking
interpreter for sub-second feedback during development.
§Example
largo run # Debug mode (compile to Rust)
largo run --release # Release mode
largo run --interpret # Interpret directly (no compilation)Fields
Check
Check the project for errors without producing a binary.
Parses and type-checks the LOGOS source without invoking the full build pipeline. Useful for quick validation during development.
§Example
largo checkPublish
Publish the package to the LOGOS registry.
Packages the project as a tarball and uploads it to the specified
registry. Requires authentication via largo login.
§Pre-flight Checks
Before publishing, the command verifies:
- The entry point exists
- No uncommitted git changes (unless
--allow-dirty) - Valid authentication token
§Example
largo publish # Publish to default registry
largo publish --dry-run # Validate without uploadingFields
Login
Authenticate with the package registry.
Stores an API token for the specified registry. The token is saved
in ~/.config/logos/credentials.toml with restricted permissions.
§Token Acquisition
Tokens can be obtained from the registry’s web interface:
- Visit
{registry}/auth/githubto authenticate - Generate an API token from your profile
- Provide it via
--tokenor interactive prompt
§Example
largo login # Interactive prompt
largo login --token tok_xxxxx # Non-interactiveFields
Logout
Remove stored credentials for a registry.
Deletes the authentication token from the local credentials file.
§Example
largo logoutTrait Implementations§
Source§impl FromArgMatches for Commands
impl FromArgMatches for Commands
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 Commands
impl Subcommand for Commands
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