sveltejs/cli

Repository tracker

Pull requests

chore: update esrap

#620
3 days ago • Jun 28, 2025
Figure out how to handle adding new comments during ast processing.

chore: use rolldown-vite (testing-only)

#606
3 days ago • Jun 28, 2025
This is not meant to be merged or anything. Just trying to see if any of the integrations breaks with this, or if everything still works.

Issues

sv create next steps do not work on windows

#621
3 days ago • Jun 28, 2025
It prints git init && git add -A && git commit -m "Initial commit" But on Windows you need to separate the commands with ; at least in PowerShell. Figure out if this also works in CMD

sv create allow download from playground

#602
11 days ago • Jun 20, 2025
Idea sv create --from-playground=id-or-hash Instead of downloading & saving, extracting, installing deps, we could do all of that directly

unpin vitest

#601
11 days ago • Jun 20, 2025
See https://github.com/sveltejs/cli/pull/600 Last working vitest version: 3.0.9 Relates: https://github.com/vitest-dev/vitest/issues/4497 https://github.com/vitest-dev/vitest/issues/8164 https://github.com/vitest-dev/vitest/discussions/6511

Community add-on support

#184
12 days ago • Jun 19, 2025
As Ben announced in his talk at Svelte Summit Fall 2024, community integrations are currently not supported. There is one simple reason for this: Our goal is to create an api for community integrations, that's not going to break compatibility every few weeks. Instead, we want you to build an integration once, that can be compatible for way longer. And this requires some careful thinking and time, that we did not had pre-launch. Feel free to subscribe this issue, we will keep you update here. You can find all relevant issues by filtering the issues that we are currently aware of by using the "community adders" label. One of the most important points is that we want to simplify our api and make it more flexible #85. This is also the reason, why there are currently no docs for creating community adders. For all of you that are too curious to wait to try it out you can already look at the current integrations that you can find here: packages/adders. If this is your first time passing by, consider looking at the mdsvex integration as the setup is one of the simplest, we currently have. Please keep in mind that everything you see, can and will change before community adders become available. If you had a look at the current integrations, and you want to do something with your integration that's currently not possible, please let us know. high level todos: #85 fix api flaws in core remove workspace:* references in community adder template re-add tar-fs (#577) or some alternative

run check command on all-addon test

#344
May 18, 2025
This should prevent stuff like #341 to happen again

Use { parse } from 'svelte/compiler'

#94
Mar 29, 2025
recast is using babel, which is much less used in the Svelte ecosystem, so folks wouldn't generally be as familiar with it

Add @sveltejs/enhanced-img

#496
Mar 24, 2025
I had been holding off because I thought one of the issues might necessitate changing the API, but it looks like that's not necessary and things should be pretty stable now. There's a webp and png in the demo app: https://github.com/sveltejs/cli/blob/d1f4432c0e31677ae754d50394547eeff820ddfe/packages/create/templates/demo/src/routes/%2Bpage.svelte#L3 We should just have the png and enhanced-img will generate the webp and avif automatically. It would also be nice to add to the skeleton project as I think no one should be shipping unoptimized images. For the skeleton app, it potentially could be a question like: What image optimization should be used? build-time optimization with @sveltejs/enhanced-img fetch from CDN with @unpic/svelte none Finally, I don't really like that images are currently stored in $lib/images. This seems like it will just become a huge unorganized catch-all. Images can live in the folder where they're used alongside the +page.svelte that includes them. This should help keep things a bit more organized. At least this was one of Rich's original arguments in favor of +page.svelte. But we don't really demonstrate that and guide users down that path today

tailwindcssadd property tailwindStylesheet to prettier config when both are installed

