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 openpa-ui 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.1.7.tar.gz (472.3 kB view details)

Uploaded Source

Built Distribution

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

openpa-0.1.7-py3-none-any.whl (1.6 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for openpa-0.1.7.tar.gz
Algorithm Hash digest
SHA256 bede61575236bb38d7cb4ca43deabb24f7f054b70f688f626a7ab73bd902e536
MD5 e48962e7955356c106182351225d20c0
BLAKE2b-256 12f25e92cb0d74d1695b9e99629a004bdd1616e51a23ed8369b4695d2fe15c52

See more details on using hashes here.

File details

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

File metadata

  • Download URL: openpa-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 1.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.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 bc605039b67ddbbe44c980fa7c550436531eb32c811c084d6ddbb393dd92afb3
MD5 00d0e58a2738600cbf3eda0fb3174fd1
BLAKE2b-256 17e22d04dc073057e7eee4b0273b653b29a83cd2b4a4716da24e5b8c92ece5a7

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