Files
MaaAssistantArknights/docs/en-us/manual/cli/install.md
2025-08-05 17:13:22 +02:00

4.8 KiB
Raw Blame History

order, icon
order icon
1 material-symbols:download

Install and Build

There are multiple ways to install maa-cli, including package managers, precompiled binaries, and building from source with cargo.

Install via Package Manager

For macOS and supported Linux distributions, it is recommended to install maa-cli using a package manager.

macOS

Homebrew users can install maa-cli via the unofficial tap:

  • Stable release:

    brew install MaaAssistantArknights/tap/maa-cli
    
  • Beta releases:

    brew install MaaAssistantArknights/tap/maa-cli-beta
    

Linux

  • Arch Linux users can install the AUR package:

    yay -S maa-cli
    
  • ❄️ Nix users can run directly:

    # Stable release
    nix run nixpkgs#maa-cli
    
    # Nightly build
    nix run github:Cryolitia/nur-packages#maa-cli-nightly
    

    Stable is packaged in nixpkgs, using the nixpkgs Rust toolchain; Nightly is in NUR, using the Beta Channel Rust toolchain, automatically updated and built daily by GitHub Actions.

  • Users using Homebrew on Linux please refer to the macOS installation method above.

Precompiled Binaries

If package managers are not available on your system or you prefer not to use them, you can download the precompiled binaries for your platform from the following links. After decompressing, place the executable file in your PATH to use.

If your platform is not listed above, you can try to compile and install it yourself (see below).

Build from Source

Rust developers can compile and install maa-cli themselves via cargo:

  • Stable version:

    cargo install --git https://github.com/MaaAssistantArknights/maa-cli.git --bin maa --tag stable --locked
    
  • Development version:

    cargo install --git https://github.com/MaaAssistantArknights/maa-cli.git --bin maa --locked
    

Features

When compiling from source, you can disable the default features with --no-default-features and then enable specific features with --features. The available features are:

  • cli_installer: Provide maa self update command to update self, this feature is enabled by default;
  • core_installer: Provide maa install and maa update commands to install and update MaaCore and resources, this feature is enabled by default;
  • git2: Provide libgit2 resource backend, this feature is enabled by default;
  • vendored-openssl: Build OpenSSL library by self instead of using system library, this feature is disabled by default;

Install MaaCore

maa-cli only provides an interface for MaaCore, it needs MaaCore and resources to run tasks, which can be installed by maa-cli once it is installed:

maa install

For Windows platform users, before running the maa install command, please run the following command as administrator in Command Prompt or PowerShell to install the required VC++ toolset:

  • Windows:

    winget install "Microsoft.VCRedist.2015+.x64" --override "/repair /passive /norestart" --uninstall-previous --accept-package-agreements --force
    

For users who installed via package managers, MaaCore can also be installed via package managers:

  • Homebrew

    brew install MaaAssistantArknights/tap/maa-core
    
  • Arch Linux

    yay -S maa-assistant-arknights
    
  • Nix

    maa-cli on Nix depends on the MaaCore package, so no additional installation is required.

NOTE: Only users who installed maa-cli via package managers can install MaaCore via package managers. Otherwise, please use the maa install command to install. In addition, the maa install downloads the official precompiled MaaCore, while the MaaCore installed by package managers has different compilation options and dependency versions from the official precompiled version, potentially causing variations in behavior and performance.