A project for managing and automating Google Apps Script development using clasp. This tool streamlines the development workflow for Google Apps Script projects with automated deployment and development tools integration.
- JavaScript/TypeScript support for Google Apps Script development
- Automated project management with clasp
- Watch mode for real-time development
- ESLint and Prettier integration for code quality
- Utility scripts for common operations
- Environment-based configuration
- Advanced clasp features support
- Node.js (Latest LTS version recommended)
- npm or yarn
- Google Account with Apps Script API enabled
- Google Cloud Project with OAuth 2.0 credentials (for advanced features)
- Clone the repository:
git clone [your-repo-url]
cd helper- Install dependencies:
npm install- Copy the environment template and configure your settings:
cp .env.template .env- Configure your environment variables in
.env:
# Required Settings
SCRIPT_ID=your_script_id_here
PROJECT_NAME=your_project_name_here
# OAuth 2.0 Client Settings (for advanced features)
GOOGLE_CLIENT_ID=your_client_id_here
GOOGLE_CLIENT_SECRET=your_client_secret_here
GOOGLE_REFRESH_TOKEN=your_refresh_token_here
# Optional Settings
DEPLOYMENT_ID=your_deployment_id_here
VERSION=head
SPREADSHEET_ID=your_spreadsheet_id_here
FOLDER_ID=your_drive_folder_id_here
# Development Settings
DEBUG=true
LOG_LEVEL=debug|info|warn|errornpm run push- Push changes to Google Apps Scriptnpm run pull- Pull latest changes from Google Apps Scriptnpm run open- Open project in Google Apps Script editornpm run status- Check project statusnpm run watch- Watch for changes and auto-pushnpm run create- Create a new Google Apps Script projectnpm run clone- Clone an existing Google Apps Script project
├── GAS/ # Google Apps Script files
│ └── .claspignore # Clasp ignore patterns (*.js, *.gs, appsscript.json)
│ └── appsscript.json # Google Apps Script project configuration
├── utils/ # Utility functions
│ ├── ref/ # Reference files
│ └── npm-tools.js # NPM tooling scripts
├── .env.template # Environment variables template
├── .eslintrc.json # ESLint configuration
├── package.json # Project dependencies and scripts
└── .gitignore # Git ignore patterns
├── .cursorrules # Cursor rules
This project provides an enhanced development experience with Google Apps Script. The development workflow is streamlined with:
- ESLint for code linting
- Prettier for code formatting
- Clasp for Google Apps Script integration
.env: Contains environment-specific configuration.claspignore: Specifies which files should be included in clasp pushes.eslintrc.json: ESLint rules for code qualitypackage.json: Project dependencies and npm scripts
- Enable the Google Apps Script API in your Google Cloud Console
- Set up OAuth 2.0 credentials if using advanced features
- Configure your
.envfile with the necessary credentials - Run
npm run createto start a new project ornpm run cloneto clone an existing one - Use
npm run watchduring development for automatic pushes
- Keep sensitive information in
.env(not in version control) - Follow the ESLint rules for consistent code style
- Commit regularly and use meaningful commit messages
Common issues and solutions:
- Authentication Errors: Ensure your OAuth credentials are correctly set in
.env - Push/Pull Failures: Verify your
SCRIPT_IDand permissions
MIT
Michael Stansky
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request