Skip to content

CLI Commands

Oink offers three commands. Together they let you register packages, link them, and reset the registry when needed.

Links a learned package into the current project.

FlagDescription
[package]Optional package name. If omitted, Oink opens an interactive fzf picker filtered to packages both learned and installed.
--dest [path]Override the destination directory (defaults to process.cwd()). Passing the flag without a value falls back to the current directory.
--livereloadWatch the source package for file changes and re-run the linking queue.
--repromptAfter the current job finishes, restart the CLI so you can link the next package. Handy when linking several packages back to back.
--debounce [ms]Set the file-watch debounce window. Defaults to 200. Values below 200 are clamped to that minimum.
  1. Oink checks that the destination has a named package.json and installed dependencies.
  2. Learned packages from ~/.config/oink/link/ are filtered to those this project depends on (all workspace children if the destination is a root workspace).
  3. It runs the build and copy steps one at a time so results stay consistent.
  4. With --livereload, Oink watches the source folder, ignores paths from .gitignore, and only keeps the newest queued change.
  5. Logs stream to the terminal, and desktop notifications appear on success or failure.

Registers packages so they appear in the picker and can be linked later.

  • No pattern: Oink checks whether the current directory is a Yarn or PNPM workspace root. If so, every child package is learned; otherwise just the current folder.
  • Pattern provided: the glob (keep it quoted) is expanded to every package.json. Each valid package becomes a symlink under ~/.config/oink/link/.
  • Success messages for each learned package.
  • Warnings when a target folder lacks a valid package.json name.
  • A summary when several packages are processed at once.

Clears the learned registry by deleting every symlink under ~/.config/oink/link/.

Use this when:

  • You reorganise packages and want a clean slate.
  • Symlinks point at folders that were removed or need fresh permissions.

Oink recreates the base folder automatically, so the next oink learn call works right away.