> ## Documentation Index
> Fetch the complete documentation index at: https://docs.inferwall.com/llms.txt
> Use this file to discover all available pages before exploring further.

# InferenceWall CLI Command Reference

> Complete reference for all inferwall CLI commands and flags: serve the API server, scan single inputs, download and manage ML models, and generate API keys.

The `inferwall` CLI provides commands to run the HTTP API server, scan single inputs for testing, download and manage ML models, and generate API keys for authentication. Every command accepts `--help` for inline usage information.

## inferwall serve

```bash theme={null}
inferwall serve
```

Starts the InferenceWall HTTP API server on port 8000 by default. The server exposes the `/v1/scan/input`, `/v1/scan/output`, and `/v1/health` endpoints.

Configure server behavior entirely through environment variables — see the [Environment Variables reference](/reference/environment-variables) for the full list.

**Example**

```bash theme={null}
# Start server with defaults (dev mode, no auth)
inferwall serve

# Start with auth enabled (load keys from .env.local first)
source .env.local && inferwall serve
```

<Note>
  You can also start the server directly with uvicorn: `uvicorn inferwall.api.app:app --host 0.0.0.0 --port 8000`
</Note>

***

## inferwall test

```bash theme={null}
inferwall test --input TEXT [--profile PROFILE]
```

Scans a single text input through the detection pipeline and prints the result to stdout. Use this to verify your installation, test specific payloads, or quickly validate signature behavior without standing up the full API server.

**Flags**

| Flag        | Type                           | Required | Description              |
| ----------- | ------------------------------ | -------- | ------------------------ |
| `--input`   | `TEXT`                         | Yes      | The text to scan         |
| `--profile` | `lite` \| `standard` \| `full` | No       | Detection profile to use |

**Examples**

```bash theme={null}
# Test a known prompt injection string
inferwall test --input "Ignore all previous instructions"

# Test with the standard profile (requires ML models)
inferwall test --input "Ignore all previous instructions" --profile standard

# Test with the lite profile (heuristic only, fastest)
inferwall test --input "What is the weather today?" --profile lite
```

***

## inferwall admin setup

```bash theme={null}
inferwall admin setup
```

Generates a scan API key (`IW_API_KEY`) and an admin API key (`IW_ADMIN_KEY`), then writes both to `.env.local` in the current directory. Run this once after installation before starting the server in production.

**Example**

```bash theme={null}
inferwall admin setup
# Generates .env.local with IW_API_KEY and IW_ADMIN_KEY

source .env.local && inferwall serve
```

<Warning>
  Never commit `.env.local` or any file containing your API keys to source control.
</Warning>

***

## inferwall models install

```bash theme={null}
inferwall models install --profile PROFILE
```

Installs the required Python dependencies **and** downloads the ML models for the specified profile in a single step. This is the recommended one-command setup for Standard and Full profiles.

**Flags**

| Flag        | Values             | Required | Description                   |
| ----------- | ------------------ | -------- | ----------------------------- |
| `--profile` | `standard`, `full` | Yes      | Profile to install models for |

Models are downloaded from HuggingFace and cached in `~/.cache/inferwall/models/`.

| Model                  | Size     | Engine     | Profile  |
| ---------------------- | -------- | ---------- | -------- |
| DeBERTa v3 (injection) | \~400 MB | Classifier | Standard |
| DistilBERT (toxicity)  | \~520 MB | Classifier | Standard |
| MiniLM-L6 (embeddings) | \~80 MB  | Semantic   | Standard |
| Phi-4 Mini Q4 (judge)  | \~2.4 GB | LLM-Judge  | Full     |

**Examples**

```bash theme={null}
# Install everything for the Standard profile (~1 GB total)
inferwall models install --profile standard

# Install everything for the Full profile (~3.4 GB total)
inferwall models install --profile full
```

***

## inferwall models download

```bash theme={null}
inferwall models download --profile PROFILE
```

Downloads ML model weights only, without installing Python dependencies. Use this when you have already installed the package extras (`inferwall[standard]` or `inferwall[full]`) and only need to fetch the model files.

**Flags**

| Flag        | Values             | Required | Description                    |
| ----------- | ------------------ | -------- | ------------------------------ |
| `--profile` | `standard`, `full` | Yes      | Profile to download models for |

**Examples**

```bash theme={null}
# Download models for Standard (skips pip install)
inferwall models download --profile standard

# Download models for Full
inferwall models download --profile full
```

***

## inferwall models list

```bash theme={null}
inferwall models list
```

Lists all ML model files that are currently downloaded and present in the local model cache (`~/.cache/inferwall/models/`).

**Example**

```bash theme={null}
inferwall models list
```

***

## inferwall models status

```bash theme={null}
inferwall models status
```

Shows the download status of all models across every profile — indicating which models are present and which are missing. Use this to confirm your installation is complete before starting the server.

**Example**

```bash theme={null}
inferwall models status
```

<Tip>
  Run `inferwall models status` after `inferwall models install` to confirm all expected models downloaded successfully.
</Tip>
