@gadgetinc/ggt 2.3.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 +387 -327
  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 +18 -22
  118. package/assets/favicon-128@4x.png +0 -0
  119. package/dist/add-7MLI3TCY.js +0 -82
  120. package/dist/add-7MLI3TCY.js.map +0 -7
  121. package/dist/agent-plugin-543K6WBH.js +0 -11
  122. package/dist/agent-plugin-543K6WBH.js.map +0 -7
  123. package/dist/chunk-2HJS3KFB.js +0 -2
  124. package/dist/chunk-2HJS3KFB.js.map +0 -7
  125. package/dist/chunk-3WKH3DJL.js +0 -2
  126. package/dist/chunk-3WKH3DJL.js.map +0 -7
  127. package/dist/chunk-577KP32Z.js +0 -8
  128. package/dist/chunk-577KP32Z.js.map +0 -7
  129. package/dist/chunk-6FVHOLT7.js +0 -28
  130. package/dist/chunk-6FVHOLT7.js.map +0 -7
  131. package/dist/chunk-72J7X5LR.js +0 -2
  132. package/dist/chunk-72J7X5LR.js.map +0 -7
  133. package/dist/chunk-7DYQUG5M.js +0 -2
  134. package/dist/chunk-7DYQUG5M.js.map +0 -7
  135. package/dist/chunk-ALSXPCRD.js +0 -118
  136. package/dist/chunk-ALSXPCRD.js.map +0 -7
  137. package/dist/chunk-CNNOPE5K.js +0 -69
  138. package/dist/chunk-CNNOPE5K.js.map +0 -7
  139. package/dist/chunk-ETKWDO4V.js +0 -2
  140. package/dist/chunk-ETKWDO4V.js.map +0 -7
  141. package/dist/chunk-F6BGQ4LG.js +0 -11
  142. package/dist/chunk-F6BGQ4LG.js.map +0 -7
  143. package/dist/chunk-FE5O5VX4.js +0 -2
  144. package/dist/chunk-FE5O5VX4.js.map +0 -7
  145. package/dist/chunk-GFQYFEEH.js +0 -2
  146. package/dist/chunk-GFQYFEEH.js.map +0 -7
  147. package/dist/chunk-GJGBTM5Y.js +0 -2
  148. package/dist/chunk-GJGBTM5Y.js.map +0 -7
  149. package/dist/chunk-GZTHIOXS.js +0 -2
  150. package/dist/chunk-GZTHIOXS.js.map +0 -7
  151. package/dist/chunk-IQSZEOYY.js +0 -283
  152. package/dist/chunk-IQSZEOYY.js.map +0 -7
  153. package/dist/chunk-J232VCIM.js +0 -2
  154. package/dist/chunk-J232VCIM.js.map +0 -7
  155. package/dist/chunk-KKIL22RY.js +0 -2
  156. package/dist/chunk-KKIL22RY.js.map +0 -7
  157. package/dist/chunk-L2XBSR7G.js +0 -2
  158. package/dist/chunk-L2XBSR7G.js.map +0 -7
  159. package/dist/chunk-N5FFICAP.js +0 -9
  160. package/dist/chunk-N5FFICAP.js.map +0 -7
  161. package/dist/chunk-TGCJ6TMW.js +0 -10
  162. package/dist/chunk-TGCJ6TMW.js.map +0 -7
  163. package/dist/chunk-ULJYEUQG.js +0 -113
  164. package/dist/chunk-ULJYEUQG.js.map +0 -7
  165. package/dist/chunk-UVVKKUYG.js +0 -10
  166. package/dist/chunk-UVVKKUYG.js.map +0 -7
  167. package/dist/chunk-WZ2PO6H2.js +0 -11
  168. package/dist/chunk-WZ2PO6H2.js.map +0 -7
  169. package/dist/chunk-X4XSYLCE.js +0 -12
  170. package/dist/chunk-X4XSYLCE.js.map +0 -7
  171. package/dist/chunk-ZYDMXS5R.js +0 -6
  172. package/dist/chunk-ZYDMXS5R.js.map +0 -7
  173. package/dist/configure-PYRXYNGZ.js +0 -12
  174. package/dist/configure-PYRXYNGZ.js.map +0 -7
  175. package/dist/debugger-VKLUEWIN.js +0 -41
  176. package/dist/debugger-VKLUEWIN.js.map +0 -7
  177. package/dist/deploy-JCREEGBA.js +0 -25
  178. package/dist/deploy-JCREEGBA.js.map +0 -7
  179. package/dist/dev-Y2GLI7EH.js +0 -59
  180. package/dist/dev-Y2GLI7EH.js.map +0 -7
  181. package/dist/env-5OPHX3MC.js +0 -135
  182. package/dist/env-5OPHX3MC.js.map +0 -7
  183. package/dist/esm-3JVXH7DT.js +0 -37
  184. package/dist/esm-3JVXH7DT.js.map +0 -7
  185. package/dist/eval-LZPZ6PBQ.js +0 -54
  186. package/dist/eval-LZPZ6PBQ.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-KUAF6WUA.js +0 -45
  198. package/dist/ggt-KUAF6WUA.js.map +0 -7
  199. package/dist/list-IANT7SNF.js +0 -11
  200. package/dist/list-IANT7SNF.js.map +0 -7
  201. package/dist/login-TYRZLN5S.js +0 -2
  202. package/dist/login-TYRZLN5S.js.map +0 -7
  203. package/dist/logout-P75XYYZ6.js +0 -7
  204. package/dist/logout-P75XYYZ6.js.map +0 -7
  205. package/dist/logs-SBMD6JSR.js +0 -28
  206. package/dist/logs-SBMD6JSR.js.map +0 -7
  207. package/dist/open-JPAMII4K.js +0 -74
  208. package/dist/open-JPAMII4K.js.map +0 -7
  209. package/dist/problems-EZRSHLZT.js +0 -14
  210. package/dist/problems-EZRSHLZT.js.map +0 -7
  211. package/dist/pull-R3PMBVOT.js +0 -28
  212. package/dist/pull-R3PMBVOT.js.map +0 -7
  213. package/dist/push-5XEEESQQ.js +0 -2
  214. package/dist/push-5XEEESQQ.js.map +0 -7
  215. package/dist/status-RJN5ES6S.js +0 -14
  216. package/dist/status-RJN5ES6S.js.map +0 -7
  217. package/dist/update-X7YS3MNH.js +0 -2
  218. package/dist/update-X7YS3MNH.js.map +0 -7
  219. package/dist/var-PC6KQUPF.js +0 -159
  220. package/dist/var-PC6KQUPF.js.map +0 -7
  221. package/dist/version-GZJOU2CV.js +0 -11
  222. package/dist/version-GZJOU2CV.js.map +0 -7
  223. package/dist/whoami-GKPGPZ3B.js +0 -7
  224. package/dist/whoami-GKPGPZ3B.js.map +0 -7
package/README.md CHANGED
@@ -29,6 +29,8 @@
29
29
  - [`ggt var`](#ggt-var)
30
30
  - [`ggt env`](#ggt-env)
31
31
  - [`ggt add`](#ggt-add)
32
+ - [`ggt model`](#ggt-model)
33
+ - [`ggt action`](#ggt-action)
32
34
  - [`ggt open`](#ggt-open)
33
35
  - [`ggt list`](#ggt-list)
34
36
  - [`ggt login`](#ggt-login)
@@ -40,6 +42,7 @@
40
42
  - [`ggt agent-plugin`](#ggt-agent-plugin)
41
43
  - [`ggt eval`](#ggt-eval)
42
44
  - [`ggt version`](#ggt-version)
45
+ - [`ggt completion`](#ggt-completion)
43
46
 
44
47
  ## Intro
45
48
 
@@ -62,39 +65,54 @@ $ npm install -g ggt
62
65
  $ ggt
63
66
  The command-line interface for Gadget.
64
67
 
65
- Usage
66
- ggt [COMMAND]
67
-
68
- Commands
69
- dev Start developing your application
70
- deploy Deploy your environment to production
71
- status Show your local and environment's file changes
72
- push Push your local files to your environment
73
- pull Pull your environment's files to your local computer
74
- var Manage environment variables
75
- env Manage environments
76
- add Add models, fields, actions, routes and environments to your app
77
- open Open a Gadget location in your browser
78
- list List your available applications
79
- login Log in to your account
80
- logout Log out of your account
81
- logs Stream your environment's logs
82
- debugger Connect to the debugger for your environment
83
- whoami Print the currently logged in account
84
- configure Configure default execution options
85
- agent-plugin Install Gadget agent plugins (AGENTS.md + skills)
86
- version Print this version of ggt
87
-
88
- Flags
89
- -h, --help Print how to use a command
90
- -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)
91
109
  --telemetry Enable telemetry
110
+ --json Output as JSON where supported
92
111
 
93
- Agent plugins
94
- Install AGENTS.md and Gadget agent skills for your coding agent:
95
- ggt agent-plugin install
112
+ Use -h for a summary, --help for full details.
96
113
 
97
- 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
98
116
  ```
99
117
 
100
118
  ## Commands
@@ -103,451 +121,493 @@ Run "ggt [COMMAND] -h" for more information about a specific command.
103
121
 
104
122
  ```sh-session
105
123
  $ ggt dev -h
106
- Clones your Gadget environment's files to your local machine and keeps it in sync, in order to
107
- enable local development with your text editor and source code with Git.
108
-
109
- If your app's local directory already exists, this command first performs a sync to ensure
110
- that your local and environment directories match, changes are tracked since last sync. If any
111
- conflicts are detected, they must be resolved before development starts.
112
-
113
- Usage
114
- $ ggt dev [DIRECTORY] [options]
115
-
116
- DIRECTORY: The directory to sync files to (default: the current directory)
117
-
118
- Options
119
- -a, --app <app_name> Selects the app to sync files with. Defaults to the app synced to the current directory, if there is one.
120
- -e, --env <env_name> Selects the environment to sync files with. Defaults to the environment synced to the current directory, if there is one.
121
- --prefer <source> Auto-select changes from 'local' or 'environment' source on conflict
122
- --allow-unknown-directory Syncs to any local directory with existing files, even if the directory hasn't been synced before
123
- --allow-different-app Syncs with a different app using the --app command, instead of the most recently synced one in the current directory
124
- --log-level <level> Sets the log level for incoming application logs (default: info)
125
- --no-logs Disables outputting application logs to the console
126
- --my-logs Only outputs user sourced logs
127
-
128
- Ignoring files
129
- ggt dev uses a .ignore file, similar to .gitignore, to exclude specific files and
130
- folders from syncing. These files are always ignored:
131
-
132
- • .DS_Store
133
- • .gadget
134
- • .git
135
- • node_modules
136
- • .shopify
137
-
138
- Notes
139
- • "ggt dev" only works with development environments
140
- • "ggt dev" only supports "yarn" v1 for installing dependencies
141
- • Avoid deleting or moving all of your files while "ggt dev" is running
142
-
143
- Examples
144
- sync an app in a custom path
145
- $ ggt dev ~/myGadgetApps/myBlog --app myBlogApp
146
-
147
- sync with a specific environment and preselect all local changes on conflicts
148
- $ ggt dev --env main --prefer local
149
-
150
- sync a custom path with a specific app, environment and preselect all changes from local on conflicts
151
- $ 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
152
145
  ```
153
146
 
154
147
  ### `ggt deploy`
155
148
 
156
149
  ```sh-session
157
150
  $ ggt deploy -h
158
- Deploys your app to production.
159
-
160
- This command first performs a sync to ensure that your local and environment directories
161
- match, changes are tracked since last sync. If any conflicts are detected, they must be
162
- resolved before deployment.
163
-
164
- Usage
165
- $ ggt deploy [options]
166
-
167
- Options
168
- -a, --app <app_name> Selects a specific app to deploy. Defaults to the app synced to the current directory, if there is one.
169
- --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.
170
- --force Deploys by discarding any changes made to the environment directory since last sync
171
- --allow-different-directory Deploys from any local directory with existing files, even if the directory hasn't been synced before
172
- --allow-different-app Deploys a different app using the --app command, instead of the most recently synced one in the current directory
173
- --allow-problems Deploys despite any existing issues found in the app (gelly errors, typescript errors etc.)
174
- --allow-data-delete Deploys even if it results in the deletion of data in production
175
- --allow-charges Deploys even if it results in additional charges to your plan
176
-
177
- Examples
178
- Deploys code from the staging environment of a myBlog
179
- $ 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
180
167
  ```
181
168
 
182
169
  ### `ggt status`
183
170
 
184
171
  ```sh-session
185
172
  $ ggt status -h
186
- Shows file changes since last sync (e.g. $ggt dev, push, deploy etc.)
173
+ Show sync state and pending file changes
187
174
 
188
- Usage
189
- 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
190
185
  ```
191
186
 
192
187
  ### `ggt problems`
193
188
 
194
189
  ```sh-session
195
190
  $ ggt problems -h
196
- 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
197
199
 
198
- Usage
199
- ggt problems
200
+ EXAMPLES
201
+ $ ggt problems
202
+ $ ggt problems --app myBlog
203
+ $ ggt problems --env staging
204
+ $ ggt problems --app myBlog --env production
200
205
  ```
201
206
 
202
207
  ### `ggt push`
203
208
 
204
209
  ```sh-session
205
210
  $ ggt push -h
206
- Pushes your local files to your environment directory.
211
+ Upload local file changes to Gadget
207
212
 
208
- This command first tracks changes in your environment directory since the last sync.
209
- If changes are detected, you will be prompted to discard them or abort the push.
213
+ USAGE
214
+ ggt push [flags]
210
215
 
211
- Usage
212
- 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
213
220
 
214
- Options
215
- -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.
216
- -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.
217
- --force Forces a push by discarding any changes made on your environment directory since last sync
218
- --allow-different-directory Pushes changes from any local directory with existing files, even if the directory hasn't been synced before
219
- --allow-different-app Pushes changes to an app using --app command, instead of the most recently synced one in the current directory
220
-
221
- Examples
222
- Push all local changes to the main environment by discarding any changes made on main
223
- $ ggt push --env main --force
221
+ EXAMPLES
222
+ $ ggt push
223
+ $ ggt push --env main
224
+ $ ggt push --env main --force
224
225
  ```
225
226
 
226
227
  ### `ggt pull`
227
228
 
228
229
  ```sh-session
229
230
  $ ggt pull -h
230
- Pulls your environment files to your local directory.
231
-
232
- This command first tracks changes in your local directory since the last sync. If changes are
233
- detected, you will be prompted to discard them or abort the pull.
231
+ Download environment files to your local directory
234
232
 
235
- Usage
236
- ggt pull [options]
233
+ USAGE
234
+ ggt pull [flags]
237
235
 
238
- Options
239
- -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.
240
- -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.
241
- --force Forces a pull by discarding any changes made on your local directory since last sync
242
- --allow-different-directory Pulls changes from any environment directory, even if the directory hasn't been synced before
243
- --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
244
240
 
245
- Examples
246
- Pull all development environment changes by discarding any changes made locally
247
- $ ggt pull --env development --force
241
+ EXAMPLES
242
+ $ ggt pull
243
+ $ ggt pull --env staging
244
+ $ ggt pull --env production --force
248
245
  ```
249
246
 
250
247
  ### `ggt var`
251
248
 
252
249
  ```sh-session
253
250
  $ ggt var -h
254
- Manage environment variables for your Gadget application.
255
-
256
- Usage
257
- ggt var <command> [options]
258
-
259
- Commands
260
- list List all environment variables
261
- get <key> Get the value of an environment variable
262
- set <key=value> Set one or more environment variables
263
- delete <key> Delete one or more environment variables
264
- import Import environment variables from another environment or file
265
-
266
- Options
267
- -a, --app <app_name> Selects the application
268
- -e, --env <env_name> Selects the environment
269
-
270
- Run "ggt var <command> -h" for more information about a specific command.
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
271
277
  ```
272
278
 
273
279
  ### `ggt env`
274
280
 
275
281
  ```sh-session
276
282
  $ ggt env -h
277
- Manage environments for your Gadget application.
278
-
279
- Usage
280
- ggt env <command> [options]
281
-
282
- Commands
283
- list List all environments
284
- create <name> Create a new environment
285
- delete <name> Delete an environment
286
- unpause <name> Unpause a paused environment
287
- use <name> Switch the active environment
288
-
289
- Options
290
- -a, --app <app_name> Selects the application
291
-
292
- Run "ggt env <command> -h" for more information about a specific command.
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
293
305
  ```
294
306
 
295
307
  ### `ggt add`
296
308
 
297
309
  ```sh-session
298
310
  $ ggt add -h
299
- Adds models, fields, actions and routes to your app.
311
+ Add resources to your app
300
312
 
301
- This command first performs a sync to ensure that your local and environment directories match, changes are tracked since last sync.
302
- If any conflicts are detected, they must be resolved before adding models, fields, actions or routes.
313
+ USAGE
314
+ ggt add <command> [flags]
303
315
 
304
- Usage
305
- ggt add model <model_name> [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
306
322
 
307
- ggt add action [CONTEXT]/<action_name>
308
- CONTEXT:Specifies the kind of action. Use "model" for model actions otherwise use "action".
323
+ FLAGS
324
+ -a, --app, --application <app> Gadget app to use
325
+ -e, --env, --environment <env> Environment to use
309
326
 
310
- ggt add route <HTTP_METHOD> <route_path>
311
-
312
- ggt add field <model_path>/<field_name>:<field_type>
313
-
314
- Options
315
- -a, --app <app_name> Selects the app to add to. Defaults to the app synced to the current directory, if there is one.
316
- -e, --env <env_name> Selects the environment to add to. Defaults to the environment synced to the current directory, if there is one.
317
-
318
- Examples
319
- Add a new model 'post' with out fields:
320
- $ ggt add model modelA
321
-
322
- Add a new model 'post' with 2 new 'string' type fields 'title' and 'body':
327
+ EXAMPLES
328
+ $ ggt add model post
323
329
  $ ggt add model post title:string body:string
324
-
325
- Add a new 'boolean' type field 'published' to an existing model
326
- ggt add field post/published:boolean
327
-
328
- Add new action 'publish' to the 'post' model:
329
- ggt add action model/post/publish
330
-
331
- Add a new action 'audit'
332
- ggt add action action/audit
333
-
334
- Add a new route 'howdy'
335
- ggt add route GET howdy
336
-
337
- Clone the `development` environment into a new `staging` environment
338
- 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
339
335
  ```
340
336
 
341
- ### `ggt open`
337
+ ### `ggt model`
342
338
 
343
339
  ```sh-session
344
- $ ggt open -h
345
- This command opens a specific Gadget page in your browser, allowing you to directly access
346
- various parts of your application's interface such as logs, permissions, data views, or
347
- schemas.
340
+ $ ggt model -h
341
+ Add and manage models in your app
348
342
 
349
- Usage
350
- ggt open [LOCATION] [model_name] [--show-all] [options]
343
+ USAGE
344
+ ggt model <command> [flags]
351
345
 
352
- 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
353
350
 
354
- + logs Opens logs
355
- + permissions Opens permissions
356
- + data Opens data editor for a specific model
357
- + 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
358
354
 
359
- Options
360
- -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.
361
- -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.
362
- --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
+ ```
363
360
 
364
- Examples
365
- Opens editor home
366
- $ ggt open
361
+ ### `ggt action`
367
362
 
368
- Opens logs
369
- $ ggt open logs
363
+ ```sh-session
364
+ $ ggt action -h
365
+ Add and manage actions
370
366
 
371
- Opens permissions
372
- $ ggt open permissions
367
+ USAGE
368
+ ggt action <command> [flags]
373
369
 
374
- Opens data editor for the 'post' model
375
- $ ggt open data post
370
+ COMMANDS
371
+ add Add an action to your app
376
372
 
377
- Opens schema for 'post' model
378
- $ ggt open schema post
373
+ FLAGS
374
+ -a, --app, --application <app> Gadget app to use
375
+ -e, --env, --environment <env> Environment to use
379
376
 
380
- Shows all models available in the data editor
381
- $ 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
+ ```
382
383
 
383
- Shows all models available in the schema viewer
384
- $ ggt open schema --show-all
384
+ ### `ggt open`
385
385
 
386
- Opens data editor for 'post' model of app 'myBlog' in the 'staging' environment
387
- $ 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
388
411
  ```
389
412
 
390
413
  ### `ggt list`
391
414
 
392
415
  ```sh-session
393
416
  $ ggt list -h
394
- List the apps available to the currently logged-in user.
417
+ List your Gadget apps
395
418
 
396
- Usage
397
- ggt list
419
+ USAGE
420
+ ggt list
421
+
422
+ EXAMPLES
423
+ $ ggt list
424
+ $ ggt list --json
398
425
  ```
399
426
 
400
427
  ### `ggt login`
401
428
 
402
429
  ```sh-session
403
430
  $ ggt login -h
404
- Log in to your account.
431
+ Log in to Gadget
432
+
433
+ USAGE
434
+ ggt login
405
435
 
406
- Usage
407
- ggt login
436
+ EXAMPLES
437
+ $ ggt login
408
438
  ```
409
439
 
410
440
  ### `ggt logout`
411
441
 
412
442
  ```sh-session
413
443
  $ ggt logout -h
414
- Log out of your account.
444
+ Log out of Gadget
445
+
446
+ USAGE
447
+ ggt logout
415
448
 
416
- Usage
417
- ggt logout
449
+ EXAMPLES
450
+ $ ggt logout
418
451
  ```
419
452
 
420
453
  ### `ggt logs`
421
454
 
422
455
  ```sh-session
423
456
  $ ggt logs -h
424
- Streams the logs for an application to.
425
-
426
- Usage
427
- ggt logs [options]
428
-
429
- Options
430
- -ll, --log-level <level> Sets the log level for incoming application logs (default: info)
431
- --my-logs Only outputs user sourced logs and exclude logs from the Gadget framework
432
- --json Output logs in JSON format
433
- -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.
434
- -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.
435
-
436
- Examples
437
- Stream all user logs from your development environment
438
- $ ggt logs --env development --my-logs
439
-
440
- Stream all logs from your production environment in JSON format
441
- $ 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
442
475
  ```
443
476
 
444
477
  ### `ggt debugger`
445
478
 
446
479
  ```sh-session
447
480
  $ ggt debugger -h
448
- Start a Chrome DevTools Protocol proxy server that connects to the Gadget debugger.
449
- This allows you to debug your Gadget app using VS Code, Chrome DevTools, or any other
450
- CDP-compatible debugger client.
451
-
452
- Usage
453
- $ ggt debugger [DIRECTORY] [options]
454
-
455
- DIRECTORY: The directory containing your Gadget app (default: current directory)
456
-
457
- Options
458
- -a, --app <app_name> Selects the app to debug. Defaults to the app synced to the current directory, if there is one.
459
- -e, --env <env_name> Selects the environment to debug. Defaults to the environment synced to the current directory, if there is one.
460
- -p, --port <port> Local port for the inspector proxy (default: 9229)
461
- --configure <editor> Configure debugger for vscode, cursor
462
-
463
- Examples
464
- start debugger proxy for current environment
465
- $ ggt debugger
466
-
467
- use a custom port
468
- $ ggt debugger --port 9230
469
-
470
- debug a specific app and environment
471
- $ ggt debugger --app myApp --env development
472
-
473
- configure VS Code debugger
474
- $ 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
475
502
  ```
476
503
 
477
504
  ### `ggt whoami`
478
505
 
479
506
  ```sh-session
480
507
  $ ggt whoami -h
481
- Show the name and email address of the currently logged in user.
508
+ Show the current logged-in user
482
509
 
483
- Usage
484
- ggt whoami
510
+ USAGE
511
+ ggt whoami
512
+
513
+ EXAMPLES
514
+ $ ggt whoami
485
515
  ```
486
516
 
487
517
  ### `ggt configure`
488
518
 
489
519
  ```sh-session
490
520
  $ ggt configure -h
491
- Make changes to the configured defaults. This allows you to set an option on every ggt command by default without
492
- needing to set a flag on every command.
521
+ Manage ggt configuration
493
522
 
494
- Usage
495
- ggt configure show
523
+ USAGE
524
+ ggt configure <command>
496
525
 
497
- ggt configure change
526
+ COMMANDS
527
+ show Show current configured defaults
528
+ change Interactively change configuration options
529
+ clear Remove all configured defaults
498
530
 
499
- ggt configure clear
531
+ EXAMPLES
532
+ $ ggt configure show
533
+ $ ggt configure change
534
+ $ ggt configure clear
500
535
  ```
501
536
 
502
537
  ### `ggt agent-plugin`
503
538
 
504
539
  ```sh-session
505
540
  $ ggt agent-plugin -h
506
- Install or update Gadget agent plugins (AGENTS.md + skills).
541
+ Manage plugins for AI coding assistants
542
+
543
+ USAGE
544
+ ggt agent-plugin <command>
507
545
 
508
- Usage
509
- ggt agent-plugin install [--force]
510
- ggt agent-plugin update
546
+ COMMANDS
547
+ install Install agent plugins into the current project
548
+ update Update agent plugins to the latest version
511
549
 
512
- Flags
513
- --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
514
554
  ```
515
555
 
516
556
  ### `ggt eval`
517
557
 
518
558
  ```sh-session
519
559
  $ ggt eval -h
520
- 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
+ ```
521
581
 
522
- The snippet receives an api variable (a pre-constructed Gadget API client
523
- authenticated as the developer). Results are formatted like Node.js REPL output.
524
- Writes are disallowed by default; use --allow-writes to enable them.
582
+ ### `ggt version`
525
583
 
526
- Usage
527
- $ ggt eval [options] <snippet>
584
+ ```sh-session
585
+ $ ggt version -h
586
+ Print the currently installed version
528
587
 
529
- Options
530
- -a, --app <app_name> Selects a specific app. Defaults to the app synced to the current directory, if there is one.
531
- -e, --env <env_name> Selects a specific environment. Defaults to the environment synced to the current directory, if there is one.
532
- -w, --allow-writes Allow write operations (default is read-only)
533
- --json Output result as JSON instead of Node.js inspect format (root flag)
588
+ USAGE
589
+ ggt version
534
590
 
535
- Examples
536
- $ ggt eval 'api.user.findMany()'
537
- $ ggt eval --app my-app --env staging 'api.user.findFirst()'
538
- $ ggt eval -a my-app -w 'api.user.delete("123")'
591
+ EXAMPLES
592
+ $ ggt version
539
593
  ```
540
594
 
541
- ### `ggt version`
595
+ ### `ggt completion`
542
596
 
543
597
  ```sh-session
544
- $ ggt version -h
545
- Print this version of ggt.
598
+ $ ggt completion -h
599
+ Generate shell completion scripts
600
+
601
+ USAGE
602
+ ggt completion <command>
546
603
 
547
- Usage
548
- ggt version
604
+ COMMANDS
605
+ bash Generate bash completion script
606
+ zsh Generate zsh completion script
607
+ fish Generate fish completion script
549
608
 
550
- Updating ggt
551
- When there is a new release of ggt, running ggt will show you a message letting you
552
- know that an update is available.
609
+ EXAMPLES
610
+ $ ggt completion bash
611
+ $ ggt completion zsh
612
+ $ ggt completion fish
553
613
  ```