MCPcopy Index your code
hub / github.com/badlogic/lemmy

github.com/badlogic/lemmy @v1.0.8

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.8 ↗ · + Follow
729 symbols 1,923 edges 116 files 79 documented · 11%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Lemmy Monorepo

A TypeScript ecosystem for building AI applications with unified LLM interfaces, terminal UIs, and practical tools.

Core Packages

@mariozechner/lemmy

TypeScript library for building AI applications with multiple LLM providers. Unified interface, manual tool handling, and conversation management across Anthropic Claude, OpenAI, and Google Gemini.

Key Features:

  • Multi-provider support (Anthropic, OpenAI, Google)
  • Manual tool execution with interception capabilities
  • Context serialization and conversation management
  • Streaming with thinking/reasoning support
  • Type-safe tool definitions with Zod schemas

@mariozechner/lemmy-tui

Terminal UI framework with differential rendering for building interactive CLI applications.

Key Features:

  • Differential rendering for performance
  • Text editing, autocomplete, and selection components
  • Markdown rendering and syntax highlighting
  • Composable component architecture

Applications

claude-bridge

Use OpenAI, Google, and other LLM providers with Claude Code by intercepting and transforming API requests.

lemmy-chat

Interactive chat application demonstrating lemmy and lemmy-tui integration. Work in progress.

red-teaming

Red teaming example. See BlueSky Thread

snap-happy

Screenshot capture MCP server.

claude-trace

Trace and analyze Claude Code conversations with rich visualization. See Twitter Thread, Simon Willison Blog Post

Development

Setup:

git clone https://github.com/mariozechner/lemmy
cd lemmy && npm install
npm run dev  # Starts compilation in watch mode for all packages

Commands:

npm run build     # Build all packages and apps
npm run clean     # Clean all dist folders
npm run typecheck # Type check all projects
npm run test      # Run all tests

See README.md of respective package or app you want to hack on for more infos.

Monorepo Structure:

  • Dependencies build in correct order (packages before apps)
  • Unified scripts run across all workspaces
  • TypeScript project references for incremental compilation

Extension points exported contracts — how you extend this code

Component (Interface)
(no doc) [7 implementers]
packages/lemmy-tui/src/tui.ts
Logger (Interface)
(no doc) [5 implementers]
apps/claude-bridge/src/utils/logger.ts
ChatClient (Interface)
(no doc) [3 implementers]
packages/lemmy/src/types.ts
MCPServerConfig (Interface)
(no doc)
packages/lemmy-tools/src/types.ts
CompletionItem (Interface)
(no doc)
packages/lemmy-cli-args/src/autocomplete.ts
ConversationSummary (Interface)
(no doc)
apps/claude-trace/src/index-generator.ts
ScreenshotConfig (Interface)
(no doc)
apps/snap-happy/src/screenshot.ts
DefaultsConfig (Interface)
(no doc)
apps/lemmy-chat/src/defaults.ts

Core symbols most depended-on inside this repo

log
called by 442
apps/claude-bridge/src/utils/logger.ts
error
called by 128
apps/claude-bridge/src/utils/logger.ts
defineTool
called by 65
packages/lemmy/src/tools/index.ts
ask
called by 51
packages/lemmy/src/types.ts
getMessages
called by 46
packages/lemmy/src/types.ts
addTool
called by 45
packages/lemmy/src/types.ts
addChild
called by 39
packages/lemmy-tui/src/tui.ts
debug
called by 36
packages/lemmy-tui/src/logger.ts

Shape

Method 335
Function 239
Interface 89
Class 66

Languages

TypeScript100%

Modules by API surface

packages/lemmy-tui/src/tui.ts35 symbols
packages/lemmy/src/types.ts33 symbols
packages/lemmy-tui/src/text-editor.ts29 symbols
apps/claude-bridge/test/framework.ts29 symbols
packages/lemmy/src/context.ts25 symbols
apps/claude-trace/frontend/src/components/simple-conversation-view.ts25 symbols
apps/claude-trace/src/shared-conversation-processor.ts23 symbols
apps/claude-trace/src/interceptor.ts23 symbols
packages/lemmy-tools/src/index.ts19 symbols
packages/lemmy-tui/src/autocomplete.ts17 symbols
apps/lemmy-chat/src/defaults.ts17 symbols
apps/claude-bridge/src/interceptor.ts17 symbols

For agents

$ claude mcp add lemmy \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page