Skip to content

Add skillshare link / unlink to create and remove followed source links #419

Closed

Description

@runkids

Follow-up to #274 / #417.

Problem

follow_source_links only follows a link that already exists directly under the skills source. Creating that link is left to the user, and that is where the friction is:

  • On Windows the user has to decide between a junction and a directory symlink, know that mklink /D needs Developer Mode or elevation, and spell an absolute target.
  • The guards (target is the source or a parent of it, target overlaps sync target …, target is a link chain that could not be resolved) only surface in doctor after the link was created.
  • The dashboard has no way to add a followed folder at all; the user cannot be told to run ln -s from a web page.

Proposal

CLI

skillshare link <path> [--name <link-name>] [-p]
skillshare unlink <name> [-p]
  • link creates <source>/<link-name> pointing at <path>. The default name is _<basename of path>.
  • Before creating, run the same checks as sourcewalk.Follow.check: refuse a target that is the source or a parent of it, one that overlaps an active skills sync target, or one that resolves to a link chain. Print the reason and exit non-zero.
  • Warn, but do not refuse, when the target is not a git checkout.
  • Windows: use a junction when the target is a local absolute directory (no privilege needed); try a directory symlink only when a junction cannot be used.
  • When follow_source_links is false, do not change the config silently. Print the one-line hint that doctor already prints. An explicit --enable may flip the setting.
  • unlink <name> removes only the link entry, never the target directory. uninstall <name> on a first-level link already does this, so unlink should share that code path rather than duplicate it.
  • Nested links and relative link text must behave the same way uninstall, trash and restore treat them on the feat: follow first-level source links (follow_source_links) #417 branch.

Dashboard

A "Link folder" action on the skills page (path input, optional name), backed by a handler that runs the same checks and returns the guard reason as the error message.

Docs

reference/commands/link.md and unlink.md, the follow_source_links section of reference/targets/configuration.md, the FAQ, and all four translations (ja, ko, zh-Hans, zh-Hant).

Out of scope

Following links deeper than one level, and auto-detecting candidate folders.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions