← ClaudeAtlas

apps-script-clasp-workflowlisted

Documents the clasp CLI workflow for Google Apps Script projects — login, project creation/cloning, push vs deploy, versioning, and multi-environment (dev/staging/prod) setups. Use when setting up CI/CD for an Apps Script project, publishing a new version, or switching between multiple script IDs. Framework-agnostic — applies with or without bootgs.
bootgs/skills · ★ 5 · AI & Automation · score 80
Install: claude install-skill bootgs/skills
# Apps Script clasp Workflow ## Auth ```bash clasp login # interactive, opens a browser clasp login --no-localhost # headless/CI — prints a URL to visit, then paste the resulting code back ``` Produces `~/.clasprc.json`. In CI, inject this file from a secret — never commit it; it's a live OAuth credential. ## Project setup ```bash clasp create --type standalone --title "My Project" # new project clasp clone <scriptId> # existing project ``` `.clasp.json` fields that matter: | Field | Purpose | |---|---| | `scriptId` | Target Apps Script project — the single most important field to get right per environment (see Multi-environment below) | | `rootDir` | Directory clasp pushes from, e.g. `"./dist/appsscript"` — point it at your **build output**, not source, if you bundle | | `filePushOrder` | Files pushed first, before the rest — `appsscript.json` is commonly listed here since manifest changes should land before code that depends on new scopes/services | ## Push vs. deploy — the distinction that causes silent "my fix isn't live" bugs - `clasp push` updates the project's **HEAD** (the editor/dev version). Anyone opening the script editor sees it immediately. It does **not** affect any existing versioned deployment. - `clasp deploy` creates or updates a **versioned deployment** with a stable URL/ID. A web app or add-on installed by end users runs whatever version its deployment points at — pushing new code does nothing for