@gadgetinc/ggt 2.2.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. package/README.md +392 -307
  2. package/dist/action-CF6zatIh.js +64 -0
  3. package/dist/action-CF6zatIh.js.map +1 -0
  4. package/dist/action-CrDCeX3F.js +8 -0
  5. package/dist/action-CrDCeX3F.js.map +1 -0
  6. package/dist/add-Basu3Gyf.js +1 -0
  7. package/dist/agent-plugin-CqgwTOk-.js +15 -0
  8. package/dist/agent-plugin-CqgwTOk-.js.map +1 -0
  9. package/dist/agent-plugin-DU9G5B1d.js +9 -0
  10. package/dist/agent-plugin-DU9G5B1d.js.map +1 -0
  11. package/dist/assert-Bu1E126Z.js +2 -0
  12. package/dist/assert-Bu1E126Z.js.map +1 -0
  13. package/dist/chunk-BjEoQXZ0.js +1 -0
  14. package/dist/collection-C2TCeYqY.js +2 -0
  15. package/dist/collection-C2TCeYqY.js.map +1 -0
  16. package/dist/collection-aM0fpch0.js +1 -0
  17. package/dist/command-2iNTc5dV.js +118 -0
  18. package/dist/command-2iNTc5dV.js.map +1 -0
  19. package/dist/completion-D96nxD5n.js +37 -0
  20. package/dist/completion-D96nxD5n.js.map +1 -0
  21. package/dist/configure-C8ge-2cK.js +15 -0
  22. package/dist/configure-C8ge-2cK.js.map +1 -0
  23. package/dist/debugger-BkYgApKn.js +22 -0
  24. package/dist/debugger-BkYgApKn.js.map +1 -0
  25. package/dist/defaults-B_eD7Pia.js +2 -0
  26. package/dist/defaults-B_eD7Pia.js.map +1 -0
  27. package/dist/deploy-Da6P2HXS.js +15 -0
  28. package/dist/deploy-Da6P2HXS.js.map +1 -0
  29. package/dist/dev-DWMSNcLl.js +32 -0
  30. package/dist/dev-DWMSNcLl.js.map +1 -0
  31. package/dist/dev-lock-BFanZSu1.js +10 -0
  32. package/dist/dev-lock-BFanZSu1.js.map +1 -0
  33. package/dist/directory-CNL03L6c.js +9 -0
  34. package/dist/directory-CNL03L6c.js.map +1 -0
  35. package/dist/env-DoWNvHzW.js +62 -0
  36. package/dist/env-DoWNvHzW.js.map +1 -0
  37. package/dist/esm-B25i6Etq.js +12 -0
  38. package/dist/esm-B25i6Etq.js.map +1 -0
  39. package/dist/esm-CJocZrdd.js +2 -0
  40. package/dist/esm-CJocZrdd.js.map +1 -0
  41. package/dist/eval-BceZMSd5.js +27 -0
  42. package/dist/eval-BceZMSd5.js.map +1 -0
  43. package/dist/execAsync-DrhcEHLd.js +2 -0
  44. package/dist/execAsync-DrhcEHLd.js.map +1 -0
  45. package/dist/filesync-De6asZeR.js +61 -0
  46. package/dist/filesync-De6asZeR.js.map +1 -0
  47. package/dist/getMachineId-bsd-Cch8Z6pV.js +2 -0
  48. package/dist/getMachineId-bsd-Cch8Z6pV.js.map +1 -0
  49. package/dist/getMachineId-darwin-kbQWK54o.js +3 -0
  50. package/dist/getMachineId-darwin-kbQWK54o.js.map +1 -0
  51. package/dist/getMachineId-linux-DdIel6zr.js +2 -0
  52. package/dist/getMachineId-linux-DdIel6zr.js.map +1 -0
  53. package/dist/getMachineId-unsupported-Bvmsh30k.js +2 -0
  54. package/dist/getMachineId-unsupported-Bvmsh30k.js.map +1 -0
  55. package/dist/getMachineId-win-BteHZe8j.js +2 -0
  56. package/dist/getMachineId-win-BteHZe8j.js.map +1 -0
  57. package/dist/ggt-B3HQjQRM.js +3 -0
  58. package/dist/ggt-B3HQjQRM.js.map +1 -0
  59. package/dist/handler-DZyG8Sel.js +4 -0
  60. package/dist/handler-DZyG8Sel.js.map +1 -0
  61. package/dist/http-CY3lPMkt.js +320 -0
  62. package/dist/http-CY3lPMkt.js.map +1 -0
  63. package/dist/indent-string-BVm-4tyL.js +2 -0
  64. package/dist/indent-string-BVm-4tyL.js.map +1 -0
  65. package/dist/list-lQKWZ6ZI.js +10 -0
  66. package/dist/list-lQKWZ6ZI.js.map +1 -0
  67. package/dist/login-Ce0tByNd.js +1 -0
  68. package/dist/logout-_sTWeaiQ.js +5 -0
  69. package/dist/logout-_sTWeaiQ.js.map +1 -0
  70. package/dist/logs-DbhJzz4M.js +9 -0
  71. package/dist/logs-DbhJzz4M.js.map +1 -0
  72. package/dist/main.js +2 -2
  73. package/dist/main.js.map +1 -7
  74. package/dist/model-CBiMKY0P.js +11 -0
  75. package/dist/model-CBiMKY0P.js.map +1 -0
  76. package/dist/ms-B7sMc0pR.js +2 -0
  77. package/dist/ms-B7sMc0pR.js.map +1 -0
  78. package/dist/open-CSsA4B-l.js +38 -0
  79. package/dist/open-CSsA4B-l.js.map +1 -0
  80. package/dist/p-map-DE0acmRv.js +2 -0
  81. package/dist/p-map-DE0acmRv.js.map +1 -0
  82. package/dist/problems-BMLsmxd4.js +11 -0
  83. package/dist/problems-BMLsmxd4.js.map +1 -0
  84. package/dist/prompt-C9nwJW0G.js +2 -0
  85. package/dist/prompt-C9nwJW0G.js.map +1 -0
  86. package/dist/pull-DpizmJGk.js +12 -0
  87. package/dist/pull-DpizmJGk.js.map +1 -0
  88. package/dist/push-67KBCw6c.js +12 -0
  89. package/dist/push-67KBCw6c.js.map +1 -0
  90. package/dist/root-D_UnUsp7.js +28 -0
  91. package/dist/root-D_UnUsp7.js.map +1 -0
  92. package/dist/select-Dey_sjjd.js +4 -0
  93. package/dist/select-Dey_sjjd.js.map +1 -0
  94. package/dist/session-BmzGF1t7.js +2 -0
  95. package/dist/session-BmzGF1t7.js.map +1 -0
  96. package/dist/spinner-BVmbgIil.js +8 -0
  97. package/dist/spinner-BVmbgIil.js.map +1 -0
  98. package/dist/src-DxCC1MV4.js +6 -0
  99. package/dist/src-DxCC1MV4.js.map +1 -0
  100. package/dist/status-P_RFQ7J0.js +13 -0
  101. package/dist/status-P_RFQ7J0.js.map +1 -0
  102. package/dist/subscribeToEnvironmentLogs-CUicaiw_.js +2 -0
  103. package/dist/subscribeToEnvironmentLogs-CUicaiw_.js.map +1 -0
  104. package/dist/sync-json-V52OzeCz.js +112 -0
  105. package/dist/sync-json-V52OzeCz.js.map +1 -0
  106. package/dist/table-MrBbxMay.js +11 -0
  107. package/dist/table-MrBbxMay.js.map +1 -0
  108. package/dist/update-CfxiL08e.js +12 -0
  109. package/dist/update-CfxiL08e.js.map +1 -0
  110. package/dist/update-iyhnL9-M.js +1 -0
  111. package/dist/var-ByWcufFt.js +59 -0
  112. package/dist/var-ByWcufFt.js.map +1 -0
  113. package/dist/version-B_9GB4u3.js +9 -0
  114. package/dist/version-B_9GB4u3.js.map +1 -0
  115. package/dist/whoami-BNcXIfz7.js +5 -0
  116. package/dist/whoami-BNcXIfz7.js.map +1 -0
  117. package/package.json +19 -23
  118. package/assets/favicon-128@4x.png +0 -0
  119. package/dist/add-TWLGKL2T.js +0 -82
  120. package/dist/add-TWLGKL2T.js.map +0 -7
  121. package/dist/agent-plugin-TN24O7FB.js +0 -10
  122. package/dist/agent-plugin-TN24O7FB.js.map +0 -7
  123. package/dist/chunk-2742UPMB.js +0 -10
  124. package/dist/chunk-2742UPMB.js.map +0 -7
  125. package/dist/chunk-3OM5WM7E.js +0 -2
  126. package/dist/chunk-3OM5WM7E.js.map +0 -7
  127. package/dist/chunk-442CSROP.js +0 -66
  128. package/dist/chunk-442CSROP.js.map +0 -7
  129. package/dist/chunk-7DYQUG5M.js +0 -2
  130. package/dist/chunk-7DYQUG5M.js.map +0 -7
  131. package/dist/chunk-DR4CXBD6.js +0 -11
  132. package/dist/chunk-DR4CXBD6.js.map +0 -7
  133. package/dist/chunk-F255O64V.js +0 -2
  134. package/dist/chunk-F255O64V.js.map +0 -7
  135. package/dist/chunk-GFQYFEEH.js +0 -2
  136. package/dist/chunk-GFQYFEEH.js.map +0 -7
  137. package/dist/chunk-GJGBTM5Y.js +0 -2
  138. package/dist/chunk-GJGBTM5Y.js.map +0 -7
  139. package/dist/chunk-HCULGPBH.js +0 -2
  140. package/dist/chunk-HCULGPBH.js.map +0 -7
  141. package/dist/chunk-J232VCIM.js +0 -2
  142. package/dist/chunk-J232VCIM.js.map +0 -7
  143. package/dist/chunk-JG2QCDK2.js +0 -118
  144. package/dist/chunk-JG2QCDK2.js.map +0 -7
  145. package/dist/chunk-JKZNSRLU.js +0 -8
  146. package/dist/chunk-JKZNSRLU.js.map +0 -7
  147. package/dist/chunk-JYE5LLIF.js +0 -9
  148. package/dist/chunk-JYE5LLIF.js.map +0 -7
  149. package/dist/chunk-KKIL22RY.js +0 -2
  150. package/dist/chunk-KKIL22RY.js.map +0 -7
  151. package/dist/chunk-L2XBSR7G.js +0 -2
  152. package/dist/chunk-L2XBSR7G.js.map +0 -7
  153. package/dist/chunk-MW6MXMSN.js +0 -2
  154. package/dist/chunk-MW6MXMSN.js.map +0 -7
  155. package/dist/chunk-OUIZQC4D.js +0 -12
  156. package/dist/chunk-OUIZQC4D.js.map +0 -7
  157. package/dist/chunk-R6KJLEKY.js +0 -28
  158. package/dist/chunk-R6KJLEKY.js.map +0 -7
  159. package/dist/chunk-SIR6HLN3.js +0 -69
  160. package/dist/chunk-SIR6HLN3.js.map +0 -7
  161. package/dist/chunk-SVWK2NXG.js +0 -2
  162. package/dist/chunk-SVWK2NXG.js.map +0 -7
  163. package/dist/chunk-T6UHSWMT.js +0 -2
  164. package/dist/chunk-T6UHSWMT.js.map +0 -7
  165. package/dist/chunk-WB6O2V5D.js +0 -11
  166. package/dist/chunk-WB6O2V5D.js.map +0 -7
  167. package/dist/chunk-XC4F2TLW.js +0 -113
  168. package/dist/chunk-XC4F2TLW.js.map +0 -7
  169. package/dist/chunk-YFUOXDPK.js +0 -10
  170. package/dist/chunk-YFUOXDPK.js.map +0 -7
  171. package/dist/chunk-ZSREFZXV.js +0 -211
  172. package/dist/chunk-ZSREFZXV.js.map +0 -7
  173. package/dist/chunk-ZYDMXS5R.js +0 -6
  174. package/dist/chunk-ZYDMXS5R.js.map +0 -7
  175. package/dist/configure-UJS7V2JX.js +0 -12
  176. package/dist/configure-UJS7V2JX.js.map +0 -7
  177. package/dist/debugger-QN2MCLBL.js +0 -41
  178. package/dist/debugger-QN2MCLBL.js.map +0 -7
  179. package/dist/deploy-J74PHPQA.js +0 -25
  180. package/dist/deploy-J74PHPQA.js.map +0 -7
  181. package/dist/dev-GGUSOOYP.js +0 -59
  182. package/dist/dev-GGUSOOYP.js.map +0 -7
  183. package/dist/esm-D77XRR65.js +0 -38
  184. package/dist/esm-D77XRR65.js.map +0 -7
  185. package/dist/eval-L6WHUFLU.js +0 -54
  186. package/dist/eval-L6WHUFLU.js.map +0 -7
  187. package/dist/getMachineId-bsd-QUXN4NKS.js +0 -2
  188. package/dist/getMachineId-bsd-QUXN4NKS.js.map +0 -7
  189. package/dist/getMachineId-darwin-TCXBAX22.js +0 -3
  190. package/dist/getMachineId-darwin-TCXBAX22.js.map +0 -7
  191. package/dist/getMachineId-linux-IJ3LYIOX.js +0 -2
  192. package/dist/getMachineId-linux-IJ3LYIOX.js.map +0 -7
  193. package/dist/getMachineId-unsupported-IKXBUCYY.js +0 -2
  194. package/dist/getMachineId-unsupported-IKXBUCYY.js.map +0 -7
  195. package/dist/getMachineId-win-6CX7VSFF.js +0 -2
  196. package/dist/getMachineId-win-6CX7VSFF.js.map +0 -7
  197. package/dist/ggt-5XNRJZSW.js +0 -44
  198. package/dist/ggt-5XNRJZSW.js.map +0 -7
  199. package/dist/list-756D46N5.js +0 -11
  200. package/dist/list-756D46N5.js.map +0 -7
  201. package/dist/login-GMWQRH7V.js +0 -2
  202. package/dist/login-GMWQRH7V.js.map +0 -7
  203. package/dist/logout-LQABTJFD.js +0 -7
  204. package/dist/logout-LQABTJFD.js.map +0 -7
  205. package/dist/logs-AQZB272X.js +0 -28
  206. package/dist/logs-AQZB272X.js.map +0 -7
  207. package/dist/open-OMZWPQ66.js +0 -74
  208. package/dist/open-OMZWPQ66.js.map +0 -7
  209. package/dist/problems-FZJKH52E.js +0 -14
  210. package/dist/problems-FZJKH52E.js.map +0 -7
  211. package/dist/pull-XYCYN7QN.js +0 -28
  212. package/dist/pull-XYCYN7QN.js.map +0 -7
  213. package/dist/push-3QM7ZFTC.js +0 -2
  214. package/dist/push-3QM7ZFTC.js.map +0 -7
  215. package/dist/status-PWAXNK5G.js +0 -14
  216. package/dist/status-PWAXNK5G.js.map +0 -7
  217. package/dist/update-QIQFJFRQ.js +0 -2
  218. package/dist/update-QIQFJFRQ.js.map +0 -7
  219. package/dist/var-N4WGGJXZ.js +0 -159
  220. package/dist/var-N4WGGJXZ.js.map +0 -7
  221. package/dist/version-AJKSJJDC.js +0 -11
  222. package/dist/version-AJKSJJDC.js.map +0 -7
  223. package/dist/whoami-KJYDSQSD.js +0 -7
  224. package/dist/whoami-KJYDSQSD.js.map +0 -7
package/README.md CHANGED
@@ -27,7 +27,10 @@
27
27
  - [`ggt push`](#ggt-push)
28
28
  - [`ggt pull`](#ggt-pull)
29
29
  - [`ggt var`](#ggt-var)
30
+ - [`ggt env`](#ggt-env)
30
31
  - [`ggt add`](#ggt-add)
32
+ - [`ggt model`](#ggt-model)
33
+ - [`ggt action`](#ggt-action)
31
34
  - [`ggt open`](#ggt-open)
32
35
  - [`ggt list`](#ggt-list)
33
36
  - [`ggt login`](#ggt-login)
@@ -39,6 +42,7 @@
39
42
  - [`ggt agent-plugin`](#ggt-agent-plugin)
40
43
  - [`ggt eval`](#ggt-eval)
41
44
  - [`ggt version`](#ggt-version)
45
+ - [`ggt completion`](#ggt-completion)
42
46
 
43
47
  ## Intro
44
48
 
@@ -61,38 +65,54 @@ $ npm install -g ggt
61
65
  $ ggt
62
66
  The command-line interface for Gadget.
63
67
 
64
- Usage
65
- ggt [COMMAND]
66
-
67
- Commands
68
- dev Start developing your application
69
- deploy Deploy your environment to production
70
- status Show your local and environment's file changes
71
- push Push your local files to your environment
72
- pull Pull your environment's files to your local computer
73
- var Manage environment variables
74
- add Add models, fields, actions, routes and environments to your app
75
- open Open a Gadget location in your browser
76
- list List your available applications
77
- login Log in to your account
78
- logout Log out of your account
79
- logs Stream your environment's logs
80
- debugger Connect to the debugger for your environment
81
- whoami Print the currently logged in account
82
- configure Configure default execution options
83
- agent-plugin Install Gadget agent plugins (AGENTS.md + skills)
84
- version Print this version of ggt
85
-
86
- Flags
87
- -h, --help Print how to use a command
88
- -v, --verbose Print more verbose output
68
+ USAGE
69
+ ggt [command]
70
+
71
+ COMMANDS
72
+ Development
73
+ dev Sync files and stream logs locally
74
+ deploy Deploy an environment to production
75
+ push Upload local file changes to Gadget
76
+ pull Download environment files to your local directory
77
+ status Show sync state and pending file changes
78
+ logs Print recent logs or stream logs from your app
79
+ debugger Connect a debugger to your app's environment
80
+
81
+ Resources
82
+ add Add resources to your app
83
+ model Add and manage models in your app
84
+ action Add and manage actions
85
+ var Manage your app's environment variables
86
+ env Manage your app's environments
87
+ open Open your app in a browser
88
+
89
+ Account
90
+ login Log in to Gadget
91
+ logout Log out of Gadget
92
+ whoami Show the current logged-in user
93
+ list List your Gadget apps
94
+
95
+ Diagnostics
96
+ problems Show errors and warnings in your app
97
+ eval Evaluate a JavaScript snippet against your app
98
+
99
+ Configuration
100
+ configure Manage ggt configuration
101
+ agent-plugin Manage plugins for AI coding assistants
102
+ completion Generate shell completion scripts
103
+ version Print the currently installed version
104
+
105
+ FLAGS
106
+ -h, --help Show command help
107
+ --version Print the ggt version
108
+ -v, --verbose Increase output verbosity (-vv for debug, -vvv for trace)
89
109
  --telemetry Enable telemetry
110
+ --json Output as JSON where supported
90
111
 
91
- Agent plugins
92
- Install AGENTS.md and Gadget agent skills for your coding agent:
93
- ggt agent-plugin install
112
+ Use -h for a summary, --help for full details.
94
113
 
95
- Run "ggt [COMMAND] -h" for more information about a specific command.
114
+ Documentation: https://docs.gadget.dev/guides/cli
115
+ Issues: https://github.com/gadget-inc/ggt/issues
96
116
  ```
97
117
 
98
118
  ## Commands
@@ -101,428 +121,493 @@ Run "ggt [COMMAND] -h" for more information about a specific command.
101
121
 
102
122
  ```sh-session
103
123
  $ ggt dev -h
104
- Clones your Gadget environment's files to your local machine and keeps it in sync, in order to
105
- enable local development with your text editor and source code with Git.
106
-
107
- If your app's local directory already exists, this command first performs a sync to ensure
108
- that your local and environment directories match, changes are tracked since last sync. If any
109
- conflicts are detected, they must be resolved before development starts.
110
-
111
- Usage
112
- $ ggt dev [DIRECTORY] [options]
113
-
114
- DIRECTORY: The directory to sync files to (default: the current directory)
115
-
116
- Options
117
- -a, --app <app_name> Selects the app to sync files with. Defaults to the app synced to the current directory, if there is one.
118
- -e, --env <env_name> Selects the environment to sync files with. Defaults to the environment synced to the current directory, if there is one.
119
- --prefer <source> Auto-select changes from 'local' or 'environment' source on conflict
120
- --allow-unknown-directory Syncs to any local directory with existing files, even if the directory hasn't been synced before
121
- --allow-different-app Syncs with a different app using the --app command, instead of the most recently synced one in the current directory
122
- --log-level <level> Sets the log level for incoming application logs (default: info)
123
- --no-logs Disables outputting application logs to the console
124
- --my-logs Only outputs user sourced logs
125
-
126
- Ignoring files
127
- ggt dev uses a .ignore file, similar to .gitignore, to exclude specific files and
128
- folders from syncing. These files are always ignored:
129
-
130
- • .DS_Store
131
- • .gadget
132
- • .git
133
- • node_modules
134
- • .shopify
135
-
136
- Notes
137
- • "ggt dev" only works with development environments
138
- • "ggt dev" only supports "yarn" v1 for installing dependencies
139
- • Avoid deleting or moving all of your files while "ggt dev" is running
140
-
141
- Examples
142
- sync an app in a custom path
143
- $ ggt dev ~/myGadgetApps/myBlog --app myBlogApp
144
-
145
- sync with a specific environment and preselect all local changes on conflicts
146
- $ ggt dev --env main --prefer local
147
-
148
- sync a custom path with a specific app, environment and preselect all changes from local on conflicts
149
- $ ggt dev ~/gadget/example --app=example --env=development --prefer=local
124
+ Sync files and stream logs locally
125
+
126
+ USAGE
127
+ ggt dev [directory] [flags]
128
+
129
+ ARGUMENTS
130
+ directory Directory to sync files to
131
+
132
+ FLAGS
133
+ -a, --app, --application <app> Gadget app to use
134
+ -e, --env, --environment <env> Environment to use
135
+ -l, --log-level <level> Minimum log level to display
136
+ -m, --my-logs Show only logs emitted by your code
137
+ --no-logs Don't stream logs while syncing
138
+ --prefer <source> Auto-resolve conflicts using the given source
139
+
140
+ EXAMPLES
141
+ $ ggt dev
142
+ $ ggt dev ~/gadget/my-app
143
+ $ ggt dev --prefer local
144
+ $ ggt dev ~/gadget/my-app --app my-app --env development --prefer local
150
145
  ```
151
146
 
152
147
  ### `ggt deploy`
153
148
 
154
149
  ```sh-session
155
150
  $ ggt deploy -h
156
- Deploys your app to production.
157
-
158
- This command first performs a sync to ensure that your local and environment directories
159
- match, changes are tracked since last sync. If any conflicts are detected, they must be
160
- resolved before deployment.
161
-
162
- Usage
163
- $ ggt deploy [options]
164
-
165
- Options
166
- -a, --app <app_name> Selects a specific app to deploy. Defaults to the app synced to the current directory, if there is one.
167
- --from, -e, --env <env_name> Selects a specific environment to sync and deploy from. Defaults to the environment synced to the current directory, if there is one.
168
- --force Deploys by discarding any changes made to the environment directory since last sync
169
- --allow-different-directory Deploys from any local directory with existing files, even if the directory hasn't been synced before
170
- --allow-different-app Deploys a different app using the --app command, instead of the most recently synced one in the current directory
171
- --allow-problems Deploys despite any existing issues found in the app (gelly errors, typescript errors etc.)
172
- --allow-data-delete Deploys even if it results in the deletion of data in production
173
- --allow-charges Deploys even if it results in additional charges to your plan
174
-
175
- Examples
176
- Deploys code from the staging environment of a myBlog
177
- $ ggt deploy -a myBlog -from staging
151
+ Deploy an environment to production
152
+
153
+ USAGE
154
+ ggt deploy [flags]
155
+
156
+ FLAGS
157
+ -a, --app, --application <app> Gadget app to use
158
+ -e, --env, --environment, --from <env> Environment to deploy from
159
+ -f, --force Skip the push confirmation prompt
160
+
161
+ EXAMPLES
162
+ $ ggt deploy
163
+ $ ggt deploy --env staging
164
+ $ ggt deploy --force --allow-all
165
+ $ ggt deploy --force --allow=problems,charges,data-delete
166
+ $ ggt deploy --env staging --force --allow-problems --allow-charges --allow-data-delete
178
167
  ```
179
168
 
180
169
  ### `ggt status`
181
170
 
182
171
  ```sh-session
183
172
  $ ggt status -h
184
- Shows file changes since last sync (e.g. $ggt dev, push, deploy etc.)
173
+ Show sync state and pending file changes
185
174
 
186
- Usage
187
- ggt status
175
+ USAGE
176
+ ggt status [flags]
177
+
178
+ FLAGS
179
+ -a, --app, --application <app> Gadget app to use
180
+ -e, --env, --environment <env> Environment to use
181
+
182
+ EXAMPLES
183
+ $ ggt status
184
+ $ ggt status --app myapp --env staging
188
185
  ```
189
186
 
190
187
  ### `ggt problems`
191
188
 
192
189
  ```sh-session
193
190
  $ ggt problems -h
194
- Shows any problems (errors, warnings) found in your Gadget application.
191
+ Show errors and warnings in your app
192
+
193
+ USAGE
194
+ ggt problems [flags]
195
+
196
+ FLAGS
197
+ -a, --app, --application <app> Gadget app to use
198
+ -e, --env, --environment <env> Environment to use
195
199
 
196
- Usage
197
- ggt problems
200
+ EXAMPLES
201
+ $ ggt problems
202
+ $ ggt problems --app myBlog
203
+ $ ggt problems --env staging
204
+ $ ggt problems --app myBlog --env production
198
205
  ```
199
206
 
200
207
  ### `ggt push`
201
208
 
202
209
  ```sh-session
203
210
  $ ggt push -h
204
- Pushes your local files to your environment directory.
211
+ Upload local file changes to Gadget
205
212
 
206
- This command first tracks changes in your environment directory since the last sync.
207
- If changes are detected, you will be prompted to discard them or abort the push.
213
+ USAGE
214
+ ggt push [flags]
208
215
 
209
- Usage
210
- ggt push [options]
216
+ FLAGS
217
+ -a, --app, --application <app> Gadget app to use
218
+ -e, --env, --environment, --to <env> Environment to push to
219
+ -f, --force Push without prompting, discarding environment changes
211
220
 
212
- Options
213
- -a, --app <app_name> Selects the app to push local changes to. Defaults to the app synced to the current directory, if there is one.
214
- -e, --env, --to <env_name> Selects the environment to push local changes to. Defaults to the environment synced to the current directory, if there is one.
215
- --force Forces a push by discarding any changes made on your environment directory since last sync
216
- --allow-different-directory Pushes changes from any local directory with existing files, even if the directory hasn't been synced before
217
- --allow-different-app Pushes changes to an app using --app command, instead of the most recently synced one in the current directory
218
-
219
- Examples
220
- Push all local changes to the main environment by discarding any changes made on main
221
- $ ggt push --env main --force
221
+ EXAMPLES
222
+ $ ggt push
223
+ $ ggt push --env main
224
+ $ ggt push --env main --force
222
225
  ```
223
226
 
224
227
  ### `ggt pull`
225
228
 
226
229
  ```sh-session
227
230
  $ ggt pull -h
228
- Pulls your environment files to your local directory.
229
-
230
- This command first tracks changes in your local directory since the last sync. If changes are
231
- detected, you will be prompted to discard them or abort the pull.
231
+ Download environment files to your local directory
232
232
 
233
- Usage
234
- ggt pull [options]
233
+ USAGE
234
+ ggt pull [flags]
235
235
 
236
- Options
237
- -a, --app <app_name> Selects the app to pull your environment changes from. Defaults to the app synced to the current directory, if there is one.
238
- -e, --env, --from <env_name> Selects the environment to pull changes from. Defaults to the environment synced to the current directory, if there is one.
239
- --force Forces a pull by discarding any changes made on your local directory since last sync
240
- --allow-different-directory Pulls changes from any environment directory, even if the directory hasn't been synced before
241
- --allow-different-app Pulls changes to a different app using --app command, instead of the most recently synced one in the current directory
236
+ FLAGS
237
+ -a, --app, --application <app> Gadget app to use
238
+ -e, --env, --environment, --from <env> Environment to pull from
239
+ -f, --force Pull without prompting, discarding local changes
242
240
 
243
- Examples
244
- Pull all development environment changes by discarding any changes made locally
245
- $ ggt pull --env development --force
241
+ EXAMPLES
242
+ $ ggt pull
243
+ $ ggt pull --env staging
244
+ $ ggt pull --env production --force
246
245
  ```
247
246
 
248
247
  ### `ggt var`
249
248
 
250
249
  ```sh-session
251
250
  $ ggt var -h
252
- Manage environment variables for your Gadget application.
253
-
254
- Usage
255
- ggt var <command> [options]
256
-
257
- Commands
258
- list List all environment variables
259
- get <key> Get the value of an environment variable
260
- set <key=value> Set one or more environment variables
261
- delete <key> Delete one or more environment variables
262
- import Import environment variables from another environment or file
251
+ Manage your app's environment variables
252
+
253
+ USAGE
254
+ ggt var <command> [flags]
255
+
256
+ COMMANDS
257
+ list List all environment variable keys
258
+ get Print the value of an environment variable
259
+ set Set one or more environment variables
260
+ delete Delete one or more environment variables
261
+ import Import variables from another environment or file
262
+
263
+ FLAGS
264
+ -a, --app, --application <app> Gadget app to use
265
+ -e, --env, --environment <env> Environment to use
266
+
267
+ EXAMPLES
268
+ $ ggt var list
269
+ $ ggt var get DATABASE_URL
270
+ $ ggt var set API_KEY=abc123
271
+ $ ggt var set SECRET=xyz --secret
272
+ $ ggt var set CONNECTION_STRING=postgres://user:pass@host/db
273
+ $ ggt var delete API_KEY
274
+ $ ggt var delete --all --force
275
+ $ ggt var import --from staging --all
276
+ $ ggt var import --from-file .env --all
277
+ ```
263
278
 
264
- Options
265
- -a, --app <app_name> Selects the application
266
- -e, --env <env_name> Selects the environment
279
+ ### `ggt env`
267
280
 
268
- Run "ggt var <command> -h" for more information about a specific command.
281
+ ```sh-session
282
+ $ ggt env -h
283
+ Manage your app's environments
284
+
285
+ USAGE
286
+ ggt env <command> [flags]
287
+
288
+ COMMANDS
289
+ list List all environments
290
+ create Create a new environment
291
+ delete Delete an environment
292
+ unpause Unpause a paused environment
293
+ use Switch the active environment for this directory
294
+
295
+ FLAGS
296
+ -a, --app, --application <app> Gadget app to use
297
+
298
+ EXAMPLES
299
+ $ ggt env list
300
+ $ ggt env create staging
301
+ $ ggt env create staging --from development
302
+ $ ggt env delete staging --force
303
+ $ ggt env unpause staging
304
+ $ ggt env use staging
269
305
  ```
270
306
 
271
307
  ### `ggt add`
272
308
 
273
309
  ```sh-session
274
310
  $ ggt add -h
275
- Adds models, fields, actions and routes to your app.
276
-
277
- This command first performs a sync to ensure that your local and environment directories match, changes are tracked since last sync.
278
- If any conflicts are detected, they must be resolved before adding models, fields, actions or routes.
279
-
280
- Usage
281
- ggt add model <model_name> [field_name:field_type ...]
282
-
283
- ggt add action [CONTEXT]/<action_name>
284
- CONTEXT:Specifies the kind of action. Use "model" for model actions otherwise use "action".
311
+ Add resources to your app
285
312
 
286
- ggt add route <HTTP_METHOD> <route_path>
313
+ USAGE
314
+ ggt add <command> [flags]
287
315
 
288
- ggt add field <model_path>/<field_name>:<field_type>
316
+ COMMANDS
317
+ model Add a new data model
318
+ action Add an action to a model or as a global action
319
+ route Add an HTTP route
320
+ field Add a field to an existing model
321
+ environment Create a new environment by cloning
289
322
 
290
- Options
291
- -a, --app <app_name> Selects the app to add to. Defaults to the app synced to the current directory, if there is one.
292
- -e, --env <env_name> Selects the environment to add to. Defaults to the environment synced to the current directory, if there is one.
323
+ FLAGS
324
+ -a, --app, --application <app> Gadget app to use
325
+ -e, --env, --environment <env> Environment to use
293
326
 
294
- Examples
295
- Add a new model 'post' with out fields:
296
- $ ggt add model modelA
297
-
298
- Add a new model 'post' with 2 new 'string' type fields 'title' and 'body':
327
+ EXAMPLES
328
+ $ ggt add model post
299
329
  $ ggt add model post title:string body:string
300
-
301
- Add a new 'boolean' type field 'published' to an existing model
302
- ggt add field post/published:boolean
303
-
304
- Add new action 'publish' to the 'post' model:
305
- ggt add action model/post/publish
306
-
307
- Add a new action 'audit'
308
- ggt add action action/audit
309
-
310
- Add a new route 'howdy'
311
- ggt add route GET howdy
312
-
313
- Clone the `development` environment into a new `staging` environment
314
- ggt add environment staging --environment development
330
+ $ ggt add field post/published:boolean
331
+ $ ggt add action model/post/publish
332
+ $ ggt add action action/audit
333
+ $ ggt add route GET /hello
334
+ $ ggt add environment staging
315
335
  ```
316
336
 
317
- ### `ggt open`
337
+ ### `ggt model`
318
338
 
319
339
  ```sh-session
320
- $ ggt open -h
321
- This command opens a specific Gadget page in your browser, allowing you to directly access
322
- various parts of your application's interface such as logs, permissions, data views, or
323
- schemas.
340
+ $ ggt model -h
341
+ Add and manage models in your app
324
342
 
325
- Usage
326
- ggt open [LOCATION] [model_name] [--show-all] [options]
343
+ USAGE
344
+ ggt model <command> [flags]
327
345
 
328
- LOCATION: specifies the part of Gadget to open, by default it'll open the apps home page:
346
+ COMMANDS
347
+ add Add a model to your app
348
+ remove Remove a model from your app
349
+ rename Rename a model
329
350
 
330
- + logs Opens logs
331
- + permissions Opens permissions
332
- + data Opens data editor for a specific model
333
- + schema Opens schema editor for a specific model
351
+ FLAGS
352
+ -a, --app, --application <app> Gadget app to use
353
+ -e, --env, --environment <env> Environment to use
334
354
 
335
- Options
336
- -a, --app <app_name> Selects the application to open in your browser. Defaults to the app synced to the current directory, if there is one.
337
- -e, --env <env_name> Selects the environment to open in your browser. Defaults to the environment synced to the current directory, if there is one.
338
- --show-all Shows all schema, or data options by listing your available models
355
+ EXAMPLES
356
+ $ ggt model add post
357
+ $ ggt model remove post --force
358
+ $ ggt model rename post article
359
+ ```
339
360
 
340
- Examples
341
- Opens editor home
342
- $ ggt open
361
+ ### `ggt action`
343
362
 
344
- Opens logs
345
- $ ggt open logs
363
+ ```sh-session
364
+ $ ggt action -h
365
+ Add and manage actions
346
366
 
347
- Opens permissions
348
- $ ggt open permissions
367
+ USAGE
368
+ ggt action <command> [flags]
349
369
 
350
- Opens data editor for the 'post' model
351
- $ ggt open data post
370
+ COMMANDS
371
+ add Add an action to your app
352
372
 
353
- Opens schema for 'post' model
354
- $ ggt open schema post
373
+ FLAGS
374
+ -a, --app, --application <app> Gadget app to use
375
+ -e, --env, --environment <env> Environment to use
355
376
 
356
- Shows all models available in the data editor
357
- $ ggt open data -show-all
377
+ EXAMPLES
378
+ $ ggt action add sendWelcomeEmail
379
+ $ ggt action add notifications/sendWelcomeEmail
380
+ $ ggt action add publish --model post
381
+ $ ggt action add fulfill --model shopifyOrder
382
+ ```
358
383
 
359
- Shows all models available in the schema viewer
360
- $ ggt open schema --show-all
384
+ ### `ggt open`
361
385
 
362
- Opens data editor for 'post' model of app 'myBlog' in the 'staging' environment
363
- $ ggt open data post --app myBlog --env staging
386
+ ```sh-session
387
+ $ ggt open -h
388
+ Open your app in a browser
389
+
390
+ USAGE
391
+ ggt open [location] [model] [flags]
392
+
393
+ ARGUMENTS
394
+ location Page to open: logs, permissions, data, or schema
395
+ model Model name for data or schema locations
396
+
397
+ FLAGS
398
+ -a, --app, --application <app> Gadget app to use
399
+ -e, --env, --environment <env> Environment to use
400
+ --show-all Prompt to pick a model from the full list
401
+
402
+ EXAMPLES
403
+ $ ggt open
404
+ $ ggt open logs
405
+ $ ggt open permissions
406
+ $ ggt open data post
407
+ $ ggt open schema post
408
+ $ ggt open data --show-all
409
+ $ ggt open schema --show-all
410
+ $ ggt open data post --app myBlog --env staging
364
411
  ```
365
412
 
366
413
  ### `ggt list`
367
414
 
368
415
  ```sh-session
369
416
  $ ggt list -h
370
- List the apps available to the currently logged-in user.
417
+ List your Gadget apps
371
418
 
372
- Usage
373
- ggt list
419
+ USAGE
420
+ ggt list
421
+
422
+ EXAMPLES
423
+ $ ggt list
424
+ $ ggt list --json
374
425
  ```
375
426
 
376
427
  ### `ggt login`
377
428
 
378
429
  ```sh-session
379
430
  $ ggt login -h
380
- Log in to your account.
431
+ Log in to Gadget
432
+
433
+ USAGE
434
+ ggt login
381
435
 
382
- Usage
383
- ggt login
436
+ EXAMPLES
437
+ $ ggt login
384
438
  ```
385
439
 
386
440
  ### `ggt logout`
387
441
 
388
442
  ```sh-session
389
443
  $ ggt logout -h
390
- Log out of your account.
444
+ Log out of Gadget
391
445
 
392
- Usage
393
- ggt logout
446
+ USAGE
447
+ ggt logout
448
+
449
+ EXAMPLES
450
+ $ ggt logout
394
451
  ```
395
452
 
396
453
  ### `ggt logs`
397
454
 
398
455
  ```sh-session
399
456
  $ ggt logs -h
400
- Streams the logs for an application to.
401
-
402
- Usage
403
- ggt logs [options]
404
-
405
- Options
406
- -ll, --log-level <level> Sets the log level for incoming application logs (default: info)
407
- --my-logs Only outputs user sourced logs and exclude logs from the Gadget framework
408
- --json Output logs in JSON format
409
- -a, --app <app_name> Selects the app to pull your environment changes from. Defaults to the app synced to the current directory, if there is one.
410
- -e, --env, --from <env_name> Selects the environment to pull changes from. Defaults to the environment synced to the current directory, if there is one.
411
-
412
- Examples
413
- Stream all user logs from your development environment
414
- $ ggt logs --env development --my-logs
415
-
416
- Stream all logs from your production environment in JSON format
417
- $ ggt logs --env production --json
457
+ Print recent logs or stream logs from your app
458
+
459
+ USAGE
460
+ ggt logs [flags]
461
+
462
+ FLAGS
463
+ -a, --app, --application <app> Gadget app to use
464
+ -e, --env, --environment <env> Environment to use
465
+ -f, --follow Stream logs continuously
466
+ -l, --log-level <level> Minimum log level to display
467
+ -m, --my-logs Show only logs emitted by your code
468
+ --start <datetime> Start time for one-shot log queries
469
+
470
+ EXAMPLES
471
+ $ ggt logs
472
+ $ ggt logs --start 2025-01-01T00:00:00Z --log-level warn
473
+ $ ggt logs --follow --my-logs
474
+ $ ggt logs --env production --json
418
475
  ```
419
476
 
420
477
  ### `ggt debugger`
421
478
 
422
479
  ```sh-session
423
480
  $ ggt debugger -h
424
- Start a Chrome DevTools Protocol proxy server that connects to the Gadget debugger.
425
- This allows you to debug your Gadget app using VS Code, Chrome DevTools, or any other
426
- CDP-compatible debugger client.
427
-
428
- Usage
429
- $ ggt debugger [DIRECTORY] [options]
430
-
431
- DIRECTORY: The directory containing your Gadget app (default: current directory)
432
-
433
- Options
434
- -a, --app <app_name> Selects the app to debug. Defaults to the app synced to the current directory, if there is one.
435
- -e, --env <env_name> Selects the environment to debug. Defaults to the environment synced to the current directory, if there is one.
436
- -p, --port <port> Local port for the inspector proxy (default: 9229)
437
- --configure <editor> Configure debugger for vscode, cursor
438
-
439
- Examples
440
- start debugger proxy for current environment
441
- $ ggt debugger
442
-
443
- use a custom port
444
- $ ggt debugger --port 9230
445
-
446
- debug a specific app and environment
447
- $ ggt debugger --app myApp --env development
448
-
449
- configure VS Code debugger
450
- $ ggt debugger --configure vscode
481
+ Connect a debugger to your app's environment
482
+
483
+ USAGE
484
+ ggt debugger [directory] [flags]
485
+
486
+ ARGUMENTS
487
+ directory App directory to use
488
+
489
+ FLAGS
490
+ -a, --app, --application <app> Gadget app to use
491
+ -c, --configure <editor> Write editor debug config files (vscode, cursor)
492
+ -e, --env, --environment <env> Environment to use
493
+ -p, --port <port> Local port for the CDP proxy
494
+
495
+ EXAMPLES
496
+ $ ggt debugger
497
+ $ ggt debugger --port 9230
498
+ $ ggt debugger --configure vscode
499
+ $ ggt debugger --configure cursor
500
+ $ ggt debugger --app myApp --env development
501
+ $ ggt debugger --port 9230 --configure vscode
451
502
  ```
452
503
 
453
504
  ### `ggt whoami`
454
505
 
455
506
  ```sh-session
456
507
  $ ggt whoami -h
457
- Show the name and email address of the currently logged in user.
508
+ Show the current logged-in user
458
509
 
459
- Usage
460
- ggt whoami
510
+ USAGE
511
+ ggt whoami
512
+
513
+ EXAMPLES
514
+ $ ggt whoami
461
515
  ```
462
516
 
463
517
  ### `ggt configure`
464
518
 
465
519
  ```sh-session
466
520
  $ ggt configure -h
467
- Make changes to the configured defaults. This allows you to set an option on every ggt command by default without
468
- needing to set a flag on every command.
521
+ Manage ggt configuration
469
522
 
470
- Usage
471
- ggt configure show
523
+ USAGE
524
+ ggt configure <command>
472
525
 
473
- ggt configure change
526
+ COMMANDS
527
+ show Show current configured defaults
528
+ change Interactively change configuration options
529
+ clear Remove all configured defaults
474
530
 
475
- ggt configure clear
531
+ EXAMPLES
532
+ $ ggt configure show
533
+ $ ggt configure change
534
+ $ ggt configure clear
476
535
  ```
477
536
 
478
537
  ### `ggt agent-plugin`
479
538
 
480
539
  ```sh-session
481
540
  $ ggt agent-plugin -h
482
- Install Gadget agent plugins (AGENTS.md + skills) into the current project.
541
+ Manage plugins for AI coding assistants
542
+
543
+ USAGE
544
+ ggt agent-plugin <command>
483
545
 
484
- Usage
485
- ggt agent-plugin install [--force]
546
+ COMMANDS
547
+ install Install agent plugins into the current project
548
+ update Update agent plugins to the latest version
486
549
 
487
- Flags
488
- --force Overwrite/reinstall even if already present
550
+ EXAMPLES
551
+ $ ggt agent-plugin install
552
+ $ ggt agent-plugin install --force
553
+ $ ggt agent-plugin update
489
554
  ```
490
555
 
491
556
  ### `ggt eval`
492
557
 
493
558
  ```sh-session
494
559
  $ ggt eval -h
495
- Evaluates a JavaScript snippet against a Gadget app's API client.
560
+ Evaluate a JavaScript snippet against your app
561
+
562
+ USAGE
563
+ ggt eval <snippet> [flags]
564
+
565
+ ARGUMENTS
566
+ snippet JavaScript expression or statement to run
567
+
568
+ FLAGS
569
+ -a, --app, --application <app> Gadget app to use
570
+ -e, --env, --environment <env> Environment to use
571
+ -w, --allow-writes Allow write operations (read-only by default)
572
+
573
+ EXAMPLES
574
+ $ ggt eval 'api.user.findMany()'
575
+ $ ggt eval 'api.post.findMany({ select: { id: true, title: true } })'
576
+ $ ggt eval --app my-app --env staging 'api.user.findFirst()'
577
+ $ ggt eval -w 'api.user.delete("123")'
578
+ $ ggt eval --json 'api.user.count()'
579
+ $ ggt eval 'const users = await api.user.findMany(); return users.length'
580
+ ```
496
581
 
497
- The snippet receives an api variable (a pre-constructed Gadget API client
498
- authenticated as the developer). Results are formatted like Node.js REPL output.
499
- Writes are disallowed by default; use --allow-writes to enable them.
582
+ ### `ggt version`
500
583
 
501
- Usage
502
- $ ggt eval [options] <snippet>
584
+ ```sh-session
585
+ $ ggt version -h
586
+ Print the currently installed version
503
587
 
504
- Options
505
- -a, --app <app_name> Selects a specific app. Defaults to the app synced to the current directory, if there is one.
506
- -e, --env <env_name> Selects a specific environment. Defaults to the environment synced to the current directory, if there is one.
507
- -w, --allow-writes Allow write operations (default is read-only)
508
- --json Output result as JSON instead of Node.js inspect format (root flag)
588
+ USAGE
589
+ ggt version
509
590
 
510
- Examples
511
- $ ggt eval 'api.user.findMany()'
512
- $ ggt eval --app my-app --env staging 'api.user.findFirst()'
513
- $ ggt eval -a my-app -w 'api.user.delete("123")'
591
+ EXAMPLES
592
+ $ ggt version
514
593
  ```
515
594
 
516
- ### `ggt version`
595
+ ### `ggt completion`
517
596
 
518
597
  ```sh-session
519
- $ ggt version -h
520
- Print this version of ggt.
598
+ $ ggt completion -h
599
+ Generate shell completion scripts
600
+
601
+ USAGE
602
+ ggt completion <command>
521
603
 
522
- Usage
523
- ggt version
604
+ COMMANDS
605
+ bash Generate bash completion script
606
+ zsh Generate zsh completion script
607
+ fish Generate fish completion script
524
608
 
525
- Updating ggt
526
- When there is a new release of ggt, running ggt will show you a message letting you
527
- know that an update is available.
609
+ EXAMPLES
610
+ $ ggt completion bash
611
+ $ ggt completion zsh
612
+ $ ggt completion fish
528
613
  ```