Skip to main content

sv add

sv add updates an existing project with new functionality.

Usage

npx sv add
npx sv add [add-ons]

You can select multiple space-separated add-ons from the list below, or you can use the interactive prompt.

Options

-C, --cwd

Path to the root of your Svelte(Kit) project.

--no-git-check

Even if some files are dirty, no prompt will be shown

--no-download-check

Skip all download confirmation prompts

[!IMPORTANT] Svelte maintainers have not reviewed community add-ons for malicious code. Use at your discretion

--install <package-manager>

Installs dependencies with a specified package manager:

  • npm
  • pnpm
  • yarn
  • bun
  • deno

--no-install

Prevents installing dependencies

Official add-ons

Community add-ons

Community add-ons are currently experimental. The API may change. Don’t use them in production yet!

Svelte maintainers have not reviewed community add-ons for malicious code!

You can find community add-ons on npm by searching for keywords:sv-add.

How to install a community add-on

npx sv add [PROTOCOL][COMMUNITY_ADDON]

You can:

  • mix and match official and community add-ons
  • use the interactive prompt or give args to the cli
  • use the --add option in the create command
npx sv add eslint "@supacool"
npx sv create --add eslint "@supacool"

Package Protocols

# Scoped package: @org (preferred), we will look for @org/sv
npx sv add "@supacool"

# Regular npm package (with or without scope)
npx sv add my-cool-addon

# Local add-on
npx sv add file:../path/to/my-addon

How to create a community add-on

To start on a good track, create your add-on with the addon template.

npx sv create --template addon [path]

In your new add-on directory, check out the README.md and CONTRIBUTING.md to get started.

Then you can continue with the API docs to start building your add-on. You can also have a look at the official addons source code to get some inspiration on what can be done.

Edit this page on GitHub llms.txt

previous next