Skip to main content

CLI for the OneFirewall AI Gateway — chat, stream, and build agents from your terminal

Project description

onefirewall-ai

CLI for the OneFirewall AI Gateway — chat, stream, and build agents from your terminal.

PyPI Python License: MIT


Installation

pip install onefirewall-ai

Quick Start

1. Login

onefirewall-ai login

You'll be prompted for:

  • Endpoint — your OneFirewall AI Gateway URL (e.g. https://onefirewall.ai)
  • API Key — generate one from the Profile page in the dashboard

Credentials are saved to ~/.onefirewall-ai/access.json.

2. Chat

onefirewall-ai What is the capital of France?
onefirewall-ai "Explain Kubernetes in simple terms"
onefirewall-ai Write a Python function to reverse a string

The response streams directly to your terminal in real time.

3. Session Management

By default, every new command creates a unique session so conversation history is maintained separately. You can view past sessions or resume a previous session:

# List all recent chat sessions
onefirewall-ai sessions

# Continue an existing session by ID
onefirewall-ai --session <session-id> "What did we just talk about?"

# Create a custom named session
onefirewall-ai --session my-coding-task "Help me write a Python script"

Commands

Command Description
onefirewall-ai Show help
onefirewall-ai help Show help
onefirewall-ai login Configure endpoint & API key
onefirewall-ai sessions List all recent chat sessions
onefirewall-ai [--session ID] <message> Send a message and stream the AI response
onefirewall-ai version Show version

Home Directory

All data is stored in ~/.onefirewall-ai/:

~/.onefirewall-ai/
├── access.json          # Endpoint + API key (private)
├── MEMORY.md            # Persistent facts the agent remembers
├── SOUL.md              # System prompt / agent persona
└── sessions/
    └── <session_id>.md  # Full conversation history for each session

Customise your agent

Edit ~/.onefirewall-ai/SOUL.md to change the AI's persona:

# Soul
You are a concise senior DevOps engineer. Always prefer CLI examples.

Edit ~/.onefirewall-ai/MEMORY.md to give the AI persistent context:

# Memory
- My project uses Python 3.12 and FastAPI.
- Always prefer async/await patterns.

API Reference

The CLI uses the OpenAI-compatible endpoint:

POST {endpoint}/api/v1/chat/completions

With stream: true and SSE parsing for real-time output.


License

MIT © OneFirewall

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

onefirewall_ai-0.1.2.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

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

onefirewall_ai-0.1.2-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file onefirewall_ai-0.1.2.tar.gz.

File metadata

  • Download URL: onefirewall_ai-0.1.2.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.7

File hashes

Hashes for onefirewall_ai-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f3ff650f718ffa58a08fb88e380c2baeeae49ea175da5b8c0bda81e5b84ed005
MD5 535a2a05a4b81924519c55ea7f451b5e
BLAKE2b-256 ffe69db83a227377c09fe024ea2cd2ee99999dba5d0856a38e2c15399a84dbae

See more details on using hashes here.

File details

Details for the file onefirewall_ai-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: onefirewall_ai-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.7

File hashes

Hashes for onefirewall_ai-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 823e7495e549874e7c1d18b14479829f3f694f304d1ec52a0f3aa5b5035141ae
MD5 1a509e20c21ee09edb84e3d1501ea206
BLAKE2b-256 af4f5c7fccd68850e579ce273f4ba9cd3e8bc57384401dc800142ffbc2262547

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