Installation
Learn how to build and install Fortified LLM Client from source.
Build from Source
1. Clone the Repository
1
2
git clone https://github.com/mrizzi/fortified-llm-client
cd fortified-llm-client
2. Build the Project
Release build (recommended):
1
cargo build --release
The compiled binary will be at: target/release/fortified-llm-client
Debug build (faster compilation, slower runtime):
1
cargo build
Debug binary location: target/debug/fortified-llm-client
3. (Optional) Install to PATH
Add the binary to your system PATH for easy access:
1
2
3
4
5
6
7
8
# Copy to a directory in your PATH
sudo cp target/release/fortified-llm-client /usr/local/bin/
# Or create a symlink
sudo ln -s $(pwd)/target/release/fortified-llm-client /usr/local/bin/fortified-llm-client
# Verify installation
fortified-llm-client --version
Alternatively, run from the project directory:
1
./target/release/fortified-llm-client --help
Verify Installation
Test the CLI is working:
1
2
3
4
5
6
7
# Show help (requires at least one of api_url/model)
fortified-llm-client --help
# Test with Ollama (if running locally)
fortified-llm-client --api-url http://localhost:11434/v1/chat/completions \
--model llama3 \
--user-text "Hello, world!"
Expected output: JSON response with LLM content and metadata.
Using as a Library
To use Fortified LLM Client as a Rust library in your project:
Add to Cargo.toml
1
2
3
[dependencies]
fortified_llm_client = { git = "https://github.com/mrizzi/fortified-llm-client" }
tokio = { version = "1", features = ["full"] }
The library is not yet published to crates.io. Use the git dependency until the first stable release.
Import in Your Code
1
use fortified_llm_client::{evaluate, EvaluationConfig};
See Quick Start for complete examples.
Development Setup
If you plan to contribute or modify the code:
1. Install Nightly Toolchain
Required for code formatting:
1
rustup toolchain install nightly
2. Install Development Tools
1
2
3
4
5
# Clippy (linting)
rustup component add clippy
# Rustfmt (formatting)
rustup component add rustfmt --toolchain nightly
3. Run Pre-Commit Checks
Before committing changes:
1
2
3
4
5
6
7
8
9
10
11
# Format code
cargo +nightly fmt
# Check for errors
cargo check
# Run linter
cargo clippy
# Run tests (requires docling: pip install docling)
cargo test
One-liner for all CI checks:
1
cargo +nightly fmt --check && RUSTFLAGS="-D warnings" cargo check && cargo clippy -- -D warnings && RUSTFLAGS="-D warnings" cargo test
See Contributing for detailed development guidelines.
Troubleshooting
Build Fails with Linker Errors
Symptom: error: linking with 'cc' failed
Solution: Install build tools:
- Linux:
sudo apt-get install build-essential - macOS:
xcode-select --install - Windows: Install Visual Studio Build Tools
Tests Fail with “docling not found”
Symptom: PDF extraction tests fail
Solution: Install Docling CLI:
1
pip install docling
Or skip PDF tests:
1
cargo test --lib
Rust Version Too Old
Symptom: error: package requires rustc 1.70 or newer
Solution: Update Rust:
1
rustup update stable
Next Steps
Now that you’ve installed Fortified LLM Client, try the Quick Start tutorial to run your first examples.