Repository navigation
What is townsquare
The self-hostable open-source company OS. Sign in with Google. Connect your Gmail, Drive, Slack, and GitHub. Ask any question — townsquare answers it across your whole company, with each person's data queried under their own credentials.
Privacy enforced at the source, not bolted on after. Apache 2.0. No telemetry.
Self-host in 30 minutes
git clone https://github.com/townsquare-os/townsquare
cd townsquare
cp example.env .env
make gen-secrets
# fill GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, WORKSPACE_DOMAIN, ANTHROPIC_API_KEY
make upFull guide: docs/SELF_HOSTING.md.
What ships in v0.1.0
Identity & data plane
- Google Workspace SSO with
hdclaim verification +email_verifiedcheck + domain match (three independent gates) - Per-user encrypted OAuth tokens at rest (cryptography.fernet)
- Auto user provisioning on first SSO
Per-user data sources
- Gmail, Google Drive, Google Calendar (granted at SSO)
- Slack (xoxp user-tokens, not bot-tokens)
- GitHub (fine-grained personal access tokens)
Federation & agent
- Federation router with bounded asyncio.gather, per-target token decrypt, per-target budget, isolated failures, attribution tagging
- Default selector: domain-wide, with explicit user/source filters
- Central agent: Anthropic Claude with tool use over
ask_company,read_wiki,write_wiki
Operations
- HTMX + Tailwind web UI (no build step)
- Wiki with versioning + agent read/write tools
- Admin CLI: promote, demote, deactivate, forget (GDPR erasure)
- Docker Compose self-host with healthchecks
- 41 unit tests, ruff clean, CodeQL security scanning
Documentation
- Self-hosting guide, Google OAuth setup, Operations, Troubleshooting
- SPEC.md — RFC-2119 normative spec
- SECURITY.md, CODE_OF_CONDUCT.md
Coming in v0.2
- Notion / Linear / Jira connectors
- OpenTelemetry instrumentation
- Helm chart for k8s
- Streaming SSE responses to the dashboard
- Smarter selector heuristics (calendar / channel / sharing-graph aware)
See ROADMAP.md for the full plan.
Status
This is an alpha release. Tested on Python 3.10, 3.12, 3.13 × Ubuntu and macOS. Run it for your own team, file bugs, and tell us what you wish it did. Apache 2.0 means you can fork it.
— Swathi