### Executing sp Commands via Shell Source: https://github.com/alexykn/sp/blob/main/README.md Provides command-line examples demonstrating various operations of the `sp` package manager, including getting help, updating package metadata, searching, viewing information, installing packages (bottles and casks), installing formulae from source, uninstalling, reinstalling, and upgrading packages. It also lists commands planned for future releases. ```sh # Print help sp --help # Update metadata sp update # Search for packages sp search # Get package info sp info # Install bottles or casks sp install # Build and install a formula from source sp install --build-from-source # Uninstall sp uninstall # Reinstall sp reinstall #Upgrade sp upgrade or --all # (coming soon) sp cleanup sp init ``` -------------------------------- ### Running sp Nightly Build for Help Source: https://github.com/alexykn/sp/blob/main/README.md Demonstrates how to execute the `sp` nightly build binary directly from the current directory after removing the quarantine attribute. The example shows running the binary with the `--help` flag to display the command's usage information. ```sh ./sp --help ``` -------------------------------- ### Installing Rust Nightly Toolchain (Bash) Source: https://github.com/alexykn/sp/blob/main/CONTRIBUTING.md Installs the Rust nightly toolchain using rustup. This toolchain is required specifically for code formatting due to the use of unstable options in the project's rustfmt configuration. ```Bash rustup toolchain install nightly ``` -------------------------------- ### Installing macOS Dependencies with Homebrew (Bash) Source: https://github.com/alexykn/sp/blob/main/CONTRIBUTING.md Installs common system-level dependencies using the Homebrew package manager on macOS. `pkg-config` and `cmake` are often required by Rust crates that link against native libraries. ```Bash brew install pkg-config cmake ``` -------------------------------- ### Adding Rustup Components rustfmt and clippy (Bash) Source: https://github.com/alexykn/sp/blob/main/CONTRIBUTING.md Installs the `rustfmt` and `clippy` components for the currently active Rust toolchains using the rustup toolchain manager. These components are necessary for code formatting and linting. ```Bash rustup component add rustfmt clippy ``` -------------------------------- ### Installing Xcode Command Line Tools on macOS (Bash) Source: https://github.com/alexykn/sp/blob/main/CONTRIBUTING.md Installs the essential Xcode Command Line Tools package on macOS. This provides necessary development utilities like `git`, `clang` (C compiler), and other tools required for building projects, including those with native dependencies. ```Bash xcode-select --install ``` -------------------------------- ### Building sp from Rust Source Source: https://github.com/alexykn/sp/blob/main/README.md Details the steps required to build the `sp` package manager executable from its source code using the Rust toolchain. Prerequisites include a stable Rust toolchain. The commands clone the repository, change the current directory to the repository root, and compile the project in release mode. ```sh git clone cd sp cargo build --release ``` -------------------------------- ### Formatting Rust Code with Cargo and Nightly (Bash) Source: https://github.com/alexykn/sp/blob/main/CONTRIBUTING.md Formats the entire project's Rust code using `cargo fmt`. It explicitly uses the nightly toolchain, which is necessary to apply the custom formatting rules defined in `rustfmt.toml` that utilize unstable options. ```Bash cargo +nightly fmt --all ``` -------------------------------- ### Running Rust Project Tests with Cargo (Bash) Source: https://github.com/alexykn/sp/blob/main/CONTRIBUTING.md Executes all unit and integration tests defined within the project's workspace using the default stable Rust toolchain. All tests must pass before submitting a contribution. ```Bash cargo test --workspace ``` -------------------------------- ### Cloning and Branching sp Project (Bash) Source: https://github.com/alexykn/sp/blob/main/CONTRIBUTING.md Clones the project repository from GitHub using the contributor's fork and creates a new feature branch for development, following a 'feat/' naming convention. ```Bash git clone https://github.com//sp.git cd sp git checkout -b feat/ ``` -------------------------------- ### Pushing Feature Branch to Origin (Bash) Source: https://github.com/alexykn/sp/blob/main/CONTRIBUTING.md Pushes the local feature branch (following the `feat/` naming) to the remote repository named `origin`. This is typically the contributor's personal fork on GitHub. ```Bash git push origin feat/ ``` -------------------------------- ### Linting Rust Code with Cargo Clippy (Bash) Source: https://github.com/alexykn/sp/blob/main/CONTRIBUTING.md Runs the Clippy linter across the entire workspace using the default stable toolchain. The command includes flags to enable all features, all targets, and treats all lint warnings as errors (`-D warnings`). ```Bash cargo clippy --workspace --all-targets --all-features -- -D warnings ``` -------------------------------- ### Committing Changes with Conventional Commit and DCO (Bash) Source: https://github.com/alexykn/sp/blob/main/CONTRIBUTING.md Creates a Git commit using a conventional commit message format (e.g., `feat(scope): message`). The `-s` flag adds the Developer Certificate of Origin signature to the commit. ```Bash git commit -s -m "feat(core): add new fetcher" ``` -------------------------------- ### Checking Project Compilation with Cargo (Bash) Source: https://github.com/alexykn/sp/blob/main/CONTRIBUTING.md Performs a fast compilation check across the entire workspace and all targets using the default stable Rust toolchain. This step verifies that the code compiles without building executable artifacts. ```Bash cargo check --workspace --all-targets ``` -------------------------------- ### Removing Quarantine Attribute from sp Binary Source: https://github.com/alexykn/sp/blob/main/README.md Explains how to remove the macOS quarantine attribute (`com.apple.quarantine`) from a downloaded 'sp' nightly build binary using the `xattr` command. This step is often necessary to allow the execution of binaries downloaded from the internet on macOS. ```sh xattr -d com.apple.quarantine ./sp ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.