@casemark/linc
v0.79.10
Published
Legal AI terminal agent powered by case.dev
Readme
Linc
Linc is a legal AI terminal agent powered by Case.dev.
It is built on the Pi agent harness, with a deliberately small Linc overlay for legal workflows:
- Case.dev model auth and dynamic model discovery;
- native Case.dev vault tools;
- session-level vault attachment;
- vault-backed
MATTER.mdcontext; - bundled legal skills;
- Linc themes and branding.
Linc should feel like Pi where Pi is already right, and feel like Case.dev where legal work needs first-class support.
Install
npm install -g --ignore-scripts @casemark/lincConfigure Case.dev auth:
export CASEDEV_API_KEY=sk_case_...
lincYou can also run /login inside the TUI and choose Case.dev.
Modes
linc # Interactive TUI
linc -p "Summarize this" # Print mode
linc --mode json # JSON event stream
linc --mode rpc # RPC modeFor local development, use dark-linc:
dark-lincdark-linc uses ~/.dark-linc instead of ~/.linc, so local experiments do not pollute normal Linc sessions or auth.
Models
Linc fetches Case.dev models dynamically from the Case.dev LLM API at startup. Use /model or Ctrl+L to select a model.
Useful flags:
linc --provider casedev --model casemark/core-large
linc --list-models casemarkVaults
Linc can attach a Case.dev vault to a session.
/vault
/vault attach <vault-id>
/vault show
/vault clear
/vault unlinkAttachment is session state. Once attached, the vault stays attached until /vault clear.
Native vault tools default to the attached vault when the model does not provide an explicit vault ID:
casedev_vault_listcasedev_vault_getcasedev_vault_object_listcasedev_vault_searchcasedev_vault_uploadcasedev_vault_download
MATTER.md
MATTER.md is durable matter context for legal work.
When a vault is attached, Linc checks the vault for MATTER.md. If present, it materializes that file into the workspace and loads it into the agent prompt. If missing, interactive Linc can initialize one.
Workspace edits to root MATTER.md are synced back to the attached vault.
Human-facing commands:
/matter
/matter edit
/matter sync
/init
/autoinitNative matter tools:
casedev_matter_readcasedev_matter_writecasedev_matter_edit
Use MATTER.md for durable matter state: representation, goals, jurisdiction, source rules, open questions, working preferences, and source-map pointers. Do not store raw evidence, credentials, transcript dumps, or scratchpad reasoning in it.
Commands
| Command | Description |
| --- | --- |
| /login | Configure Case.dev auth |
| /model | Select a model |
| /theme | Select a theme |
| /vault | Select or attach a Case.dev vault |
| /vault show | Show attached vault |
| /vault clear | Unlink the attached vault |
| /vault unlink | Unlink the attached vault |
| /matter | Show active MATTER.md state |
| /matter edit | Edit MATTER.md and sync it to the attached vault |
| /matter sync | Sync MATTER.md to the attached vault |
| /init | Start guided matter initialization |
| /autoinit | Explore the attached vault and draft MATTER.md with unknowns marked |
| /resume | Pick from previous sessions |
| /new | Start a new session |
| /compact [prompt] | Compact context |
| /reload | Reload resources |
| /quit | Quit |
Files And State
| Path | Purpose |
| --- | --- |
| ~/.linc | Normal Linc config, sessions, auth, packages |
| ~/.dark-linc | Local development config for dark-linc |
| MATTER.md | Workspace materialization of attached-vault matter context |
| packages/coding-agent/src/linc | Linc-specific overlay source |
Development
From the repository root:
npm install --ignore-scripts
npm run check
npm run dark-lincRun focused tests from this package root:
npx tsx ../../node_modules/vitest/dist/cli.js --run test/linc-vault-matter.test.tsUpstream Boundary
Linc is a fork of Pi. Keep Linc-specific behavior in src/linc unless a small generic hook belongs in Pi core. This keeps upstream merges tractable and makes the product boundary obvious to new contributors.
License
MIT
