惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

小众软件
小众软件
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
WordPress大学
WordPress大学
月光博客
月光博客
Hugging Face - Blog
Hugging Face - Blog
博客园 - 聂微东
博客园 - 【当耐特】
博客园_首页
The Cloudflare Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Apple Machine Learning Research
Apple Machine Learning Research
Last Week in AI
Last Week in AI
酷 壳 – CoolShell
酷 壳 – CoolShell
大猫的无限游戏
大猫的无限游戏
雷峰网
雷峰网
量子位
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tailwind CSS Blog
IT之家
IT之家
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
GbyAI
GbyAI
V
Visual Studio Blog
F
Fortinet All Blogs
Martin Fowler
Martin Fowler

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Lean, Fast, Simple — npm-free GAS Deployment on GitHub Ac...
akihito · 2026-05-12 · via DEV Community

In the last article, I introduced glasp, a Go-based CLI tool for Google Apps Script (GAS) that operates without a dependency on Node.js.

Previous Article: glasp — A Go-based, zero-dependency CLI for Google Apps Script (clasp Alternative)

GitHub Repository: takihito/glasp

In this post, we will focus on the following:

  • The benefits of being "npm-independent" in CI/CD environments using GitHub Actions.
  • A performance comparison between clasp and glasp.

1. "npm-Independence" in GitHub Actions

It is common to see developers using clasp within GitHub Actions to handle deploy or push operations. Typically, the workflow involves these steps:

  1. Setting up the Node.js environment via actions/setup-node.
  2. Installing the tool via npm install -g @google/clasp.

However, this standard approach presents a few challenges.

Reducing Startup Time

npm install can take anywhere from tens of seconds to several minutes, depending on network conditions and cache status.
glasp, on the other hand, is a single binary built with Go. It requires neither the Node.js runtime nor the extraction of a massive node_modules folder. By using the takihito/glasp action for GitHub Actions, you execute the binary directly, significantly reducing environment setup overhead.

Lowering Supply Chain Risk

While the Node.js ecosystem is incredibly powerful, the sheer number of dependency packages increases the risk of vulnerabilities (exposure to supply chain attacks). While multi-functional CLIs like clasp carry many transitive dependencies, glasp is provided as a static binary independent of external runtimes. This keeps your CI environment's stability and security much simpler.


2. Performance Comparison

I conducted a comparison across several metrics.

Lead Time from Setup to Execution

Because glasp eliminates the need to build a Node.js environment, there is a massive difference in the lead time before execution begins.

Metric glasp clasp Speed Ratio (vs clasp)
Setup Time 1,337ms 19,150ms 14.3x
Push Time (Avg) 1,015ms 1,229ms 1.2x
Pull Time (Avg) 359ms 1,270ms 3.5x
Total Time 2,711ms 21,649ms 7.9x

The most significant advantage is the Setup Time. While clasp requires a global installation via npm install -g @google/clasp every time (taking roughly 19 seconds), glasp finishes in about 1.3 seconds just by fetching the pre-compiled single binary. The total cycle of setup → push → pull is 7.9 times faster, a benefit that compounds in pipelines with high deployment frequencies.

Execution Speed (Push/Pull)

glasp optimizes file scanning and upload processes through concurrent processing using Goroutines. While the difference might be subtle in small projects, projects with a large number of files or heavy content benefit greatly from Go’s runtime characteristics and optimized I/O.

Reference: glasp Documentation - GitHub Actions


3. Practical Example: GitHub Actions Configuration

Defining a GitHub Action with glasp is simple. Just remove the setup-node step and call the action directly.

name: Deploy GAS
on:
  push:
    branches: [ main ]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4 # Use the latest stable version

      - uses: takihito/glasp@v0.2.9
        with:
          version: 'v0.2.9'
          auth: ${{ secrets.CLASPRC_JSON }}

Enter fullscreen mode Exit fullscreen mode

Simply register the contents of your local ~/.clasprc.json as a GitHub Secret named CLASPRC_JSON, and you are ready to go.


4. Conclusion

clasp is the official tool and remains a solid choice for Node.js-centric development environments. However, if you have requirements such as:

  • Reducing CI execution time
  • Removing dependencies on Node.js (npm-independence)
  • Building a simple, robust binary-based workflow

Then I encourage you to give glasp a try.

Related Links: