community-context is a CLI-first tool for exporting community conversations, analyzing them with reusable prompt specs, and saving portable outputs for writing, reporting, and agent workflows.
Community teams often have useful signals trapped inside chat history. This project exists to make those conversations easier to export, normalize, analyze, and turn into Markdown artifacts that can move cleanly into Google Docs, notes, or downstream agents.
- Supported sources: Discord and Telegram
- Export format: normalized
.jsonl - Analysis format: Markdown artifacts with lightweight metadata, saved to
analysis/ - Interface: interactive CLI session
- Install and copy the local example files:
npm install
cp .env.example .env
cp config/profiles.example.json config/profiles.json
cp config/channels.example.json config/channels.json- Fill in your environment variables and real profile or channel ids.
config/*.example.jsonfiles are committed examples only.config/*.jsoncan be shared runtime config.config/*.local.jsonis for private local config and overrides the shared file with the same base name.- The CLI loads
.envautomatically at startup.
- Start the CLI:
npm run cli- Run a basic export:
/profiles/use-profile <profileId>or/select-profile/channels/use-channel <alias|id|name>or/select-channel/use-range days 7/export
- Run analysis on the last export:
/prompts/prompt-use <promptId>or/select-prompt/analyze
- Analyze one or more saved exports:
/exports/use-export <id|index> [id|index...]or/select-exports/analyze
Analysis requires OPENAI_API_KEY. Optional env vars include OPENAI_MODEL and OPENAI_MAX_OUTPUT_TOKENS.
Use /prompt enhance inside the interactive session to answer a short questionnaire and generate a draft prompt spec in prompts/.
- The generated file stays compatible with the normal prompt loader and validator.
- The draft is meant to be edited if needed.
- Prompt specs remain Markdown-first in v1.
- Shared prompts live in
prompts/, while private local prompts can live inprompts/local/. - If the same prompt id exists in both places,
prompts/local/wins.
More prompt authoring detail is in docs/prompts/authoring.md.
- Discord setup:
docs/setup/discord.md - Telegram setup:
docs/setup/telegram.md
- The project is still alpha and intentionally CLI-first.
- Telegram first-run interactive user auth is not wired into the CLI yet. Use a saved session or bot token.
- Prompt enhancement and analysis require OpenAI credentials.
- Export and analysis artifacts are local files today; there is no web UI or job system yet.
- Saved export selection is session state, so use the interactive CLI when selecting exports and analyzing them in the same flow.
- The repo currently favors portable files and simple module seams over advanced product ergonomics.
src/core/exports/contains normalized export logic and source adapters.src/core/analysis/contains prompt-driven analysis, Markdown artifact formatting, OpenAI integration, and prompt enhancement.src/core/prompts/contains prompt validation, loading, and template building.src/cli/contains the interactive CLI session and command handlers.
Use /help inside the session to see the current command list and argument shapes.