A CLI tool for quickly setting up Google Apps Script (GAS) projects.
npm create macroor
npx create-macronpm create macroFollow the prompts to configure your project:
- Project name
- Language (TypeScript / JavaScript)
- Whether to auto-create a GAS project
- Project type (standalone, sheets, docs, forms, slides, webapp)
npm create macro my-project -- --yesCreates 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)
# Create project
npm create macro my-project
# Change directory
cd my-project
# Build
npm run build
# Push to GAS
npm run push
# (Optional) Open in browser
npm run open- 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:
- Visit https://script.google.com/home/usersettings
- Turn on "Google Apps Script API"
MIT