diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000..8402c34 --- /dev/null +++ b/examples/README.md @@ -0,0 +1,58 @@ +# Examples + +Runnable scripts that show one feature each. Some import `townsquare.*` directly (library usage); others call a running server’s HTTP endpoints (integration patterns). Think of them as reference implementations for specific workflows. + +## Available scripts + +| Script | What it does | +| ---------------------------------------- | ------------ | +| _(none yet — be the first contributor!)_ | | + +## How to run + +First: get townsquare running. The full setup is in [docs/SELF_HOSTING.md](../docs/SELF_HOSTING.md). Quick version: + +```bash +git clone https://github.com/townsquare-os/townsquare +cd townsquare +cp example.env .env +make gen-secrets # paste into .env +# fill GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, WORKSPACE_DOMAIN, ANTHROPIC_API_KEY +make up +``` + +Install Python dependencies locally (examples need them): + +```bash +python -m venv .venv +source .venv/bin/activate + +# Minimal (works for most examples) +pip install -e ".[dev]" + +# If the example uses external connectors (Slack, Notion, GitHub, etc.) +pip install -e ".[all,dev]" + +# Or, for very simple examples with no extras +pip install -e . +``` + +Run any example: + +```bash +source .venv/bin/activate +python examples/