[Feature]: Add an instatic CLI for creating and managing isolated sites
Problem
Creating a second Instatic site currently requires manually configuring a separate database, uploads directory, secret, and ports—or creating another deployment by hand.
This makes it easy for new users to confuse the Instatic application repository with a site’s runtime data, accidentally start two sites against the same database, or overwrite an existing site when trying to create a new one.
A first-class CLI would make the intended model clear: one Instatic application can manage multiple isolated site instances, each with its own persistent data.
Proposed solution
Add an instatic CLI for local site lifecycle management.
The smallest useful version could support:
instatic create my-site
instatic dev my-site
instatic list
instatic export my-site
instatic import my-site site.zipinstatic create should:
- Create an isolated site directory or configuration entry
- Allocate a separate SQLite database and uploads directory
- Generate a site secret
- Choose or validate available ports
- Start with the normal setup wizard
- Clearly print the site URL and storage locations
Running instatic create must never reuse or overwrite an existing database or uploads directory by default.
A later version could support:
- Postgres-backed sites
- Docker/provider deployment
instatic update, preserving all site data while updating the application- Optional Git initialization for site snapshots/configuration
- Backup/restore commands
- Importing a static HTML/CSS/media ZIP during creation
Alternatives considered
The current workaround is to run the same checkout multiple times with different values for DATABASE_URL, UPLOADS_DIR, PORT, and VITE_PORT. This works, but it is easy to misconfigure and is not discoverable for users who expect a site to be a project.
Cloning the Instatic repository per site is also possible, but it duplicates application source code and does not provide a clear lifecycle for site data.
The existing site export/import flow is useful for snapshots and migration, but it does not create or manage isolated local instances.
Area
Deployment
Source: CoreBunch/Instatic