Skip to main content

OpenPA — open personal assistant server and CLI

Project description

OpenPA

Personal AI Assistant — server + CLI.

Install

pip install openpa

After install, the openpa command is on your PATH. Run openpa --help for the full command tree.

Run the server

# Local dev — uses .env / dynaconf settings + SQLite at ~/.openpa/storage/openpa.db
openpa serve

# Bind explicitly
openpa serve --host 0.0.0.0 --port 1112

Use the CLI against a running server

The CLI is configured via environment variables:

Variable Default Purpose
OPENPA_SERVER http://localhost:1112 Server base URL
OPENPA_TOKEN (unset) JWT bearer token for the OpenPA server
OPA_OUTPUT table table or json output mode
OPA_NO_COLOR (unset) When set, disable ANSI colors

Obtain a JWT either from the OpenPA setup wizard after first-run setup, or from openpa setup complete (which posts the setup payload and prints a token):

export OPENPA_SERVER="http://localhost:1112"
export OPENPA_TOKEN="..."

openpa me                       # whoami
openpa tools list               # list registered tools
openpa conv list                # list conversations
openpa chat                     # interactive chat REPL
openpa proc attach <pid>        # attach to a long-running PTY process

Development setup

# Install everything for local development.
uv sync --all-groups

# Now you can run both the server and the CLI from the project venv:
uv run openpa serve          # in one terminal
uv run openpa me             # in another, after exporting OPENPA_TOKEN

DBeaver SQLite Configuration

In DBeaver, foreign key enforcement is off by default for SQLite. To enable cascade deletes:

  1. Right-click your SQLite connection → Edit Connection
  2. Go to Connection SettingsInitialization
  3. Add PRAGMA foreign_keys=ON; to the Bootstrap queries (or "Keep-Alive" section depending on your DBeaver version)
  4. Reconnect

Architecture

The CLI lives in app/cli/ and ships in the same wheel as the server. It communicates with the running server over HTTP / SSE / WebSocket — there is no in-process backdoor for client commands; only openpa serve imports the server modules directly.

Layer Path
typer entry point app/cli/main.py
Subcommands app/cli/commands/
HTTP / SSE / WS clients app/cli/client/
Output (rich / TSV / JSON) app/cli/output/
Streaming pipeline app/cli/streaming.py
Chat TUI (prompt_toolkit) app/cli/tui/
Raw TTY + QR helpers app/cli/io/

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

openpa-0.2.1.tar.gz (1.9 MB view details)

Uploaded Source

Built Distribution

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

openpa-0.2.1-py3-none-any.whl (3.6 MB view details)

Uploaded Python 3

File details

Details for the file openpa-0.2.1.tar.gz.

File metadata

  • Download URL: openpa-0.2.1.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openpa-0.2.1.tar.gz
Algorithm Hash digest
SHA256 80036f133eb9d7e8761cba5cb027a0d680342458a0da97bbc898acd3b7bd6bb6
MD5 37b1775802b72ecd0441ba8d84b5d0eb
BLAKE2b-256 7eb7439b359a0d03f6ab7405f78b5ab17d218f983ed7ef3880344d3746904367

See more details on using hashes here.

File details

Details for the file openpa-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: openpa-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openpa-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 39feed423248557e23a410a4cd381e514028d6dcad35aa35eecb24d84bc3b103
MD5 da24bdbeefb33a370c8bcc8aaf8f7600
BLAKE2b-256 1ed326d3af81c2033b7d7f756ae8285cb8337c9653b96aba2e6463e5531c9630

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