Add blocks to your project from a registry.
jsrepo add
Choose a block to add from the registries in your jsrepo.json file:
jsrepo add
Add a partially qualified block using the registries in your jsrepo.json file:
jsrepo add utils/math
Add a fully qualified block:
jsrepo add @ieedan/std/utils/math
Include another registry in the blocks list:
jsrepo add --repo @ieedan/std
--watermarkInclude a watermark at the top of added files. (For non-interactive zero-config adds)
jsrepo add --watermark true
--testsInclude tests along with the blocks when adding them. (For non-interactive zero-config adds)
jsrepo add --tests true
--formatterConfigure the formatter used when adding and updating blocks. (prettier, biome, none) (For non-interactive zero-config adds)
jsrepo add --formatter prettier
--pathsAllows you to specify where to install categories. A mirror of the paths functionality in the jsrepo.json file. (For non-interactive zero-config adds)
jsrepo add --paths utils=./src/blocks/utils,ui=./src/blocks/ui
-E, --expandExpands the diff past the limit set by --max-unchanged so that you can see the entire file.
jsrepo add --expand
--max-unchangedSets a limit on the maximum unchanged lines to display in a diff before it is collapsed. (default: 3)
jsrepo add --max-unchanged 10
--repoThe repository to download the blocks from.
jsrepo add --repo @ieedan/std
-A, --allowAllow jsrepo to download code from the provided repo. This skips the initial confirmation prompt when attempting to download a block from a registry not listed in the jsrepo.json file.
jsrepo add @ieedan/std/utils/math --allow
-y, --yesSkips confirmation prompts. (Not including permissions prompts)
jsrepo add --yes
--no-cachePrevents caching the git provider state. Useful if the cache is incorrect due to changing the default branch for a repository or changing a tag into a head or vise versa.
jsrepo add --no-cache
--verboseMore verbose logging. (May be used to troubleshoot issues)
jsrepo add --verbose
--cwdRun the current command on the provided directory absolute or relative.
jsrepo add --cwd ./sites/docs
-h, --helpHelp with the command.
jsrepo add --help