litecontext-cli
by Aries-0331
README.md
# LiteContext CLI
LiteContext CLI is a local-first context engine and MCP server for personal
knowledge. It indexes local Markdown or Obsidian folders, preserves source
citations, and lets compatible AI clients retrieve relevant local context
through MCP.
It runs without a desktop application, browser, cloud account, or localhost UI.
Your sources and indexes remain in `~/.litecontext` by default.
## Install
The Go engine is currently a read-only compatibility preview. It opens the
existing LiteContext v1 JSON workspace, applies Context Profile boundaries, and
provides cited search, doctor, and MCP stdio without Node at runtime:
```sh
go run ./cmd/litecontext doctor --workspace ~/.litecontext --json
go run ./cmd/litecontext search --workspace ~/.litecontext --query "project roadmap" --json
go run ./cmd/litecontext mcp serve --workspace ~/.litecontext
```
It does not yet write sources, profiles, or SQLite. The TypeScript CLI remains
the compatibility baseline for those operations during migration. The first Go
binary release will be distributed through GitHub Releases and Homebrew; npm
is not a required product runtime.
## Current TypeScript CLI baseline
```sh
litecontext source add ~/Documents/notes --source-id notes --name "Personal notes"
litecontext source list
litecontext doctor
litecontext serve --mcp
```
For an Obsidian vault, add `--source-type obsidian`. `source add` creates a
default Context Profile unless `--no-default-profile` is supplied. Use
`source sync <id>` to refresh a source and `source remove <id>` to remove only
LiteContext's local index and registry entries, never the original files.
## MCP configuration
Print a pasteable configuration for an AI client:
```sh
litecontext mcp-config --global
```
The server command is `litecontext serve --mcp`. The MCP server reads the same
local workspace when no desktop application is running.
## Workspace and architecture
```text
Local Markdown / Obsidian
-> connectors and ContextItem normalization
-> SQLite/FTS index + Context Profile
-> LiteContext CLI / MCP stdio
-> cited local context for an AI client
```
- `@litecontext/core` — contracts, profiles, SQLite/FTS index, retrieval.
- `@litecontext/connectors` — portable source connectors.
- `@litecontext/cli` — source lifecycle commands, diagnostics, and MCP server.
## Development
The transition repository currently verifies both the TypeScript baseline and
the Go read-only engine. It requires Go 1.24.1, Node 24.13–24.x, and pnpm 10.
```sh
pnpm install
pnpm check
pnpm audit:security
```
`pnpm check` runs the shared golden fixture tests for both implementations.
See [CONTRIBUTING.md](CONTRIBUTING.md), [SECURITY.md](SECURITY.md),
[third-party notices](THIRD_PARTY_NOTICES.md), and the
[release guide](docs/releasing.md).
## License
[MIT](LICENSE)
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessSyncing