From 139226741503f76313d79d6ed20181535d6b100d Mon Sep 17 00:00:00 2001 From: saberzero1 Date: Thu, 12 Mar 2026 00:56:35 +0100 Subject: [PATCH] docs: install local commands --- docs/cli/plugin.md | 27 +++++++++++++++++++++++++++ docs/cli/update.md | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/docs/cli/plugin.md b/docs/cli/plugin.md index 32ea977cf..8ba4796cc 100644 --- a/docs/cli/plugin.md +++ b/docs/cli/plugin.md @@ -32,6 +32,16 @@ npx quartz plugin add git+https://github.com/username/repo.git#my-branch npx quartz plugin add https://github.com/username/repo.git#my-branch ``` +You can also add a plugin from a local directory. This is useful for local development or airgapped environments: + +```shell +npx quartz plugin add ./path/to/my-plugin +npx quartz plugin add ../sibling-plugin +npx quartz plugin add /absolute/path/to/plugin +``` + +Local plugins are symlinked into `.quartz/plugins/`, so any changes you make to the source directory are reflected immediately without re-installing. + When a branch is specified, it is stored in the lockfile. All subsequent commands (`install`, `update`, `restore`, `check`, `resolve`) will respect that branch automatically. ### remove @@ -183,6 +193,23 @@ The branch ref is tracked in `quartz.lock.json`, so `update` and `check` will co Both `prune` and `resolve` will fall back to `quartz.config.default.yaml` if no `quartz.config.yaml` is present. +### Local Plugin Development + +For local plugin development or airgapped environments, you can add a plugin from a local directory: + +```shell +npx quartz plugin add ./my-local-plugin +``` + +Local plugins are symlinked into `.quartz/plugins/`, so changes reflect immediately. When you run `update`, local plugins are rebuilt (npm install + npm run build) without any git operations. The `check` command will show local plugins with a "local" status instead of checking for remote updates. + +To switch a local plugin back to a git source: + +```shell +npx quartz plugin remove my-local-plugin +npx quartz plugin add github:username/my-local-plugin +``` + ## Interactive Mode Running the plugin command without any subcommand will launch the [[cli/tui|TUI]], which provides a visual interface for all these operations. diff --git a/docs/cli/update.md b/docs/cli/update.md index fab9b7272..28be49c97 100644 --- a/docs/cli/update.md +++ b/docs/cli/update.md @@ -20,7 +20,7 @@ npx quartz update my-plugin another-plugin ## How it Works -For each plugin, `update` fetches the latest commit from the plugin's remote repository and rebuilds it. If a plugin was installed from a specific branch (e.g., `github:user/repo#my-branch`), updates will track that branch instead of the default branch. The lockfile (`quartz.lock.json`) is updated with the new commit hashes. +For each plugin, `update` fetches the latest commit from the plugin's remote repository and rebuilds it. If a plugin was installed from a specific branch (e.g., `github:user/repo#my-branch`), updates will track that branch instead of the default branch. Local plugins (added from a file path) are rebuilt without any git operations. The lockfile (`quartz.lock.json`) is updated with the new commit hashes. This is functionally identical to running: