sst.config.ts and sst install your providers.
If this is run in a Next.js, Remix, Astro, or SvelteKit project, it’ll init SST in drop-in mode.
Options
--yes
Skip interactive confirmation for detected framework.
How it works
When you runsst init, the CLI will:
- Detect any existing framework in your project (Next.js, Remix, Astro, SvelteKit, etc.)
- Create an appropriate
sst.config.tsfile for your project - Modify your
tsconfig.jsonif needed (for frameworks like Next.js) - Add SST to your
package.json - Install the required providers
Framework detection
Thesst init command automatically detects the following frameworks:
- Next.js - Detects
next.config.*files - React Router - Detects
react-router.config.*files - Astro - Detects
astro.config.*files - SolidStart - Detects
app.config.*with@solidjs/start - TanStack Start - Detects
app.config.*with@tanstack/ - Nuxt - Detects
nuxt.config.*files - SvelteKit - Detects
svelte.config.*files - Remix - Detects
remix.config.*orvite.config.*with@remix-run/dev - Analog - Detects
vite.config.*with@analogjs/platform - Angular - Detects
angular.jsonfiles
- A vanilla template (for non-framework projects)
- A JavaScript template
Examples
Initialize with auto-confirmation
Skip the interactive prompt and automatically proceed with the detected configuration:Initialize in a Next.js project
When run in a Next.js project, this will:- Create an
sst.config.ts - Modify the
tsconfig.json - Add
ssttopackage.json
Related
sst install- Install providers after modifying your configsst add- Add a new provider to your project