Create GAS projects with clasp in one command
npm install create-macroA CLI tool for quickly setting up Google Apps Script (GAS) projects.
``bash`
npm create macro
or
`bash`
npx create-macro
`bash`
npm create macro
Follow the prompts to configure your project:
1. Project name
2. Language (TypeScript / JavaScript)
3. Whether to auto-create a GAS project
4. Project type (standalone, sheets, docs, forms, slides, webapp)
`bash`
npm create macro my-project -- --yes
Creates a project with default values:
- Language: TypeScript
- Create GAS project: Yes
- Project type: standalone
| Option | Short | Description |
|--------|-------|-------------|
| --yes | -y | Skip all prompts with default values |--help
| | -h | Show help |--version
| | -v | Show version |
``
my-project/
├── src/
│ ├── main.ts (or main.js)
│ └── appsscript.json
├── dist/ (generated after build)
├── .clasp.json
├── .gitignore
├── package.json
└── tsconfig.json (TypeScript only)
`bashCreate project
npm create macro my-project
- Node.js >= 18
- Google account
- Google Apps Script API enabled (see below)
To auto-create GAS projects, you need to enable the Google Apps Script API:
1. Visit https://script.google.com/home/usersettings
2. Turn on "Google Apps Script API"
MIT