下载:v3.4.1clasp-v3.4.1 ↓3.4.12026-08-28
+0
日增长
5,910
stars
523
forks
66
watchers
578
prs
596
issues
31
releases

README

Clasp

Note: This is not an officially supported Google product.

!build status





 Develop Apps Script projects locally using clasp (Command Line Apps Script Projects).



 hello.js
clasp push
clasp deploy
rm .clasp.json appsscript.json hello.js
clear
--
!clasp

To get started, try out the codelab!

You can also try clasp in Gitpod, a one-click online IDE for GitHub:



 Features

🗺️ Develop Locally: clasp allows you to develop your Apps Script projects locally. That means you can check-in your code into source control, collaborate with other developers, and use your favorite tools to develop Apps Script.

🔢 Manage Deployment Versions: Create, update, and view your multiple deployments of your project.

📁 Structure Code: clasp automatically converts your flat project on script.google.com into folders. For example:

- _On script.google.com_:
  - tests/slides.gs
  - tests/sheets.gs
- _locally_:
  - tests/
    - slides.js
    - sheets.js

➡️ Run Apps Script: Execute your Apps Script from the command line. Features:

- _Instant_ deployment.
- Suggested functions Autocomplete (Fuzzy)
- Easily add custom Google OAuth scopes
- And more…

 Install

First download clasp:

sh
npm install -g @google/clasp


Then enable the Google Apps Script API: https://script.google.com/home/usersettings

!Enable Apps Script API

 Installing as a Gemini CLI Extension

You can install clasp as an Gemini CLI extensions using the following command:

sh
gemini extensions install https://github.com/google/clasp


This makes clasp available as an MCP server in Gemini CLI. 

Make sure to enable the Google Apps Script API (as explained above) and perform a clasp login (with your specific login parameters) before you use the extension.

 Installing as a Claude Code CLI Extension

You can use clasp with Claude Code CLI in one of two ways:

 1. Install as a Plugin (Recommended)

Run the following command in Claude Code to install clasp as a plugin directly from the repository:

sh
/plugin install @google/clasp


 2. Manual Installation

You can manually add clasp as an MCP server using the provided configuration file or by running:

sh
claude mcp add clasp -- npx -y @google/clasp mcp


Or by referencing the configuration file included in the repository:

sh
claude mcp add-json clasp "$(cat claude-mcp.json)"


 Commands

The following command provide basic Apps Script project management.

 Note: Most of them require you to clasp login and clasp create/clone before using the rest of the commands.

sh
clasp


- [clasp login [--no-localhost] [--creds ] [--use-project-scopes] [--include-clasp-scopes] [--extra-scopes ] [--redirect-port]](login)
- clasp logout
- [clasp show-authorized-user [--json]](show-authorized-user)
- [clasp create-script [--title ] [--type ] [--rootDir ] [--parentId ]](create)
- [clasp clone-script  [versionNumber] [--rootDir ]](clone)
- [clasp delete-script [--force]](delete)
- [clasp pull [--versionNumber]](pull)
- [clasp push [--watch] [--force]](push)
- [clasp

Top issues

Discussions

Latest release

v3.4.1 clasp-v3.4.1 2026-08-28
3.4.1 (2026-08-28)


 Bug Fixes

 files: prevent rootDir double application during pull, clone, and create (13d3322)

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON