---
# System prepended metadata

title: Using App Script CLI - CLASP

---

# Using App Script CLI - CLASP

To develop and manage Apps Script projects from your terminal rather than the Apps Script editor, you can use an open-source tool called clasp.

This will enable use to push our scripts to git repos.

## Features
- **Develop locally**: lets you to develop your Apps Script projects locally. You can write code on your own computer and upload it to Apps Script when you're done.
- **Manage deployment versions**: Create, update, and view your multiple deployments of your project.
- **Structure code**: allows you to organize your code into directories, which are preserved when you upload them to script.google.com.

## Instalation

To install it via npm globaly you can run this command

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

## Hello World

To start using it, you will need to login with your google account.
```bash
clasp login
```

To create new app script, you can run next command
```bash
clasp create SCRIPT_TITLE
```

Above command will create give you some choices if you want script for sheets, docs, slides, or etc. Then, will generate the needed file and the script and link them together.


## Cloning

If you have existing script, then you can clone it with it's `id`
```bash
clasp clone SCRIPT_ID
```

Now, let's see the saving and pushing part xD


## Pushing
After you make your edits in the scripts with any of your favourite editors, then we need to push the new changes, and it's like `git` with `push` command

```bash
clasp push
```

Congrats, it will push now.

## Open script with App Script Editor
If you prefer to open App Script Editor to edit your edits you can use this command
```bash
clasp open
```

Then, the browser will open in app script editor

Note: You need to enable App Script API to make this works (Push Command).