Installation
Goal: get the ahnlich-cli command working in your terminal. Once installed,
you can point it at a running DB or AI server and start typing commands.
You can install the CLI two ways — grab a prebuilt binary (quickest) or build from source (if you're hacking on Ahnlich itself).
The CLI is a client — it needs a server to talk to. Make sure Ahnlich DB (or the AI proxy) is running first.
Download Binaries
Prebuilt binaries are available on GitHub Releases.
wgetis not installed on macOS by default, so the examples below usecurl(built in). Check your Mac's chip withuname -m—arm64means Apple Silicon,x86_64means Intel.
Download the binary
macOS — Apple Silicon (M1/M2/M3/M4):
curl -L -O "https://github.com/deven96/ahnlich/releases/download/bin%2Fcli%2F0.2.1/aarch64-apple-darwin-ahnlich-cli.tar.gz"macOS — Intel:
curl -L -O "https://github.com/deven96/ahnlich/releases/download/bin%2Fcli%2F0.2.1/x86_64-apple-darwin-ahnlich-cli.tar.gz"Linux — x86_64:
curl -L -O "https://github.com/deven96/ahnlich/releases/download/bin%2Fcli%2F0.2.1/x86_64-unknown-linux-gnu-ahnlich-cli.tar.gz"Linux — ARM64:
curl -L -O "https://github.com/deven96/ahnlich/releases/download/bin%2Fcli%2F0.2.1/aarch64-unknown-linux-gnu-ahnlich-cli.tar.gz"Extract the Archive
Extract the downloaded archive
tar -xvzf <archive-name>.tar.gzMove the binary to a directory in your PATH (optional)
sudo mv ahnlich-cli /usr/local/bin/Verify installation
ahnlich-cli --versionExample: Run CLI against DB server
First run the DB server:
ahnlich-db runThen run the CLI against the DB server:
ahnlich-cli ahnlich --agent db --host 127.0.0.1 --port 1369Run from Source (Development Mode)
Clone the repo and run from the workspace root:
Clone the repo
git clone https://github.com/deven96/ahnlich.git cd ahnlichRun the DB Server
cargo run -p db --bin ahnlich-db runRun the AI Server
cargo run -p ai --bin ahnlich-ai runRun the CLI
cargo run -p cli --bin ahnlich-cli -- ahnlich --agent db --host 127.0.0.1 --port 1369Replace db with ai to connect to the AI server
Running the CLI
General command format:
ahnlich-cli ahnlich --agent <agent> --host <host> --port <port>-
agent→aiordb -
host→ defaults to127.0.0.1 -
port→ defaults:1370(AI),1369(DB)
Example Usage
Connect to DB Agent
ahnlich-cli ahnlich --agent db --host 127.0.0.1 --port 1369Connect to AI Agent
ahnlich-cli ahnlich --agent ai --host 127.0.0.1 --port 1370