https://github.com/theadaptoid/yet-another-personal-assistant
A python based, local first, openclaw clone
https://github.com/theadaptoid/yet-another-personal-assistant
agentic-ai local-ai python
Last synced: 13 days ago
JSON representation
A python based, local first, openclaw clone
- Host: GitHub
- URL: https://github.com/theadaptoid/yet-another-personal-assistant
- Owner: TheAdaptoid
- Created: 2026-05-14T23:03:21.000Z (about 1 month ago)
- Default Branch: master
- Last Pushed: 2026-06-05T20:41:56.000Z (13 days ago)
- Last Synced: 2026-06-05T21:15:47.186Z (13 days ago)
- Topics: agentic-ai, local-ai, python
- Language: Python
- Homepage:
- Size: 307 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Agents: AGENTS.md
Awesome Lists containing this project
README
# Yet Another Personal Assistant (YAPA)
YAPA is a terminal-first assistant with a Typer CLI, SQLite-backed session
persistence, and pluggable inference providers.
## What it does today
- Lists available models from configured providers (grouped by vendor prefix)
- Sets a default model via `--set` and scoped provider lookup via `--provider`
- Runs an interactive chat loop with streaming responses
- Supports slash commands for in-chat model/session switching and help
- Persists conversations as sessions in a local SQLite database (`~/.yapa/yapa.db`)
- Manages sessions (list, rename, delete, purge) via CLI commands
Current providers:
- `openrouter`
- `lmstudio`
## Installation
Install globally with `uv` (recommended):
```bash
uv tool install git+https://github.com/TheAdaptoid/yet-another-personal-assistant
```
After installation the `yapa` command is available from any directory:
```bash
yapa --help
```
To run without installing (temporary, uses a cached ephemeral environment):
```bash
uvx yapa --help
```
To upgrade an existing installation:
```bash
uv tool upgrade yapa
```
## Development setup
1. Clone the repository.
2. Install dependencies:
```bash
uv sync
```
3. Configure environment variables (example, or add to a `.env` file):
```bash
OPENROUTER_API_KEY=your_openrouter_api_key
LMSTUDIO_API_KEY=your_lmstudio_api_key_or_placeholder
YAPA_DEFAULT_MODEL_ID=openrouter/free
YAPA_LOG_LEVEL=INFO
```
Configuration can also be persisted to `~/.yapa/config.json`. Environment variables
override file values.
## Usage
From an installed copy:
```bash
yapa --help
```
From a development checkout:
```bash
uv run python -m yapa
```
List models (grouped by vendor):
```bash
yapa models
yapa models --provider openrouter
```
Set the default model (validates the model exists):
```bash
yapa models --set openrouter/free
yapa models --provider openrouter --set openai/gpt-4o
```
Start interactive chat (auto-creates a session):
```bash
yapa chat
yapa chat --model openrouter/free
```
Resume a previous session:
```bash
yapa chat --session --model openrouter/free
```
Manage sessions:
```bash
yapa sessions list
yapa sessions rename "New Title"
yapa sessions delete
yapa sessions delete --purge # delete empty sessions
```
> **Note:** All examples below use the installed `yapa` command. Replace with
> `uv run python -m yapa` when running from a development checkout.
Within a chat session the following slash commands are available:
| Command | Description |
|---|---|
| `/help` | Show available commands |
| `/exit` | Exit the chat session |
| `/model ` | Switch to a different model |
| `/session ` | Switch to a different session |
| `/sessions` | List all sessions |
## Quality checks
```bash
uv run ruff check src/ tests/
uv run ty check src/
uv run pytest tests/ -v
```
Recommended local gate:
```bash
uv run ruff check src/ tests/ && uv run ty check src/ && uv run pytest tests/ -v
```
## Project layout
```text
src/yapa/
cli/ # Typer commands (app, chat, models, sessions)
database/ # SQLite models, engine, repositories (sqlmodel)
models/ # Message, inference, and session data models
providers/ # Provider abstraction + implementations (OpenRouter, LM Studio)
services/ # UI-agnostic business logic (conversation, session, provider services)
config.py # Config loading and persistence
logging.py # File and console logging helpers
```