# clasp

> Command-line tool for developing Google Apps Script projects locally: push/pull code, manage versions and deployments, tail logs, and run functions.

Stars: 5.9k · Language: TypeScript · License: Apache-2.0 · Categories: Dev Tools

- Repository: https://github.com/google/clasp
- Website: https://developers.google.com/apps-script/guides/clasp
- Page: https://www.trmn.sh/tools/clasp

## Install

- npm: `npm install -g @google/clasp`

## Overview

clasp (Command Line Apps Script Projects) is a CLI for developing Google Apps Script projects outside the browser editor at script.google.com. It syncs project files between a local directory and the Apps Script service using `clasp pull` and `clasp push` (with `--watch` and `--force` options), so code can be kept in source control and edited with any local tools. Projects are created or cloned with `clasp create-script` and `clasp clone-script`, and `clasp open-script` opens the project in the browser.

Beyond file sync, clasp manages deployments and versions (`create-deployment`, `list-deployments`, `delete-deployment`, `create-version`, `list-versions`). It maps the flat file list on script.google.com into local folders, for example `tests/slides.gs` becomes `tests/slides.js`. A `.claspignore` file, matched with multimatch, controls which files are uploaded on push; the default set includes `appsscript.json` and `.gs`, `.js`, `.ts` and `.html` files. Project settings are stored in `.clasp.json`.

Advanced commands, which require a Google Cloud project ID, include `run-function` to execute Apps Script functions from the command line, `tail-logs` and `setup-logs` for Cloud Logging, and `list-apis`, `enable-api` and `disable-api` for managing Google APIs. Authentication uses `clasp login`, with a global `--user` option for multiple named accounts and `--creds` to supply your own OAuth client. The README documents that clasp 3.x no longer transpiles TypeScript, so TypeScript projects should be bundled (for example with Rollup) before pushing.

clasp can also be installed as a Gemini CLI extension or as a Claude Code plugin, and it can be added as an MCP server (`npx -y @google/clasp mcp`). It targets developers who build Apps Script projects for Google Workspace and want version control, local editors and command-line deployment. The README states it is not an officially supported Google product.

### Installation

```bash
# via npm
npm install -g @google/clasp
```

## Alternatives

- [Prism](https://www.trmn.sh/tools/prism.md): Command-line HTTP server that mocks APIs from OpenAPI v2/v3.x and Postman Collections, and proxies traffic to validate it against the spec. (TypeScript, 5.1k stars)
- [concurrently](https://www.trmn.sh/tools/concurrently.md): Node.js CLI that runs multiple shell commands in parallel with prefixed, colored output and options to kill or restart processes. Works on Windows. (TypeScript, 7.9k stars)
- [ni](https://www.trmn.sh/tools/ni.md): Detects a project's package manager from its lockfile and translates ni, nr, nlx, nup, nun, nci commands for npm, yarn, pnpm, bun, deno, nub and aube. (TypeScript, 8.3k stars)
- [Supabase CLI](https://www.trmn.sh/tools/supabase-cli.md): Runs the Supabase stack locally, manages Postgres migrations, deploys Edge Functions, and generates TypeScript types from your database schema. (TypeScript, 2.5k stars)
- [serve](https://www.trmn.sh/tools/serve.md): Node.js CLI that serves a static site, single page application, or single file over HTTP, with a browsable directory listing UI. (TypeScript, 9.9k stars)

---

Canonical: https://www.trmn.sh/tools/clasp
