π½οΈ A CLI to quickly initialize new projects from custom templates! π¦οΈ
- π§© Generate projects from custom YAML templates
- π Define project structure easily with YAML
- π§ Run shell commands as part of initialization
- π§° Automatically modify JSON files
- π Dynamic variables in templates (
{{ variable }}) - β‘οΈ Native Bun support for fast performance
bun install -g @piarre/ide@3.0.0Templates are stored in the ~/.ide/ directory.
mkdir -p ~/.ideExample template:
# ~/.ide/ts.yml
name: ts
description: Create a TypeScript project
options:
- name: "git"
command: "-g, --git"
description: "Initialize a git repository"
execute:
- "git init"
actions:
- files:
- path: src/index.ts
content: |
console.log("Hello, {{ name }}!");
- path: tsconfig.json
content: |
{
"compilerOptions": {
"module": "CommonJS",
"target": "ESNext",
"outDir": "./out",
"skipLibCheck": true
},
"include": ["src/**/*"],
"exclude": ["node_modules"]
}
commands:
- "npm init -y"
- "npm i -D typescript @types/node tsup ts-node"# Create a new project in a dedicated folder
ide ts -n my-project
# Create in the current directory
cd empty-folder
ide tside ts --display-templateUse {{ variable }} in your YAML files or commands to inject values passed as options.
options:
- name: "username"
command: "-u, --username <username>"
description: "Your username"
files:
- path: README.md
content: |
# Project by {{ username }}--directory <name>: Create the project in a specific directory--display-template: Show the template content without running actions
More info at ide.piarre.app.
This project is MIT licensed.
Piarre - GitHub