@@ -12,32 +12,57 @@ $ npm i -g google-apps-script
1212
1313# Usage
1414
15- Commands:
15+ Authenticate the Drive API (add '-f' to force reauthentication):
16+ ```
17+ $ gas auth [-f]
18+ ```
19+
20+ Create or delete a project in your Google Drive:
21+ ```
22+ $ gas remote create <name>
23+ $ gas remote delete <fileId>
24+ ```
25+
26+ List your remote projects and their fileId's (optional filter on filename):
27+ ```
28+ $ gas list [nameFilter]
29+ ```
30+
31+ Link a remote project to your current directory:
32+ ```
33+ $ gas link <fileId>
34+ ```
35+
36+ Pull and push code from/to your remote project:
37+ ```
38+ $ gas pull
39+ $ gas push
40+ ```
1641
17- auth [options] authenticate the Drive API (add '-f' to force reauthentication)
18- remote 'remote create <name>' to create a new project in your Google Drive
19- 'remote delete <fileId>' to delete a project from your Google Drive
20- list [nameFilter] list your remote projects and their fileId's (optional filter on filename)
21- clone <fileId> create a new local folder, link the remote project with the given fileId and do a pull from remote
22- new <name> create a new Google Apps Script project in your Google Drive and then clone that project locally
23- push|deploy push your local code to the linked project on your Google Drive
24- pull when a project is already cloned, pull new code from your Google Drive
25- help [cmd] display help for [cmd]
42+ Some shortcuts for creating, linking and pulling projects all in one:
2643
27- Examples:
44+ ```
45+ $ gas clone <fileId>
46+ $ gas new <name>
47+ ```
2848
49+ # Examples
50+ ```
2951 $ gas new myScript
3052 $ cd my-awesome-script
3153 $ gas pull
32-
54+ ```
55+ ```
3356 $ gas list myScript
34- $ gas clone this-is-not-the-file-id-you-are-looking-for
35-
57+ $ gas clone myScript-fileId
58+ ```
59+ ```
3660 $ gas remote create myScript2
3761 $ mkdir src
3862 $ cd src
39- $ gas remote link this-is-not-the-file-id-you-are-looking-for-either
63+ $ gas remote link myScript2-fileId
4064 $ gas pull
65+ ```
4166
4267<br >
4368That's all (so far)
0 commit comments