the-local
v0.1.0
Published
Ship Claude Code locals from npm packages into a host TS/JS app — the TypeScript port of the the_local Ruby gem.
Downloads
152
Readme
the-local
Ship Claude Code locals (resident expert subagents) from npm packages into a
host TS/JS app — the TypeScript port of the the_local
Ruby gem. A provider package commits its agent .md files; a host runs
the-local install to copy the aggregated set from its direct dependencies into
.claude/agents/, plus a delegation rule in CLAUDE.md.
Status: early. Core install pipeline + CLI are in place and tested. See the open issues for remaining work (contract doc, npm publish, workspace support).
The model
- Providers commit locals. A package ships pre-rendered agent files at
the-local/agents/<prefix>-<name>.mdand declares them in itspackage.json. - Hosts install verbatim.
the-local installreads the host's directdependencies, copies each provider's committed.mdbyte-for-byte into.claude/agents/, and writes the delegation trigger intoCLAUDE.md. - Direct-dependency scope. Only the host's direct dependencies contribute locals; transitive providers are filtered out.
- Cross-language contract. The agent
.mdformat and theCLAUDE.md<!-- the_local:begin -->/<!-- the_local:end -->markers are identical to the Ruby gem's, so a Ruby gem and a TS package install into the same host without clobbering each other. Seedocs/contract.md.
Use (host app)
npx the-local install # or: refreshDeclare locals (provider package)
// package.json
{
"the-local": {
"prefix": "keystone",
"scope": "UI — pages, forms, tables",
"agentsDir": "the-local/agents"
}
}Then commit the-local/agents/keystone-*.md alongside your code.
Develop
pnpm install
pnpm test # vitest
pnpm typecheck
pnpm lint
pnpm build # emits dist/, including the the-local CLI