# Repository Briefing: mr-karan/logchef
> Source: https://repoforai.com/repo/mr-karan/logchef (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/mr-karan/logchef
- **Official Docs / Website**: https://logchef.app/
- **Category**: Agents & Frameworks (智能体与框架)
- **Primary Language**: Go
- **License**: AGPL-3.0
- **Engineering Health**: A (79/100 · Maintenance 35/35 · Adoption 13/25 · Releases 20/20 · License 11/20)
- **Latest Release**: v2.8.3 (2026-11-26) — https://github.com/mr-karan/logchef/releases
- **Review Snapshot**: 2026-12-03
- **Deployment / Stack Signals**: Docker, Self-Hosted, MCP, CLI
- **Momentum**: 953 ★ total (+0 24h / +6 7d) · 67 forks
- **Topics**: `clickhouse`, `kibana-alternative`, `log-analytics`, `logging`, `mcp`, `observability`, `opentelemetry`, `self-hosted`, `victorialogs`
- **When to Use**: Best for: SRE and platform teams that already run ClickHouse or VictoriaLogs and want shared investigations, dashboards, alerts, and controlled access from the browser, CLI, or AI assistants. Skip if: You need Logchef to collect and store logs, require a drop-in Kibana migration, or cannot verify the Loki capabilities your workflow depends on.

## Overview
```text
### Architecture & Core Mechanics
Logchef is a query and access-control layer over existing log stores, not an ingestion or storage engine. The Go server embeds the Vite UI: the Dockerfile builds it with Bun into `cmd/server/ui` before compiling the server. `go.mod` lists Fiber v3, Participle v2, a ClickHouse SQL parser, and the ClickHouse v2 driver. For ClickHouse and VictoriaLogs, users can query through LogchefQL or use the source’s native language.

Application metadata is separate from log data: SQLite is the default, and PostgreSQL is an option for multi-replica deployments. Browser users can sign in with local credentials or OIDC, with RBAC for access control. The CLI authenticates to a Logchef server, while AI clients can connect through the built-in MCP endpoint with OAuth sign-in; `mcp-go` is listed in the Go dependencies.

### Key Capabilities & Differentiators
The clearest fit is ClickHouse and VictoriaLogs. Both support LogchefQL and live tail, and users can fall back to native SQL or LogsQL. `logchef explain` shows the generated query without executing it. VictoriaLogs also supports source-level authentication, tenant headers, and immutable query scope. The project description lists Grafana Loki, but equivalent query, live-tail, and dashboard behavior is not established; validate the Loki workflows you need before standardizing on it.

Dashboards can combine ClickHouse and VictoriaLogs panels on a shared time range, with time-series, stat, breakdown, and table views. Saved queries support repeat investigations, and scheduled rules notify by email or webhook. The AI Query Assistant drafts LogchefQL, ClickHouse SQL, or LogsQL from natural language. That authoring feature is distinct from MCP, which gives external assistants an integration endpoint.

### Trade-offs & Limitations
Compared with using native ClickHouse or VictoriaLogs clients alone, Logchef adds value when teams need common query workflows, shared dashboards, alerts, and access control. For one source and a team already fluent in its native query language, Logchef is another service to operate. It is also not a drop-in Kibana migration: assess the workflows you need rather than assuming existing dashboards or queries will transfer.

Dashboard caching, ClickHouse query guardrails, streaming for large ClickHouse results, and opt-in rate limiting help manage workload, but the sources still execute the queries. Test peak dashboard refreshes, long live tails, and scheduled alerts against the backends you already run. AGPL-3.0 permits commercial use, but review the source-code obligations before distributing builds or offering a modified version over a network.

### Hardware & Deployment Guide
For a Docker evaluation, use `deployment/docker/docker-compose.yml`; the local UI is at `http://localhost:8125`. The server also ships as a single executable with the UI embedded, so Bun is a build dependency, not a runtime service. The chart under `deployment/helm` covers Logchef, Dex, and ClickHouse via the Altinity operator. Plan for network access to existing log sources and choose local authentication or an OIDC provider. The CLI is released separately under `cli-v` tags.

Start with SQLite for a single instance; use PostgreSQL when planning multiple replicas. No GPU is specified for the core query path. Size the server for concurrent queries, live tails, scheduled alerts, and result volume, and size the query backends separately. The v2.8.1 notes include an SMTP envelope-sender fix, v2.8.2 fixed Explorer filter actions that should run queries, and v2.8.3 lists documentation changes. The no-migration notes apply to the stated v2.8.1 and v2.8.2 upgrade paths, not to upgrades in general.
```

## Key Capabilities
```text
- Packaging: Bun builds the Vite frontend into `cmd/server/ui` for embedding in the Go server binary.
- Query workflow: Use LogchefQL across ClickHouse and VictoriaLogs, inspect the generated query with `logchef explain`, or switch to native SQL or LogsQL.
- Operations: Combine ClickHouse and VictoriaLogs panels on one dashboard, follow live logs, and send scheduled alerts by email or webhook.
- Identity and integrations: Local email/password or OIDC with RBAC for application access; OAuth sign-in for the built-in MCP endpoint.
- Metadata and observability: SQLite by default, PostgreSQL for multi-replica deployments, and Prometheus metrics for usage and performance.
- Terminal workflows: The separately released CLI supports multiple contexts and includes `histogram`, `tail`, and `doctor`.
```

## Quick Start / Clone
```bash
# Download the Docker Compose file
curl -LO https://raw.githubusercontent.com/mr-karan/logchef/refs/heads/main/deployment/docker/docker-compose.yml

# Start the services
docker compose up -d
```
