lshed 0.8.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.10.0 — 2026-09-04
4
+
5
+ Link instead of copy, on the machines where you edit.
6
+
7
+ - `lshed restore --link` places skills, agents, commands and instruction fragments as links into the shed. Edits in `~/.claude` land in the shed directly; `diff` and `save` have nothing to do and `lshed sync` is the whole loop. MCP entries, settings keys and the generated `CLAUDE.md` are still written as before.
8
+ - The choice is per machine and remembered in `state.json`: later bare `lshed restore` calls keep linking, `lshed status` shows `배치 link`, and `restore --no-link` goes back to copies. Other machines keep copying.
9
+ - Turning a copy into a link backs the copy up only if it differs from the shed (an unsaved edit); turning a link back into a copy backs up nothing. Switching profiles removes the links and never touches the shed behind them.
10
+ - Windows: directories become junctions and need no permission. Single-file parts need Developer Mode for a link; without it the file is copied, the log says so, and it behaves like any other copy.
11
+
12
+ — 2026-09-04
13
+
14
+ Profiles can build on each other.
15
+
16
+ - `extends: default` (or `extends: [a, b]`) inside a profile pulls in everything the parent lists, then adds the profile's own parts. The parent's parts come first and duplicates appear once, so instructions fragments keep a predictable order in `CLAUDE.md`. Inheritance only adds; for less than the parent, list what you want instead of extending.
17
+ - A parent that does not exist, or profiles that extend each other in a cycle, is a `lshed.yaml` error reported before anything is touched.
18
+ - Everything that reads a profile sees the resolved one: `restore`, package installs, `lshed list` (a part counts as used by profiles that inherit it), the `add` hint, and `restore <profile> --pick` (inherited parts start checked).
19
+
3
20
  ## 0.8.0 — 2026-09-04
4
21
 
5
22
  Pick what a machine gets instead of writing a profile by hand.
package/README.md CHANGED
@@ -39,7 +39,7 @@ lshed exists for those five cases. It keeps the shed as a plain directory in git
39
39
  | **Profiles** | named recipes — `research`, `work`, `minimal` — that pick a subset of parts; write them in `lshed.yaml`, or let `restore --pick` build one from a checklist |
40
40
  | **Managed set** | lshed remembers what it placed, so switching profiles or restoring onto an existing machine removes only its own files and never touches yours |
41
41
 
42
- The trade: you edit in `~/.claude` and run `lshed save` to copy changes into the shed, and lshed has to know Claude Code's layout, which the plain repository does not. If none of the five cases applies to you, the `.gitignore` wins.
42
+ The trade: you edit in `~/.claude` and run `lshed save` to copy changes into the shed (or use `restore --link` on machines where you edit a lot, and skip the copy step), and lshed has to know Claude Code's layout, which the plain repository does not. If none of the five cases applies to you, the `.gitignore` wins.
43
43
 
44
44
  Currently supports **Claude Code** (`~/.claude`). Other agents plug in through an adapter.
45
45
 
@@ -245,6 +245,40 @@ Switching removes only what the previous profile placed (`-`), keeps what both u
245
245
 
246
246
  Instructions fragments are ordered. `restore` writes a `CLAUDE.md` that `@`-imports each fragment, so editing a fragment in the shed shows up on the next `restore` and there is nothing to merge.
247
247
 
248
+ ### Links instead of copies
249
+
250
+ On the machine where you do most of your editing, `restore --link` places skills, agents, commands and instruction fragments as links into the shed instead of copies. Edits in `~/.claude` land in the shed directly, `diff` has nothing to report, and `save` has nothing to do; `lshed sync` is the whole loop.
251
+
252
+ ```
253
+ $ lshed restore --link
254
+ ~ skills/add-drivers (link)
255
+ ~ agents/reviewer.md (link)
256
+ ~ lshed/instructions/main.md (link)
257
+ = CLAUDE.md
258
+
259
+ 프로필 "default" 적용 (link): 배치 4, 제거 0
260
+ ```
261
+
262
+ The choice is per machine and remembered: later `lshed restore` calls on that machine keep linking, `lshed status` shows `배치 link`, and `restore --no-link` goes back to copies. Other machines are not affected. MCP entries and settings keys are JSON values, not files, so they are always written. Switching profiles removes the links, never the shed behind them. On Windows, directories become junctions with no special permission; single-file parts (agents, commands, fragments) need Developer Mode for a link, and without it lshed copies the file, says so, and treats it like any other copy (`save` still works for it).
263
+
264
+ A profile can build on another one with `extends`, so a machine-specific profile lists only what is different:
265
+
266
+ ```yaml
267
+ profiles:
268
+ default:
269
+ skills: [add-drivers, domain-modeling]
270
+ instructions: [main]
271
+ laptop:
272
+ extends: default # everything in default, plus:
273
+ packages: [gstack]
274
+ mcp: [notion]
275
+ lab:
276
+ extends: [default] # a list works too, applied in order
277
+ instructions: [lab-rules] # comes after default's `main`
278
+ ```
279
+
280
+ Inheritance only adds. The parent's parts come first, then the profile's own, and instructions keep that order in the generated `CLAUDE.md`. To get *less* than the parent, do not extend it; list what you want. A missing parent or a cycle is reported as a `lshed.yaml` error before anything is touched, and `lshed list` counts a part as used by every profile that inherits it.
281
+
248
282
  ### Adding things later
249
283
 
250
284
  Write a new skill, add an MCP server with `claude mcp add`, clone a toolkit into `~/.claude/skills/`. Then:
@@ -410,7 +444,7 @@ $ lshed add
410
444
  ```
411
445
  lshed init [--shed <dir>] [--profile <name>] [--exclude <id...>]
412
446
  lshed add [keys...] [--all] put things that appeared since init into the shed
413
- lshed restore [profile] [--pick] [--dry-run] [--no-backup] [--yes]
447
+ lshed restore [profile] [--pick] [--link | --no-link] [--dry-run] [--no-backup] [--yes]
414
448
  lshed status applied profile, drift, packages, missing env, new things
415
449
  lshed diff files (or JSON keys) that differ between local and shed
416
450
  lshed save [ids...] copy local edits back into the shed
@@ -429,7 +463,7 @@ Global options: `--shed <dir>` (or `LSHED_HOME`; after the first restore lshed r
429
463
 
430
464
  0. Installs any package in the profile that is missing, at the version in `lshed.lock`.
431
465
  1. Removes paths that the **previous** profile placed and the new one doesn't need.
432
- 2. Copies every part of the new profile into place; writes MCP entries into `~/.claude.json` and settings keys into `settings.json`.
466
+ 2. Copies every part of the new profile into place (or links it into the shed, with `--link` or on a machine that used it before); writes MCP entries into `~/.claude.json` and settings keys into `settings.json`.
433
467
  3. Regenerates the instructions file.
434
468
 
435
469
  Anything it overwrites or removes is backed up first under `~/.claude/lshed/backups/<timestamp>/`, unless you pass `--no-backup`. Files lshed never placed are left alone. `--dry-run` prints the plan and writes nothing.
@@ -447,7 +481,7 @@ On a conflict it aborts the rebase, leaves the shed clean with your commit intac
447
481
 
448
482
  ### Ownership
449
483
 
450
- The shed is the source of truth for authored parts: `save` copies local edits back for `file:` components. Packages are owned by their upstream: `update` pulls them, `save` ignores them.
484
+ The shed is the source of truth for authored parts: `save` copies local edits back for `file:` components, and a linked part is the shed. Packages are owned by their upstream: `update` pulls them, `save` ignores them.
451
485
 
452
486
  ## Where things live
453
487