tenex-templates
v1.2.2
Published
A CLI to initialize framework projects from templates with interactive prompts and robust file handling.
Maintainers
Readme
tenex-templates
A simple node CLI to initialize framework projects from templates with interactive prompts and robust file handling.
Installation
npm install -g tenex-templatesUsage
tenex-templates [framework]- If you provide a framework (e.g.
tenex-templates hono), it will use that template. - If you omit the framework, you’ll be prompted to select one from the list.
You’ll then be prompted for your project name and any other questions defined by the template.
Example
tenex-templates- Select a framework (e.g.
hono) - Enter your project name (e.g.
my-hono-app) - Answer any custom prompts (e.g. database name, user, password, deploy to Fly IO, etc)
- The CLI will scaffold your project in a new directory, install dependencies, and run any setup steps.
Template Authoring
Templates live in the templates/ directory. Each framework has:
template.yaml— defines steps and promptssample/— the actual files to copy
Example template.yaml
steps:
- name: Copy Template Files
description: Copying template files
run: copy_template_files
- name: Install Dependencies
description: Installing dependencies
run: bun install
- name: Initialize Database
description: Setup DB
prompts:
- name: DB_NAME
message: Enter the database name
type: input
- name: DB_USER
message: Enter the Postgres user
type: input
default: postgres
run: |
echo "DATABASE_URL=postgresql://$DB_USER@localhost:5432/$DB_NAME" > .env
bunx prisma db push- Use
[[project_name]]in any file or filename insample/to have it replaced with the actual project name.
Development
npm install
npm run build
npm startPublishing
npm publish --access publicLet me know if you want to add usage examples, badges, or more advanced template authoring docs!
