Skip to content

Commit

Permalink
Chore: Update CLI docs (#876)
Browse files Browse the repository at this point in the history
Co-authored-by: hasura-bot <[email protected]>
Co-authored-by: Rob Dominguez <[email protected]>
  • Loading branch information
3 people authored Feb 5, 2025
1 parent 51012f1 commit 272a575
Show file tree
Hide file tree
Showing 97 changed files with 167 additions and 106 deletions.
6 changes: 4 additions & 2 deletions docs/reference/cli/commands/ddn_auth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ Manage Hasura DDN CLI Auth

## Available operations

- [ddn auth generate-promptql-secret-key](/reference/cli/commands/ddn_auth_generate-promptql-secret-key) - Generates the
project's PromptQL secret key and saves to global config
- [ddn auth login](/reference/cli/commands/ddn_auth_login) - Login to DDN
- [ddn auth logout](/reference/cli/commands/ddn_auth_logout) - Logout from DDN
- [ddn auth print-pat](/reference/cli/commands/ddn_auth_print-pat) - Prints the PAT to STDOUT
- [ddn auth print-promptql-secret-key](/reference/cli/commands/ddn_auth_print-promptql-secret-key) - Prints the PromptQL
secret key to STDOUT
- [ddn auth print-promptql-secret-key](/reference/cli/commands/ddn_auth_print-promptql-secret-key) - Prints the
project's PromptQL secret key to STDOUT

## Options

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
sidebar_label: ddn auth generate-promptql-secret-key
sidebar_position: 3
description: Generates the project's PromptQL secret key and saves to global config using the DDN CLI
keywords:
- hasura
- DDN
- docs
- CLI
- ddn auth generate-promptql-secret-key
---

# DDN CLI: ddn auth generate-promptql-secret-key

Generates the project's PromptQL secret key and saves to global config.

## Synopsis

Generates the project's PromptQL secret key and saves to global config

```bash
ddn auth generate-promptql-secret-key [flags]
```

## Examples

```bash
# Generates a PromptQL secret key for the project set in the context and saves to global config
ddn auth generate-promptql-secret-key
```

## Options

```sass
--ci Disables the use of context
-c, --context string Name of the context to use. (default <current_context>)
-h, --help help for generate-promptql-secret-key
-p, --project string DDN Project name
```

## Options inherited from parent operations

```sass
--log-level string Log level. Can be DEBUG, WARN, INFO, ERROR, or FATAL. (default "INFO")
--no-prompt Do not prompt for required but missing flags
--out string Output format. Can be table, json or yaml. (default "table")
--timeout int Request timeout in seconds [env: HASURA_DDN_TIMEOUT] (default 100)
```

## Parent operation

- [ddn auth](/reference/cli/commands/ddn_auth) - Manage Hasura DDN CLI Auth
2 changes: 1 addition & 1 deletion docs/reference/cli/commands/ddn_auth_login.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: ddn auth login
sidebar_position: 3
sidebar_position: 4
description: Login to DDN using the DDN CLI
keywords:
- hasura
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/cli/commands/ddn_auth_logout.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: ddn auth logout
sidebar_position: 4
sidebar_position: 5
description: Logout from DDN using the DDN CLI
keywords:
- hasura
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/cli/commands/ddn_auth_print-pat.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: ddn auth print-pat
sidebar_position: 5
sidebar_position: 6
description: Prints the PAT to STDOUT using the DDN CLI
keywords:
- hasura
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
sidebar_label: ddn auth print-promptql-secret-key
sidebar_position: 6
description: Prints the PromptQL secret key to STDOUT using the DDN CLI
sidebar_position: 7
description: Prints the project's PromptQL secret key to STDOUT using the DDN CLI
keywords:
- hasura
- DDN
Expand All @@ -12,11 +12,11 @@ keywords:

# DDN CLI: ddn auth print-promptql-secret-key

Prints the PromptQL secret key to STDOUT.
Prints the project's PromptQL secret key to STDOUT.

## Synopsis

Prints the PromptQL secret key to STDOUT
Prints the project's PromptQL secret key to STDOUT

```bash
ddn auth print-promptql-secret-key [flags]
Expand All @@ -27,7 +27,7 @@ ddn auth print-promptql-secret-key [flags]
## Examples

```bash
# Print the PromptQL secret key
# Print the PromptQL secret key of the project set in the context
ddn auth print-promptql-secret-key

# Print PromptQL secret key as JSON
Expand Down
6 changes: 5 additions & 1 deletion docs/reference/cli/commands/ddn_codemod.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: ddn codemod
sidebar_position: 7
sidebar_position: 8
description: Perform transformations on your Hasura project directory using the DDN CLI
keywords:
- hasura
Expand All @@ -20,6 +20,8 @@ Perform transformations on your Hasura project directory

## Available operations

- [ddn codemod configure-header-forwarding](/reference/cli/commands/ddn_codemod_configure-header-forwarding) - Configure
headers to be forwarded to your connector
- [ddn codemod fix-traces-env-var](/reference/cli/commands/ddn_codemod_fix-traces-env-var) - Fix env var used for
configuring traces for connectors
- [ddn codemod rename-graphql-prefixes](/reference/cli/commands/ddn_codemod_rename-graphql-prefixes) - Rename GraphQL
Expand All @@ -30,6 +32,8 @@ Perform transformations on your Hasura project directory
Upgrade GraphqlConfig to support aggregates
- [ddn codemod upgrade-graphqlconfig-subscriptions](/reference/cli/commands/ddn_codemod_upgrade-graphqlconfig-subscriptions) -
Upgrade GraphqlConfig to support subscriptions
- [ddn codemod upgrade-model-v1-to-v2](/reference/cli/commands/ddn_codemod_upgrade-model-v1-to-v2) - Upgrade model from
"version" "v1" to "v2" in metadata
- [ddn codemod upgrade-object-boolean-expression-types](/reference/cli/commands/ddn_codemod_upgrade-object-boolean-expression-types) -
Upgrade object boolean expression types metadata
- [ddn codemod upgrade-project-config-v2-to-v3](/reference/cli/commands/ddn_codemod_upgrade-project-config-v2-to-v3) -
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: ddn codemod configure-header-forwarding
sidebar_position: 8
sidebar_position: 9
description: Configure headers to be forwarded to your connector using the DDN CLI
keywords:
- hasura
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: ddn codemod fix-traces-env-var
sidebar_position: 9
sidebar_position: 11
description: Fix env var used for configuring traces for connectors using the DDN CLI
keywords:
- hasura
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: ddn codemod rename-graphql-prefixes
sidebar_position: 10
sidebar_position: 12
description: Rename GraphQL root field and type name prefixes in metadata using the DDN CLI
keywords:
- hasura
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: ddn codemod upgrade-context-v2-to-v3
sidebar_position: 11
sidebar_position: 13
description: Upgrade project's context config from v2 to v3 using the DDN CLI
keywords:
- hasura
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: ddn codemod upgrade-graphqlconfig-aggregate
sidebar_position: 12
sidebar_position: 14
description: Upgrade GraphqlConfig to support aggregates using the DDN CLI
keywords:
- hasura
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: ddn codemod upgrade-graphqlconfig-subscriptions
sidebar_position: 13
sidebar_position: 15
description: Upgrade GraphqlConfig to support subscriptions using the DDN CLI
keywords:
- hasura
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: ddn codemod upgrade-model-v1-to-v2
sidebar_position: 15
sidebar_position: 16
description: Upgrade model from "version" "v1" to "v2" in metadata using the DDN CLI
keywords:
- hasura
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: ddn codemod upgrade-object-boolean-expression-types
sidebar_position: 14
sidebar_position: 17
description: Upgrade object boolean expression types metadata using the DDN CLI
keywords:
- hasura
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: ddn codemod upgrade-project-config-v2-to-v3
sidebar_position: 15
sidebar_position: 18
description: Upgrade project directory from version v2 to v3 using the DDN CLI
keywords:
- hasura
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: ddn codemod upgrade-supergraph-config-v1-to-v2
sidebar_position: 16
sidebar_position: 19
description: Upgrade all Supergraph config files at the root of the project directory from v1 to v2 using the DDN CLI
keywords:
- hasura
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/cli/commands/ddn_command.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: ddn command
sidebar_position: 17
sidebar_position: 20
description: Perform Command related operations using the DDN CLI
keywords:
- hasura
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/cli/commands/ddn_command_add.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: ddn command add
sidebar_position: 18
sidebar_position: 21
description: Add new Commands to the local metadata using the DDN CLI
keywords:
- hasura
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/cli/commands/ddn_command_list.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: ddn command list
sidebar_position: 19
sidebar_position: 22
description:
Lists details about the functions/procedures of DataConnectorLink, and their corresponding Commands using the DDN CLI
keywords:
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/cli/commands/ddn_command_remove.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: ddn command remove
sidebar_position: 20
sidebar_position: 23
description: Removes Commands (and related metadata) in the local metadata using the DDN CLI
keywords:
- hasura
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/cli/commands/ddn_command_show.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: ddn command show
sidebar_position: 21
sidebar_position: 24
description: Show diff between the command and its corresponding ndc function/procedure using the DDN CLI
keywords:
- hasura
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/cli/commands/ddn_command_update.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: ddn command update
sidebar_position: 22
sidebar_position: 25
description: Update Commands in the local metadata using the DDN CLI
keywords:
- hasura
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/cli/commands/ddn_connector-link.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: ddn connector-link
sidebar_position: 35
sidebar_position: 41
description: Perform DataConnectorLink related operations using the DDN CLI
keywords:
- hasura
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: ddn connector-link add-resources
sidebar_position: 37
sidebar_position: 43
description: Add all models, commands and relationships from a DataConnectorLink's schema using the DDN CLI
keywords:
- hasura
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/cli/commands/ddn_connector-link_add.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: ddn connector-link add
sidebar_position: 36
sidebar_position: 42
description: Add a new DataConnectorLink to a Subgraph using the DDN CLI
keywords:
- hasura
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/cli/commands/ddn_connector-link_remove.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: ddn connector-link remove
sidebar_position: 38
sidebar_position: 44
description: Remove a DataConnectorLink from a Subgraph using the DDN CLI
keywords:
- hasura
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/cli/commands/ddn_connector-link_show.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: ddn connector-link show
sidebar_position: 39
sidebar_position: 45
description: Show DataConnectorLink details using the DDN CLI
keywords:
- hasura
Expand Down
6 changes: 3 additions & 3 deletions docs/reference/cli/commands/ddn_connector-link_update.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: ddn connector-link update
sidebar_position: 40
sidebar_position: 46
description: Fetch NDC details from the Connector and update the DataConnectorLink using the DDN CLI
keywords:
- hasura
Expand Down Expand Up @@ -28,14 +28,14 @@ ddn connector-link update <connector-link-name> [flags]
# Update the schema of a DataConnectorLink 'mydb' for Subgraph config 'app'
ddn connector-link update mydb --subgraph ./app/subgraph.yaml

# Update the schema of a DataConnectorLink 'mydb' and add all Models and Commands to the metadata for Subgraph config 'app'
# Update the schema of a DataConnectorLink 'mydb' and add all Models, Commands and Relationships to the metadata for Subgraph config 'app'
ddn connector-link update mydb --add-all-resources --subgraph ./app/subgraph.yaml
```

## Options

```sass
--add-all-resources Add all Models and Commands from the updated DataConnectorLink to the local metadata
--add-all-resources Add all Models, Commands and Relationships from the updated DataConnectorLink to the local metadata
--ci Disables the use of context
-c, --context string Name of the context to use. (default <current_context>)
-e, --env stringArray Environment variable, e.g. key=val. Can be repeated to provide multiple env vars
Expand Down
3 changes: 2 additions & 1 deletion docs/reference/cli/commands/ddn_connector.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: ddn connector
sidebar_position: 23
sidebar_position: 26
description: Perform Connector related operations using the DDN CLI
keywords:
- hasura
Expand All @@ -23,6 +23,7 @@ Perform Connector related operations
## Available operations

- [ddn connector build](/reference/cli/commands/ddn_connector_build) - Perform ConnectorBuild related operations
- [ddn connector env](/reference/cli/commands/ddn_connector_env) - Manage environment variables for Connectors
- [ddn connector init](/reference/cli/commands/ddn_connector_init) - Add a new Connector
- [ddn connector introspect](/reference/cli/commands/ddn_connector_introspect) - Introspect the Connector data source to
update the Connector configuration
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/cli/commands/ddn_connector_build.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: ddn connector build
sidebar_position: 24
sidebar_position: 27
description: Perform ConnectorBuild related operations using the DDN CLI
keywords:
- hasura
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/cli/commands/ddn_connector_build_create.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: ddn connector build create
sidebar_position: 25
sidebar_position: 28
description: Create a ConnectorBuild on Hasura DDN using the DDN CLI
keywords:
- hasura
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/cli/commands/ddn_connector_build_delete.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: ddn connector build delete
sidebar_position: 26
sidebar_position: 29
description: Delete a ConnectorBuild from a Project using the DDN CLI
keywords:
- hasura
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/cli/commands/ddn_connector_build_get.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: ddn connector build get
sidebar_position: 27
sidebar_position: 30
description: List ConnectorBuilds or get details of a specific one from Hasura DDN using the DDN CLI
keywords:
- hasura
Expand Down
Loading

0 comments on commit 272a575

Please sign in to comment.