GitHub

update

Interactively update your blocks to the latest code in the registry.

npx jsrepo update

Usage

Choose which blocks to update.

npx jsrepo update

Update a specific block.

npx jsrepo update utils/math

✨ Update with AI ✨

jsrepo now supports updating your components using an LLM. This is great for when you have updated local components and overwriting from remote is not an option.

Now after viewing the diff between the local and remote file you have 3 options. "Accept", "Reject" and "Update with AI". If you choose "Update with AI" you will be prompted to choose a model and provide the an API token. Once you have provided your API token jsrepo prompts the LLM to update the file then returns the diff of the local file to the updated remote file.

See the demo below:

The models in the demo above may not be up to date see the model list below.

Options

--all

Update all installed components.

Usage

npx jsrepo update --all
-E, --expand

Expands the diff past the limit set by --max-unchanged so that you can see the entire file.

Usage

npx jsrepo update --expand
--max-unchanged

Sets a limit on the maximum unchanged lines to display in a diff before it is collapsed. default: 3

Usage

npx jsrepo update --max-unchanged 10
-n, --no

Do update any blocks.

Usage

npx jsrepo update --no
--repo

The repository to download the blocks from.

Usage

npx jsrepo update --repo github/ieedan/std
-A, --allow

Allow 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.

Usage

npx jsrepo update github/ieedan/std/utils/math --allow
-y, --yes

Skips confirmation prompts. (Not including permissions prompts)

Usage

npx jsrepo update --yes
--verbose

More verbose logging. (May be used to troubleshoot issues)

Usage

npx jsrepo update --verbose
--cwd

Run the current command on the provided directory absolute or relative.

Usage

npx jsrepo update --cwd ./sites/docs
-h, --help

Help with the command.

Usage

npx jsrepo update --help