tools-template-cli
v0.1.2
Published
CLI for cloning starter templates from this repository into fresh project directories
Downloads
35
Maintainers
Readme
tmp-cli
tmp-cli is a small CLI for cloning starter templates from this repository into a new project directory.
Install globally with your preferred package manager:
npm install -g tools-template-cli
pnpm add -g tools-template-cli
bun add -g tools-template-cliThen run:
tmp-cli listFastest way to create a project:
tmp-cli create yuyiThat will show a template list, let you choose one, and then generate the project in ./yuyi.
What it does
- Lists the templates bundled with the package
- Copies a template into a new target directory
- Skips
.git,node_modules,.DS_Store, and common build output directories - Renames basic config values for JavaScript templates
- Optionally runs your package manager install step
- Optionally initializes a fresh git repository
Available templates
Current templates:
supabase-expo-appsupabase-user-managementsupabase-swiftui-appsupabase_flutter_app
Check the latest packaged list at any time:
tmp-cli listUsage
Pass the target directory first and choose the template with a flag:
tmp-cli create ./apps/mobile --template supabase-expo-app
tmp-cli create ./apps/admin --template supabase-user-managementOr pass only the target directory and choose from the interactive template list:
tmp-cli create yuyi
tmp-cli create ./apps/adminInitialize git in the generated project:
tmp-cli create admin-app --template supabase-user-management --gitInstall dependencies immediately after generation:
tmp-cli create my-mobile-app --template supabase-expo-app --install
tmp-cli create admin-app --template supabase-user-management --installOverride the display name for supported templates:
tmp-cli create my-mobile-app --template supabase-expo-app --name "My Mobile App"Overwrite an existing non-empty target directory:
tmp-cli create my-mobile-app --template supabase-expo-app --forceCommands
tmp-cli list
Prints all packaged templates.
tmp-cli listtmp-cli create
Create a project from one of the packaged templates.
tmp-cli create yuyi
tmp-cli create <target-directory> --template <template> [options]Options:
-t, --template <name>: template name to copy-n, --name <display-name>: display name for supported templates-p, --package-manager <tool>:npm,pnpm,yarn, orbun-f, --force: overwrite a non-empty target directory-i, --install: run install after copy-g, --git: rungit initin the generated directory-h, --help: show help-v, --version: show the CLI version
Examples
Expo app:
tmp-cli create my-mobile-app --template supabase-expo-app --name "My Mobile App"
cd my-mobile-app
npm installNext.js app:
tmp-cli create admin-app --template supabase-user-management --git
cd admin-app
npm installNested target directory:
tmp-cli create ./apps/admin --template supabase-user-management --installTemplate behavior
These templates get automatic config renaming:
supabase-expo-appsupabase-user-management
That includes updates in files such as:
package.jsonpackage-lock.jsonapp.jsonREADME.md
The SwiftUI and Flutter templates are copied as-is apart from the target directory name and README reference.
Local development
Use the local source directly while working on the CLI:
npm install
npm run build
npm link
tmp-cli listOr run the compiled output directly:
npm run build
node dist/index.js helpInstall notes
- npm global install:
npm install -g tools-template-cli - pnpm global install:
pnpm add -g tools-template-cli - bun global install:
bun add -g tools-template-cli
After installation, the command is always:
tmp-cliPackage
- npm package:
tools-template-cli - global command:
tmp-cli