#507
Mar 24, 2025
Quick question: does it work with `prettier-plugin-tailwindcss`? [prettier-plugin-tailwindcss docs](https://github.com/tailwindlabs/prettier-plugin-tailwindcss?tab=readme-ov-file#specifying-your-tailwind-stylesheet-path). When using Tailwind CSS v4 you must specify your CSS file entry point, which includes your theme, custom utilities, and other Tailwind configuration options. To do this, use the tailwindStylesheet option in your Prettier configuration. { "tailwindStylesheet": "./src/app.css" } Originally posted by @sujyotraut in https://github.com/sveltejs/cli/issues/422#issuecomment-2633785112

npx sv migrate app-state only migrates some files

#368
Mar 23, 2025
Run it in the web directory of https://github.com/immich-app/immich and it won't migrate anything. Some stuff was already migrated in https://github.com/immich-app/immich/pull/14807, but it only got 9 out of 22 occurrences of $app/stores

prettier: monorepo support

#285
Feb 27, 2025
If you add prettier to a project in a monorepo it creates a new .prettierignore and .prettierrc, but I'd like it to ask whether to use the files in the monorepo root

Basic Vite template

#168
Jan 24, 2025
We could either run the Vite CLI or maybe better to copy their template if it doesn't change often. @bluwy @dominikg do you have any experience with that template or the Vite CLI and have any thoughts we should take into consideration?

add addon for houdini

#385
Jan 3, 2025
https://houdinigraphql.com/ given there's support for sql & drizzle, graphql would be good too. Have worked with houdini in multiple projects and its a big step up from bringing your own. cc @SeppahBaws @AlecAivazis

Failed linking community add-on template

#63
Dec 1, 2024
Windows doing bullshit as always again. After running pnpm start in ./community-adder-template and confirming the community adder warning, it failed creating the symbolic link: PS D:\dev\web\svelte-cli\community-adder-template> pnpm start > community-adder-template@0.0.0 start D:\dev\web\svelte-cli\community-adder-template > sv add -C temp --community file:../ ┌ Welcome to the Svelte CLI! (v0.5.0) │ ◇ Resolved community adder packages │ ▲ The Svelte maintainers have not reviewed community adders for malicious code. Use at your discretion. │ │ community-adder-template (v0.0.0) (D:\dev\web\svelte-cli\community-adder-template) │ ◇ Would you like to continue? │ Yes │ ■ Failed to resolve community adder packages └ Operation failed. EPERM: operation not permitted, symlink 'D:\dev\web\svelte-cli\community-adder-template' -> 'D:\dev\web\svelte-cli\packages\cli\node_modules\community-adder-template' Running exactly the same command from an administrator prompt fixes the issue.

'next steps' should omit git init if we are already in a git repo

#287
Nov 29, 2024
If you're creating a new app inside a git repo, 'next steps' includes this... git init && git add -A && git commit -m "Initial commit" (optional) ...and it should probably just say nothing

Explain 'preconditions' in docs

#240
Nov 29, 2024
The sv-add docs list the --no-preconditions option but with no clue as to what preconditions are and why I'd want to disable them (and when it would be safe to do so) Better still would be to get rid of the option altogether in my view — either they're preconditions (in which case you can't disable them without breaking stuff) or they're not

do we still need vitePreprocess in templates?

#210
Nov 29, 2024
see https://github.com/sveltejs/cli/issues/312

migration: remove vitePreprocess or add @migration-task to evaluate usage

#312
Nov 29, 2024
Describe the problem @bluwy @dominikg is vitePreprocess used for anything besides typescript support? Describe the proposed solution Remove vitePreprocess from the svelte config file or add @migration-task instructing the user to evaluate its usage. It is primarily used for TypeScript support and I think that exists natively in Svelte 5 now so that preprocessors are no longer required? Importance nice to have

Add proper typing for option conditions

#179
Nov 29, 2024
Source https://github.com/svelte-add/svelte-add/issues/397 Option types for option conditions are currently of type any, because we did not manage to implement that in the first place. But it should be possible to implement this, as other tools are doing this. Initially implement by https://github.com/svelte-add/svelte-add/pull/379 Review Conversation: https://github.com/svelte-add/svelte-add/pull/379#discussion_r1637798621

combine next steps prompt for create

#167
Nov 29, 2024
maybe we can have something like this: ◇ Next steps ──────────────────────────────────────────────────────────────╮ │ │ │ Getting started: │ │ 1: cd foo-bar │ │ 2: git init && git add -A && git commit -m "Initial commit" (optional) │ │ 3: pnpm run dev -- --open │ │ │ │ To close the dev server, hit Ctrl-C │ │ │ │ Integrations: │ │ drizzle: │ │ - You will need to set DATABASE_URL in your production environment │ │ - Run npm run db:push to update your database schema │ │ │ │ lucia: │ │ - Run npm run db:push to update your database schema │ │ - Visit /demo/lucia route to view the demo │ │ │ │ Stuck? Visit us at https://svelte.dev/chat │ │ │ ├────────────────────────────────────────────────────────────────────────────╯ │ └ You're all set!

Decide best practice for user ID in DB schema

#163
Nov 29, 2024
Drizzle adder uses an integer. Lucia uses a string It would be nice to be consistent both to promote best practices and to avoid users having to migrate their DB if they setup drizzle first and then come back later and setup lucia Some people don't like ints because it reveals how many users they have The Lucia integration is done app side. I'm not sure if that has downsides and would be better to be done in the database? It does use an extra dependency currently, but maybe there's a Node built-in we could leverage if we do want to do it app side?

Get rid of the --community flag

#84
Nov 29, 2024
It seems to me that a protocol like npm: or file: (or git:?) already communicates 'not part of sv itself' adequately, we don't need to add a flag as well. In other words why not just do this? npx sv add npm:your-npm-package npx sv add file:./path-to-your-adder (In the file: case it's nonsensical — it's not from the 'community' if it's only on my local machine. The same applies to things that only exist within an organisation.) The other example in the docs currently is npx sv add --community supabase. But that feels like a trap: do we award the supabase entry in the registry to the first Supabase integration that someone registers, or do we reserve it for one maintained by Supabase themselves? What if someone comes along with another Supabase integration that is better or more complete in some way — are we stuck with our original choice? How do we resolve conflicts? It's fine for us to maintain a registry that's just a list of npm packages that happen to be sv integrations. But maintaining a registry that allows for entries like supabase is just a guaranteed source of pain. npm already has a way to solve these problems, up to and including support staff who will step in if someone accuses someone else of squatting on a package name.

Convert to JavaScript

#80
Nov 29, 2024
The first thing I experience when I clone this repo and try to install dependencies is this:
image
IIUC what this is telling me is that I can't install anything because pnpm tries to link up the executables as part of the installation process, but it can't do that because the executable hasn't been built. I can't build the executable because I haven't installed dependencies. I'm sure this is fixable and if I bash my head against a wall for a couple of minutes I'll figure it out, but: we don't have to live this way. Svelte and SvelteKit are written in JS and don't have a build step (beyond generating .d.ts files during prepublish, or bundling the compiler for the playground in Svelte's case), and aside from avoiding this sort of headache it's been a real productivity win — I don't need to mess around with file watchers during dev, I don't need to deal with sourcemap flakiness or any of that nonsense, I can just pnpm link and I'm good to go. I can even make changes to this package inside another project's node_modules, and once I've done whatever I needed to do the changes are sitting there waiting for me to commit them — no more editing transpiled files and then painstakingly reapplying them to the source they were transpiled from. Not something we need to act on immediately, but I promise future us will thank us for making this change

Investigate loading community adders from CDN or with npx

#77
Nov 29, 2024
Loading via npx would mean that we need to pass options via CLI and keep that consistent, but are otherwise free to make changes to our APIs. Loading from something like esm.sh may allow them to have dependencies. That would let them control what version of our AST utils they utilize. That would also let us make changes to those APIs without breaking community adders. We might be able to use https://www.npmjs.com/package/@reejs/imports to help

Validate community adder's version of @sveltejs/cli-core

#55
Nov 29, 2024
We'll need to validate that the downloaded community adder is running a similar version of @svelte-cli/core as the executing instance of sv. If it fails, we'll prompt the user to update their version of sv. For version comparisons, we can probably use https://github.com/lukeed/semiver or https://github.com/npm/node-semver

Improvements for choosing community adders

#53
Nov 29, 2024
It's a bit surprising that --community only works with add and not create If you're using --community without specifying any args, I'd also expect it to ask you about the official adders still in addition to showing you the community adders