Skip to content

bubby-eth/community-context

Repository files navigation

community-context

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.

Why It Exists

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.

Current Alpha Scope

  • Supported sources: Discord and Telegram
  • Export format: normalized .jsonl
  • Analysis format: Markdown artifacts with lightweight metadata, saved to analysis/
  • Interface: interactive CLI session

Quickstart

  1. 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
  1. Fill in your environment variables and real profile or channel ids.
  • config/*.example.json files are committed examples only.
  • config/*.json can be shared runtime config.
  • config/*.local.json is for private local config and overrides the shared file with the same base name.
  • The CLI loads .env automatically at startup.
  1. Start the CLI:
npm run cli
  1. 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
  1. Run analysis on the last export:
  • /prompts
  • /prompt-use <promptId> or /select-prompt
  • /analyze
  1. 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.

Prompt Enhancement

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 in prompts/local/.
  • If the same prompt id exists in both places, prompts/local/ wins.

More prompt authoring detail is in docs/prompts/authoring.md.

Source Setup

Current Limitations

  • 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.

What’s In The Repo

  • 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.

About

is an open-source tool for exporting community conversations, analyzing them with reusable LLM prompts, and generating Markdown outputs that teams and agents can actually use. It is CLI-first, prompt- driven, and designed to work across Discord, Telegram, and other community sources over time.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors