Armory Atlas is a CLI tool designed to manage and interact with the inventory system. It provides an intuitive command-line interface and a Python library for more advanced usage.
After building and installing the binary or the Python module, you can run the app and pass either:
-h # or --help
or
help
to see the help screen with available options.
The Python library exposes several classes and functions. Refer to the stub file for a complete list of functions and classes.
The main function to use is run_cli()
. This function starts the CLI tool. It takes one argument, which can be a list of arguments or, preferably, the entire sys.argv
list to capture all inputs correctly.
Building the Python module is recommended to avoid setting the PYTHONPATH
environment variable. This is necessary as long as the database handler is written in Python.
First, install Rust and Maturin. Follow the guides here and here.
Run the following commands in the root of the repository:
cd armory_atlas
maturin build -r # the -r flag builds the release version
Alternatively, you can build and install the wheel:
maturin develop -r
If you didn't use maturin develop -r
, install the wheel manually:
pip install ./target/wheels/<name_of_wheel>.whl
Building the Rust binary requires setting the PYTHONPATH
environment variable, allowing the Rust binary to link Python dynamically and access external modules.
PYTHONPATH
Install Rust and set up the PYTHONPATH
environment variable:
python3 generate_python_path.py
Copy and paste the script output into your .bashrc
or .zshrc
file, then source the file or restart your terminal.
On Windows, modify the environment variable through the Control Panel.
Run the following command in the root of the repository:
cargo build -r
Alternatively, you can build and install the project using cargo
:
cargo install --path .
To install the project from a wheel (either built on your system or pre-built from GitHub Releases):
Download the wheels.zip
file, find the correct wheel, and run:
pip install /path/to/wheel/<name_of_wheel>.whl
Or use the provided script install_wheel.py. Note that manual installation may be required if the script fails.
Follow the Rust Lang install guide.
Use this command to install the Rust toolchain:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
This command is from the Rust Lang install guide as of writing.
Refer to the Maturin install guide or run:
pip install maturin
Or install from cargo:
cargo install --locked maturin