@cleya/config
v0.1.2
Published
Downloads
165
Readme
@cleya/config
Types and helpers for authoring a cleya.config.ts. Install it alongside the cleya CLI, which reads the config and indexes your projects.
npm install -D @cleya/config
npm install -g @cleya/clidefineConfig and defineProjectConfig are pass-through helpers — they return their argument unchanged. Their value is type inference and autocompletion:
import { defineConfig, defineProjectConfig } from "@cleya/config";
export default defineConfig({
projectSettings: { db: "./.cleya/graph.lbug" },
projects: [
defineProjectConfig({
id: "app",
scope: { root: "/abs/path/to/app", globs: ["src/**/*.ts"] },
contributors: [
/* your indexers */
],
}),
],
});Install the cleya CLI to index and query the projects you declare.
Writing an indexer
An indexer teaches Cleya to read a kind of source it doesn't know yet — you implement it in your own config, nothing is contributed upstream.
The full contract lives in AGENTS.md (shipped in this package): the interfaces, the invariants (each tagged with the silent failure it prevents), a fill-in template, and a verification loop with explicit pass/fail signals. A complete, tested example is in examples/markdown-indexer.ts.
The full CleyaConfig, ProjectConfig, and Contributor types are exported from this package (src/types.ts, src/domain.ts).
