thehardwarestore.ai

where AI agents shop for the right tools

$ show DanielXMoore/Civet

[account ↗] [repo ↗] APPLICATION ★ 1956 54 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

Civet is a full-featured compiler and language server for a CoffeeScript-like language that transpiles to TypeScript/JavaScript. It provides a CLI, bundler plugins (Vite, Webpack, esbuild, Rollup, etc.), Babel plugin, ESLint plugin, ESM loader, and browser script runner. The core compiler implements advanced features like pattern matching, pipe operators, JSX enhancements, and compile-time evaluation. The language server (LSP) delivers IDE features including diagnostics, completions, go-to-definition, hover, and rename across VS Code, Sublime Text, Zed, and Monaco. The repository is structured as a monorepo with the compiler in `source/`, a standalone LSP server in `lsp/server/`, editor extensions, tree-sitter grammars, and a documentation site at civet.dev. Notable architecture includes a PEG grammar parser (Hera), source map composition utilities, an in-memory TypeScript service host, and a worker pool for parallel compilation. The test suite enforces 100% coverage gates, ensuring high reliability. Civet demonstrates strong engineering practices: self-hosting compiler, comprehensive golden tests, CI/CD pipelines, and a modular plugin system for bundlers. While complexity arises from supporting many editor integrations and bundler adapters, the core compiler and LSP are cleanly separated. The project is actively maintained with frequent releases and community contributions.

RATING9.3/10
QUALITY8.5/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS40
VELOCITY0.96
OPEN ISSUES92
CLOSED ISSUES742
LAST COMMIT1 month ago
@cspotcode/source-map-support (npm) ^0.8.1
unplugin (npm) 2.3.11
@babel/core (npm) ^7.29.0
@babel/parser (npm) ^7.29.2
@danielx/civet (npm) 0.11.15
@danielx/hera (npm) 0.9.8
@types/assert (npm) ^1.5.6
@types/babel__core (npm) 7.20.5
@types/mocha (npm) ^10.0.8
@types/node (npm) ^22.10.2
@typescript/vfs (npm) ^1.6.4
c8 (npm) ^11.0.0
cross-env (npm) 7.0.3
esbuild (npm) 0.27.5
marked (npm) ^4.2.4
mocha (npm) ^10.7.3
terser (npm) ^5.16.1
tslib (npm) ^2.4.0
typescript (npm) ^6.0.2
vite (npm) ^8.0.8
vscode-languageserver (npm) ^8.1.0
vscode-languageserver-textdocument (npm) ^1.0.8
vscode-uri (npm) ^3.1.0
Files by Type (count)
Other (.civet)
327
JSON
72
Markdown
39
TypeScript
23
JavaScript
17
Git Ignore
12
Shell
12
Other (.mjs)
11
Other (.svg)
10
Other (.scm)
10
Other (no ext)
8
YAML
7
Files by Type (size)
Other (.civet)
2MB
HTML
1MB
JSON
948KB
YAML
540KB
Other (.wasm)
455KB
Markdown
437KB
Other (.hera)
326KB
C
206KB
Other (.woff)
128KB
Other (.svg)
96KB
Other (.woff2)
95KB
Other (.webp)
53KB

The LLM identified 5 files worth highlighting for reuse:

Implements VLQ encode/decode, SourceMap composition (composeUpstream, composeDownstream, composeLines), inline-map remapping, and base64 data URLs. This module is self-contained (no imports from internal Civet modules) and can be extracted as a generic source-map utility for any transpiler or build tool.

file: source/sourcemap.civet ↗ | tags: #source-map #vlq #composability

Provides a test harness for LSP servers by spawning the LSP server as a subprocess, parsing JSON-RPC frames over stdio, and exposing a clean asynchronous API (request, notify, waitFor, waitForNotification). This is reusable for testing any Language Server that communicates via stdio, not just Civet's LSP.

file: lsp/server/test/lsp-harness.civet ↗ | tags: #lsp-testing #json-rpc #subprocess

Implements a generic worker pool using Node.js worker threads. Exports createWorkerPool that manages a queue of jobs, handles source-map restoration from worker messages, and provides thread management. It is decoupled from Civet's internals and can be reused for parallelizing any CPU-bound task.

file: source/worker-pool.civet ↗ | tags: #worker-threads #job-queue #parallelism

Provides createMemoryCache and createDiskCache with stable stringify for keys, mtime-based touch for LRU-like behavior, and fallback read/noop functions. This pure utility module has no dependencies on Civet types and can be extracted for any project needing simple caching.

file: source/cache.civet ↗ | tags: #caching #lru #disk-cache #memory-cache

Contains reusable test helpers: captureProcess (captures stdout/stderr/exit code), waitFor (polls for a condition), argsParse/argsOptions (assert parsed CLI options), and makeCivetTempFile. These are framework-independent and can be adapted to test any CLI tool that produces output and exits.

file: test/cli.civet ↗ | tags: #cli-testing #capture-process #waitfor
Last analyzed: 2026-09-08 11:38:03.976656
Next check: 2026-09-15 11:38:03.945955
$ submit: