DEV Community

Cover image for glasp: A Go-based, Zero-dependency CLI for Google Apps Script (clasp Alternative)
akihito
akihito

Posted on

glasp: A Go-based, Zero-dependency CLI for Google Apps Script (clasp Alternative)

If you use clasp for local Google Apps Script (GAS) development, you might have faced challenges with Node.js runtime overhead or slow deployment speeds.

glasp is a Go-based CLI tool designed to address these issues, offering high performance and a simplified developer experience.


What is glasp?

glasp is a CLI for managing Google Apps Script projects. By leveraging Go, it provides a standalone binary that eliminates the need for Node.js while maintaining high compatibility with the official clasp tool.


Key Features

  • Zero Dependencies: Runs as a single binary. No Node.js or npm install required.
  • clasp Compatibility: Works with existing .clasp.json and appsscript.json files. Commands like login, push, and pull follow the same syntax.
  • High Performance: Concurrent processing allows for significantly faster file scanning and uploading, especially in large projects.
  • GitHub Actions Optimized: A dedicated Action is available, allowing for deployment without setting up a Node.js environment.

Installation (Local)

For macOS and Linux, you can install glasp using the following script:

curl -sL https://takihito.github.io/glasp/install.sh | bash
Enter fullscreen mode Exit fullscreen mode

Deployment via GitHub Actions

glasp is provided as a GitHub Action, so you can call it directly in your workflow. This eliminates the "Setup Node.js" step and reduces CI execution time.

name: Deploy to Google Apps Script
on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Deploy with glasp
        uses: takihito/glasp@v0.2.8
        with:
          version: 'v0.2.8'
          auth: '${{ secrets.CLASPRC_JSON }}'
Enter fullscreen mode Exit fullscreen mode

Implementation Note:

  • Register the contents of your local ~/.clasprc.json as a GitHub Secret named CLASPRC_JSON.
  • Since it runs as a Docker container action, the environment setup is minimal and fast.

💡 Conclusion

glasp is a practical alternative for developers who want to decouple their GAS workflow from Node.js or optimize their CI/CD pipelines for speed.

If you are looking for a lightweight and faster way to manage your scripts while keeping your existing clasp configurations, glasp is a strong candidate.

googleappsscript #gas #go #githubactions #clasp #glasp

Top comments (0)