Skip to content

Commit bb4c051

Browse files
thomasballingerConvex, Inc.
authored andcommitted
More CLI docs (#40904)
Clarify codegen behavior in docs GitOrigin-RevId: 2aa076e4cdbe2cddaf83ff1f8dcdc94fc53ed1d9
1 parent cb91a77 commit bb4c051

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

npm-packages/docs/docs/cli.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -230,13 +230,14 @@ Once this command succeeds the new functions will be available immediately.
230230
npx convex deploy
231231
```
232232

233-
When run with the `CONVEX_DEPLOY_KEY` environment variable containing a Preview
234-
Deploy Key, this command will:
235-
236-
1. Create a deployment with the specified name. `npx convex deploy` will infer
237-
the Git branch name for Vercel, Netlify, GitHub, and GitLab environments, but
238-
the `--preview-create` option can be used to customize the name associated
239-
with the newly created deployment.
233+
When run with the `CONVEX_DEPLOY_KEY` environment variable containing a
234+
[Preview Deploy Key](docs/cli/deploy-key-types.mdx#deploying-to-preview-deployments),
235+
this command will:
236+
237+
1. Create a new Convex deployment. `npx convex deploy` will infer the Git branch
238+
name for Vercel, Netlify, GitHub, and GitLab environments, or the
239+
`--preview-create` option can be used to customize the name associated with
240+
the newly created deployment.
240241
```
241242
npx convex deploy --preview-create my-branch-name
242243
```
@@ -277,5 +278,14 @@ setting up frontend and backend previews together.
277278
npx convex codegen
278279
```
279280

280-
Update the [generated code](/generated-api/) in `convex/_generated` without
281-
pushing. This can be useful for orchestrating build steps in CI.
281+
The [generated code](/generated-api/) in the `convex/_generated` directory
282+
includes types required for a TypeScript typecheck. This code is generated
283+
whenever necessary while running `npx convex dev` and this code should be
284+
committed to the repo (your code won't typecheck without it!).
285+
286+
In the rare cases it's useful to regenerate code (e.g. in CI to ensure that the
287+
correct code was checked it) you can use this command.
288+
289+
Generating code can require communicating with a convex deployment in order to
290+
evaluate configuration files in the Convex JavaScript runtime. This doesn't
291+
modify the code running on the deployment.

0 commit comments

Comments
 (0)