Once you have these, installation should be as simple as running this following in your command line:
Snaplet will ask you a few questions to set up snaplet for your project. Along the way, it tries to detect the package manager used for your project and uses this to download the snaplet npm packages needed for your project.
Snaplet can either be self-hosted or accessed as a web app via our cloud service, Snaplet cloud. The choice is yours!
We recommend beginning with Snaplet cloud (opens in a new tab). Sign up for free and start utilizing your data in mere minutes!
For those looking to delve deeper or self-host Snaplet, try our user-friendly
snaplet setup CLI wizard!
When you run
snaplet setup, you will be asked a few questions to complete setup, and generate a
snaplet.config.ts configuration file for your project.
Snaplet requires the following dependencies to be present in your project:
package.json: to determine where to install snaplet packages to
- a package manager lockfile to be present for your project - to detect which package manager you are using
If you do not have a
package.json, you can add one to your project with:
We look for a package manager lockfile for npm, pnpm, yarn, or bun. If you do not have a lockfile for your project, or you are using a different package manager, you can still install snaplet npm packages manually:
@snaplet/seed has been installed as a dependency, we still need to generate the assets that
@snaplet/seed uses - snaplet looks at your database and generates a library that corresponds to your database structure.
If you are familiar with
@prisma/client (opens in a new tab), you can think of
snaplet generate doing the same thing, just in this case for
@snaplet/seed rather than
This can be done by running:
npx snaplet generate