Repository navigation
v0.18.0
What's Changed
Features
lk init --no-importskips the@.knowledge/lk-instructions.mdimport inCLAUDE.md, and removes it when it is already there. An agent connected to thelk-knowledgeMCP server already receives these instructions in theinitializeresponse — the same bytes the import points at, verified as an identical 7528-byte file against a real store — so on those setups the import is a second copy loaded into every session. Deleting the line by hand never held, because writing it is part of whatlk initguarantees; this makes "the instructions arrive over MCP here" something the tool can be told.- The choice is recorded as
claude_md_import = falsein.knowledge/config.toml, so laterlk initruns leave the import out instead of putting it back.lk init --global --no-importdoes the same for~/.claude/CLAUDE.md, recording it in~/.config/lk/config.toml. Setting the key back totrueand re-runninglk initrestores the import — the config is the setting, and the flag is a shortcut for writing it. - Removal is careful about what it takes out. A
CLAUDE.mdholding nothing but the import is deleted rather than left as an empty file, matching what theAGENTS.mdmigration in v0.17.0 already did; one with your own content keeps all of it. The CommonMark handling from that migration is reused, so an import shown inside a fenced code block, or indented past the three-space limit, is documentation and is left alone. - The line
lk initprints names whichever of the two actually turned the import off —--no-importorclaude_md_import = false. On a flag run the config still readstrueat that point, since it is written afterwards, so reporting the config value would have pointed at the wrong thing while troubleshooting.
Internal
detect_newlinemoved fromcmd/init.rstoutil.rsso the config writer can use it. Rewriting a file lk only partly owns without preserving its line endings or its trailing newline was already something the markdown paths avoided; the config writer now follows the same rule, which matters becauseconfig.tomlis git-tracked and a CRLF checkout rewritten to LF turns one changed setting into a whole-file diff.
Upgrading
- No schema migration, and nothing changes unless you ask for it:
claude_md_importdefaults totrue, solk initbehaves exactly as it did in v0.17.0. - Before using
--no-import, make sure thelk-knowledgeMCP server is actually connected wherever the project is worked on. Registering it in user scope (claude mcp add -s user lk-knowledge lk mcp) covers every project at once; a per-project registration does not. Without the connection, removing the import leaves the agent with no instructions at all. - Keep the import if the repository is used somewhere MCP is not configured — a teammate who clones without setting it up, or CI. It is the only path that carries the instructions through the repository itself, which is the reason it stays the default.
lk init --no-importrewritesAGENTS.md-style files in place and can delete aCLAUDE.mdthat held only the import. There is no dry run and no undo beyond git, so run it in a clean working tree.
Notes
- There is no
--importcounterpart. Turning the import back on is a config edit pluslk init, which seemed like enough rather than adding a second way to say the same thing; it can be added later if that turns out to be awkward. lk install-mcpstill writes agent config files directly, which is the thinglk setupwas introduced to avoid. Unchanged here — whether it gets deprecated is its own decision.
Full Changelog: v0.17.0...v0.18.0