Test-drive self-contained .svelte components from the terminal: preview them in a locally hosted Svelte playground and run the official Svelte autofixer. One dependency-free CLI, talking to a "core" server that can live on any machine on your network.
Not affiliated with the Svelte team. Independent project reusing the MIT-licensed playground from sveltejs/svelte.dev and the
@sveltejs/mcpautofixer.
| Command | What it does |
|---|---|
open <file.svelte> |
Push the file to the playground and open it in the browser. Re-running after an edit updates the already-open tab. |
best-practices <file.svelte> |
Run the Svelte autofixer on it (exit 1 on issues). --json too. |
config |
View or edit ~/.svelte-utils (host, repo, port). |
server <start|stop|status> |
Manage a local server (downloads a prebuilt bundle; uses a repo clone if you have one). |
daemon <install|uninstall|status|logs> |
Install the core as a systemd service (Linux). No repo clone needed. |
update (alias upgrade) |
Update the CLI — and this machine's server/daemon, if it runs one — to the latest release. |
Type-checking is deliberately not included. It needs your project's tsconfig, .svelte-kit/, and node_modules to resolve $app/*, $lib/*, and relative imports — none of which a single file pushed to a remote server can carry. Use the project's own svelte-check (pnpm check) for that.
CLI (any machine, Node 20+):
curl -fsSL https://davis7dotsh.github.io/svelte-utils/install.sh | shCore (the server machine): install the CLI the same way, then:
svelte-utils daemon installThis downloads a prebuilt server bundle and installs it as a systemd service on 0.0.0.0:7488. Later svelte-utils update runs update the server too and restart the daemon.
The server records every open and best-practices request locally as pretty-printed JSON in ~/.config/svelte-utils/data/YYYY-MM-DD/. Each record contains the complete component source and command result. Set XDG_CONFIG_HOME to move the config root or SVELTE_UTILS_DATA_DIR to override the data directory directly; no records are sent elsewhere.
Point other machines at it:
svelte-utils config set host http://<core-machine>:7488MIT. Includes MIT-licensed code from sveltejs/svelte.dev.