Local-first operations control for policy-governed transfer queues.
Disk budgets, lifecycle obligations, manual approvals, audit trails, and agent-friendly APIs in one dashboard.
Features · Architecture · Quick Start · API ·
TransferOps is a finished local-first FastAPI application for running a small operations desk around queued transfers. It evaluates incoming candidates, enforces disk and retention policies, records every decision, and gives operators a dense authenticated dashboard for daily review.
It is intentionally boring where infrastructure should be boring:
- local SQLite persistence by default
- explicit dry-run mode for safe demos
- runtime-editable settings with masked secrets
- auditable admission decisions
- separate automatic and manual lanes
- agent API and MCP bridge for tool-assisted operations
|
Scores candidates against disk pressure, retention obligations, source confidence, historical learning, and lane-specific thresholds. |
Authenticated FastAPI/Jinja dashboard with live refresh, budget meters, runtime settings, health checks, audit tables, and manual request workflows. |
|
Tracks active items from candidate intake through managed retention, safe state, retirement eligibility, and error handling. |
Bearer-token protected endpoints plus an MCP bridge for local agents that need inspection, planning, and controlled execution tools. |
|
Separate automatic and manual budgets, high-water marks, free-disk checks, unresolved-work caps, and emergency posture reporting. |
Provider and executor integrations stay behind explicit service modules so the policy core remains inspectable and testable. |
The operational view stays table-first on purpose: it is built for scanning state, score, retention posture, tags, and paths without opening a separate admin tool.
Signals and learning buckets are visible alongside the main workflow, so the system's scoring behavior can be inspected instead of treated as a black box.
flowchart LR
A["Source adapters"] --> B["Candidate normalizer"]
B --> C["Policy scoring engine"]
C --> D{"Admit?"}
D -->|yes| E["Transfer executor"]
D -->|no| F["Decision audit log"]
E --> G["Lifecycle reconciler"]
G --> H["Learning buckets"]
G --> I["Dashboard state"]
I --> J["Operator dashboard"]
I --> K["Agent API / MCP tools"]
The codebase is organized around explicit boundaries:
app/
main.py FastAPI routes, scheduler jobs, dashboard rendering
config.py typed runtime settings
models.py SQLAlchemy persistence models
services/
controller.py admission, reconciliation, audit events
scoring.py policy score calculation
lifecycle.py managed-state transitions
settings.py runtime setting overrides and masking
integrations.py health checks and upstream API boundaries
manual_requests.py operator-initiated request workflow
scripts/
transferops_mcp.py local MCP bridge around the agent API
tests/
test_api.py API and workflow coverage
test_controller.py policy engine and lifecycle coverage
TransferOps uses uv for Python dependency management.
uv sync --python 3.12
Copy-Item .env.example .env
uv run uvicorn app.main:app --reload --host 127.0.0.1 --port 8000Open the dashboard:
http://127.0.0.1:8000
Default demo credentials:
username: admin
password: change-me
The app starts in dry_run mode by default, so it is safe to inspect without connecting a real executor.
Most settings can be changed from the dashboard and are persisted as runtime overrides. Secrets are masked in API responses and can be rotated without rewriting source files.
Common .env values:
TRANSFEROPS_APP_NAME=TransferOps
TRANSFEROPS_ENV=development
TRANSFEROPS_DATABASE_URL=sqlite:///./transferops.db
TRANSFEROPS_DRY_RUN=true
TRANSFEROPS_DASHBOARD_USERNAME=admin
TRANSFEROPS_DASHBOARD_PASSWORD=change-me
TRANSFEROPS_AGENT_API_TOKEN=transferops-local-agent
TRANSFEROPS_QBIT_CATEGORY=transferops.managed
TRANSFEROPS_QBIT_TAG=transferops.managed
TRANSFEROPS_QBIT_SAVE_PATH=C:\TransferOps\managed
TRANSFEROPS_HOST_DISK_CHECK_PATH=C:\TransferOps\managedTransferOps exposes both dashboard endpoints and JSON APIs:
| Area | Endpoint |
|---|---|
| Dashboard | GET / |
| Status | GET /api/status |
| Decisions | GET /api/decisions |
| Managed transfers | GET /api/torrents |
| Runtime settings | GET /api/settings, PUT /api/settings |
| Manual requests | POST /api/agent/requests |
| Candidate planning | GET /api/agent/requests/{id}/candidates |
| Controlled execution | POST /api/agent/requests/{id}/select-candidate |
| Agent overview | GET /api/agent/overview |
Agent routes require:
Authorization: Bearer transferops-local-agentuv run pytest
uv run ruff check .The test suite uses fake executor and integration clients so core policy behavior can be validated without external services.
MIT




