Skip to Content
dimah-s3v2.8.1
Resources

CLI

Scaffold a dimah-s3 starter app with npx @dimah-s3/cli create, interactively or with flags.

@dimah-s3/cli creates a new app from an official starter, with a working upload route, the client, and the UI already wired. It needs Node.js 22 or newer.

npx @dimah-s3/cli create

Without flags it asks for the project name, the starter, and whether to install dependencies and initialize git. Pass flags to skip the questions:

npx @dimah-s3/cli create my-app --template vite --yes

Starters

IdStack
nextjsNext.js App Router. The default
viteReact SPA on Vite, with a Hono API next to it
honoHono API that also serves the Vite React app

Each starter has an upload route, S3Provider, and an upload button. create writes a generated DIMAH_S3_SECRET to .env; fill in the S3_* values, then allow your app's origin in the bucket CORS rules.

Options

FlagDefaultDescription
[dir]askedProject directory and package name. . uses the current directory
-t, --template <id>nextjsnextjs, vite, or hono
--package-manager <pm>The one that ran the commandpnpm, npm, yarn, or bun
--install / --no-install--installInstall dependencies
--git / --no-git--gitInitialize a repository with a first commit
--src / --no-src--srcNext.js only: keep app code under src/, or move it to the root
--overwriteoffReplace the contents of a non-empty directory. .git and .env are kept
-y, --yesoffSkip the prompts and use the defaults. Needs [dir]

[dir] is also required when there is no terminal to prompt in. An unknown flag fails instead of being ignored.

On this page