docs: install local commands

This commit is contained in:
saberzero1 2026-03-12 00:56:35 +01:00
parent 30a01a8856
commit 1392267415
No known key found for this signature in database
2 changed files with 28 additions and 1 deletions

View File

@ -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 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. 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 ### 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. 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 ## Interactive Mode
Running the plugin command without any subcommand will launch the [[cli/tui|TUI]], which provides a visual interface for all these operations. Running the plugin command without any subcommand will launch the [[cli/tui|TUI]], which provides a visual interface for all these operations.

View File

@ -20,7 +20,7 @@ npx quartz update my-plugin another-plugin
## How it Works ## 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: This is functionally identical to running: