Skip to main content

Local OpenAI-compatible PII guardrail proxy for Ollama, OpenAI, and LiteLLM.

Project description

Nexus Shield CLI

Local OpenAI-compatible proxy with sub-10ms in-RAM PII redaction. Point your app at http://127.0.0.1:8080/v1 and keep sending requests to Ollama, OpenAI, or LiteLLM — Nexus Shield sanitizes prompts before they leave your machine.

Point your application to the local proxy

Change your local environment variable or base URL:

# Before: pointing directly to OpenAI / Ollama
OPENAI_BASE_URL="https://api.openai.com/v1"

# After: pointing to Nexus Shield local proxy
OPENAI_BASE_URL="http://127.0.0.1:8080/v1"

For Ollama with the OpenAI-compatible API:

OPENAI_BASE_URL="http://127.0.0.1:8080/v1"
# Nexus Shield forwards to Ollama at http://127.0.0.1:11434/v1 by default

Install

pip install nexus-shield-cli

Or from this repository:

pip install ./packages/cli

CLI options

nexus-shield proxy [options]
Option Default Description
-p, --port 8080 Local proxy port
-t, --target http://127.0.0.1:11434/v1 Upstream LLM base URL (Ollama default)
--host 127.0.0.1 Bind address
--mask-all off Redact TCKN, credit cards, emails, phone numbers, and API keys

Examples

# Ollama (default upstream)
nexus-shield proxy

# OpenAI upstream
nexus-shield proxy --target https://api.openai.com/v1

# Custom port with full PII masking
nexus-shield proxy -p 9090 --mask-all

How it works

  1. Your SDK sends POST /v1/chat/completions to http://127.0.0.1:8080/v1.
  2. Nexus Shield redacts PII in messages, prompt, and input fields in memory.
  3. The sanitized payload is forwarded to the upstream LLM server.
  4. The upstream response is streamed back unchanged.

Masked fields appear in the X-Nexus-Shield-Masked response header when PII is detected.

License

MIT © Nexus Shield Team

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nexus_shield_cli-0.1.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nexus_shield_cli-0.1.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file nexus_shield_cli-0.1.0.tar.gz.

File metadata

  • Download URL: nexus_shield_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for nexus_shield_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8c92a482910fd011ac0277f76ecce07829cd5abef6cdb1d0ac1f95dc0e85b26e
MD5 a4293b6c6234b836eba7dace90ac825d
BLAKE2b-256 5cf7f9f5e8fdc937cac869f6a78e7fcccb401c2aae94cb75bd45d5610ec3d652

See more details on using hashes here.

File details

Details for the file nexus_shield_cli-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for nexus_shield_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a5c4db2c9bef1b137b52bcb3ed5d757b8de20a89552ae4a610eee6b0551750c8
MD5 cd4a5952040f577ee030c574d5878b25
BLAKE2b-256 89541cfb372ef1b8b603d7d7d665ba1cdb9759e4ae69920850ca9f0581f927ed

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page