Svelte-Next is a command-line tool designed to automate updates and testing for Svelte 5+ projects across multiple directories. It simplifies the process of maintaining Svelte applications by handling package updates, Svelte installations, integration/e2e tests, and git commits in a single command.
Key Features:
Automatic Package Manager Detection: Supports bun, pnpm, yarn, and npm via lock-file analysis.
Svelte 5+ Targeting: Automatically skips projects below major version 5.
Dry-Run Option: Preview actions without execution for safe testing.
Git Workflow Integration: Commits changes with a standardized message after updates.
Test Execution: Runs integration/e2e tests if defined in the project scripts.
Audience & Benefit:
Ideal for developers and teams managing multiple Svelte projects, Svelte-Next streamlines project maintenance by automating tedious tasks. It ensures consistent package updates and testing across directories, reducing manual effort and improving efficiency.
> Automate Svelte 5+ version updates across multiple project directories.
svelte-next scans a target directory, detects Svelte 5+ projects, and runs package updates, svelte installs, integration/e2e tests, and git commits — all in one command.
Built in Go in a single static binary. It runs natively on macOS, Linux, and Windows.
Features
Automatic package manager detection — bun, pnpm, yarn, or npm, detected from lock files
Svelte 5+ targeting — projects below major version 5 are automatically skipped
list subcommand — read-only audit of all projects before making any changes
--dry-run — preview every action without executing anything
--exclude — skip specific directories by name
--latest / -L — update all packages to latest, ignoring semver ranges
--from / -f — resume from a specific subdirectory index
Git workflow — git add -A, git commit, git push after each successful update
Integration/e2e tests — runs test:integration or test:e2e scripts if present
Motivational quote — fetched from a public API at the end of each run
Installation
Homebrew (macOS and Linux)
brew tap shinokada/homebrew-svelte-next
brew install svelte-next
To upgrade:
brew upgrade svelte-next
Go install
If you have Go 1.21 or later installed:
go install github.com/shinokada/svelte-next@latest
The binary will be placed in $GOPATH/bin (usually ~/go/bin). Make sure that directory is on your PATH.
Debian / Ubuntu (deb)
Download the .deb for your architecture from the releases page:
Or download the .zip for your architecture from the releases page, extract it, and add the directory to your PATH. No WSL, Git Bash, or Cygwin needed — the binary runs natively in CMD and PowerShell.
Requires Go 1.21 or later — see go.dev/dl to install.
git clone https://github.com/shinokada/svelte-next.git
cd svelte-next
make build # binary written to ./bin/svelte-next
make install # installs to $GOPATH/bin
Requirements
At runtime the binary only needs:
A supported package manager on PATH: bun, pnpm, yarn, or npm
git (only if the git workflow is enabled)
Package Manager Detection
Lock-file priority (first match wins):
Lock file
Package manager
bun.lockb
bun
bun.lock
bun (≥ 1.1)
pnpm-lock.yaml
pnpm
yarn.lock
yarn
package-lock.json
npm
(none found)
pnpm (default)
Usage
list — audit projects without making changes
# List all Svelte projects in the current directory
svelte-next list .
# List projects, skipping 'api' and 'docs' directories
svelte-next list --exclude "api,docs" .
# Output as JSON (useful for scripting)
svelte-next list --output json .
# List projects in a specific directory
svelte-next list ./projects
update — update Svelte projects
# Update all Svelte 5+ projects in the current directory
svelte-next update .
# Preview every action without executing anything
svelte-next update --dry-run .
# Update projects in a specific directory
svelte-next update ./projects
# Update all packages to latest (ignores semver ranges)
svelte-next update -L .
# Install a specific Svelte version
svelte-next update -n 5.28.1 .
# Skip directories named 'api' and 'docs'
svelte-next update --exclude "api,docs" .
# Start from subdirectory index 3 (useful for resuming)
svelte-next update -f 3 .
# Skip individual workflow steps
svelte-next update -p . # skip package manager update
svelte-next update -s . # skip svelte install
svelte-next update -t . # skip integration/e2e tests
svelte-next update -g . # skip git add/commit/push
# Combine flags
svelte-next update -pg .
svelte-next update -pst .
# Debug output
svelte-next update -d .
Other
svelte-next --version
svelte-next --help
svelte-next update --help
svelte-next list --help
Flag Reference
update
Flag
Short
Default
Description
--latest
-L
false
Update all packages to latest (ignores semver)
--skip-pkg
-p
false
Skip package manager update
--skip-svelte
-s
false
Skip svelte install
--skip-test
-t
false
Skip integration/e2e tests
--skip-git
-g
false
Skip git add/commit/push
--dry-run
—
false
Preview actions without executing
--exclude
—
—
Comma-separated directory names to skip
--from
-f
0
Start at subdirectory index N
--next
-n
—
Specific Svelte version to install
--debug
-d
false
Debug output
list
Flag
Default
Description
--exclude
—
Comma-separated directory names to skip
--output
table
Output format: table or json
--debug
false
Debug output
Package Manager Commands
Action
pnpm
npm
yarn
bun
Install
pnpm add
npm install
yarn add
bun add
Update
pnpm update
npm update
yarn upgrade
bun update
Update latest
pnpm up -L
npx npm-check-updates -u
yarn upgrade --latest
bun update --latest
Run script
pnpm
npm run
yarn
bun
> npm note:--latest uses npm-check-updates since npm has no native equivalent. This rewrites package.json before reinstalling.
How It Works
For each subdirectory in the target path, svelte-next update does the following:
Checks for package.json with a svelte dependency
Skips the directory if Svelte major version is below 5
Detects the package manager from lock files
Runs the package manager update (unless -p)
Installs the target Svelte version (unless -s)
Runs test:integration or test:e2e if the script exists (unless -t)
Runs git add -A, git commit, git push if inside a git repo (unless -g)
At the end of a successful run, a motivational quote is fetched from a public API.
With --dry-run, every step is printed as [dry-run] and nothing is executed.
Notes
Only subdirectories are scanned — files at the top level of the target directory are ignored
Hidden directories (names starting with .) are always skipped
--exclude matches exact directory names (case-sensitive); glob patterns are not supported in v1
If no lock file is found, pnpm is used as the default package manager
The git commit message is automatically set to chore: update svelte to