Skip to main content

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).

Choose one1 · Download binaryfastest2 · Dockerisolated3 · Build from sourcefor devsRunning server> PING< PONG ✓ready for commands
However you install it, you finish the same way: a server running on your machine that answers PING. From there every command works the same.
note

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.

wget is not installed on macOS by default, so the examples below use curl (built in). Check your Mac's chip with uname -m — arm64 means Apple Silicon, x86_64 means 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.gz

Move the binary to a directory in your PATH (optional)​

sudo mv ahnlich-cli /usr/local/bin/

Verify installation​

ahnlich-cli --version

Example: Run CLI against DB server​

First run the DB server:

ahnlich-db run

Then run the CLI against the DB server:

ahnlich-cli ahnlich --agent db --host 127.0.0.1 --port 1369

Run 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 ahnlich

Run the DB Server​

cargo run -p db --bin ahnlich-db run

Run the AI Server​

cargo run -p ai --bin ahnlich-ai run

Run the CLI​

cargo run -p cli --bin ahnlich-cli -- ahnlich --agent db --host 127.0.0.1 --port 1369

Replace 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 → ai or db

  • host → defaults to 127.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 1369
Connect to AI Agent​
ahnlich-cli ahnlich --agent ai --host 127.0.0.1 --port 1370