Skip to content

Commit

Permalink
Chore: Update CLI docs (#883)
Browse files Browse the repository at this point in the history
Co-authored-by: hasura-bot <build@hasura.io>
Co-authored-by: Krushan Bauva <krushan@bauva.com>
  • Loading branch information
3 people authored Feb 6, 2025
1 parent 6b0c0e3 commit bb2139e
Show file tree
Hide file tree
Showing 29 changed files with 80 additions and 136 deletions.
5 changes: 3 additions & 2 deletions docs/reference/cli/commands/ddn.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ DDN Command Line Interface.

```
DDDDDDD\ DDDDDDD\ NN\ NN\
DDDDDDD\ DDDDDDD\ NN\ NN\
DD __DD\ DD __DD\ NNN\ NN |
DD | DD | DD | DD | NNNN\ NN |
DD | DD | DD | DD | NN NN\NN |
Expand Down Expand Up @@ -63,3 +63,4 @@ ddn [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)
```

8 changes: 3 additions & 5 deletions docs/reference/cli/commands/ddn_auth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@ 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 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
project's PromptQL secret key to STDOUT
- [ddn auth print-access-token](/reference/cli/commands/ddn_auth_print-access-token) - Prints the access token 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
7 changes: 4 additions & 3 deletions docs/reference/cli/commands/ddn_auth_login.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@ ddn auth login [flags]
ddn auth login

# Login with Personal Access Token
ddn auth login --pat <your-personal-access-token>
ddn auth login --access-token <your-access-token>
```

## Options

```sass
-h, --help help for login
--pat string Personal Access token [env: HASURA_DDN_PAT]
--access-token string The Personal Access Token or Service Account Token [env: HASURA_DDN_ACCESS_TOKEN]
-h, --help help for login
--pat string Personal Access token [env: HASURA_DDN_PAT] (DEPRECATED: use --access-token instead)
```

## Options inherited from parent operations
Expand Down
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
---
sidebar_label: ddn auth print-pat
sidebar_label: ddn auth print-access-token
sidebar_position: 6
description: Prints the PAT to STDOUT using the DDN CLI
description: Prints the access token to STDOUT using the DDN CLI
keywords:
- hasura
- DDN
- docs
- CLI
- ddn auth print-pat
- ddn auth print-access-token
---

# DDN CLI: ddn auth print-pat
# DDN CLI: ddn auth print-access-token

Prints the PAT to STDOUT.
Prints the access token to STDOUT.

## Synopsis

Prints the PAT to STDOUT
Prints the access token to STDOUT

```bash
ddn auth print-pat [flags]
ddn auth print-access-token [flags]
```

**Alias:** pp
**Alias:** pp, print-pat

## Examples

```bash
# Print the PAT as a string to STDOUT
ddn auth print-pat
# Print the access token as a string to STDOUT
ddn auth print-access-token

# Print PAT as a JSON to STDOUT
ddn auth print-pat --out json
# Print access token as a JSON to STDOUT
ddn auth print-access-token --out json
```

## Options

```sass
-h, --help help for print-pat
-h, --help help for print-access-token
```

## Options inherited from parent operations
Expand Down
30 changes: 10 additions & 20 deletions docs/reference/cli/commands/ddn_codemod.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,16 @@ 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
root field and type name prefixes in metadata
- [ddn codemod upgrade-context-v2-to-v3](/reference/cli/commands/ddn_codemod_upgrade-context-v2-to-v3) - Upgrade
project's context config from v2 to v3
- [ddn codemod upgrade-graphqlconfig-aggregate](/reference/cli/commands/ddn_codemod_upgrade-graphqlconfig-aggregate) -
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) -
Upgrade project directory from version v2 to v3
- [ddn codemod upgrade-supergraph-config-v1-to-v2](/reference/cli/commands/ddn_codemod_upgrade-supergraph-config-v1-to-v2) -
Upgrade all Supergraph config files at the root of the project directory from v1 to v2
- [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 root field and type name prefixes in metadata
- [ddn codemod upgrade-context-v2-to-v3](/reference/cli/commands/ddn_codemod_upgrade-context-v2-to-v3) - Upgrade project's context config from v2 to v3
- [ddn codemod upgrade-graphqlconfig-aggregate](/reference/cli/commands/ddn_codemod_upgrade-graphqlconfig-aggregate) - 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) - Upgrade project directory from version v2 to v3
- [ddn codemod upgrade-supergraph-config-v1-to-v2](/reference/cli/commands/ddn_codemod_upgrade-supergraph-config-v1-to-v2) - Upgrade all Supergraph config files at the root of the project directory from v1 to v2

## Options

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ Rename GraphQL root field and type name prefixes in metadata.

## Synopsis

Rename GraphQL root field and type name prefixes in metadata. The from prefix will be stripped if provided, and the new
prefix will be added. If the new prefix is already present, it will not be reapplied.
Rename GraphQL root field and type name prefixes in metadata. The from prefix will be stripped if provided, and the new prefix will be added. If the new prefix is already present, it will not be reapplied.

By default, subgraph.yaml is updated with the new prefixes.

Expand Down
9 changes: 3 additions & 6 deletions docs/reference/cli/commands/ddn_command.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,9 @@ Perform Command related operations
## Available operations

- [ddn command add](/reference/cli/commands/ddn_command_add) - Add new Commands to the local metadata
- [ddn command list](/reference/cli/commands/ddn_command_list) - Lists details about the functions/procedures of
DataConnectorLink, and their corresponding Commands
- [ddn command remove](/reference/cli/commands/ddn_command_remove) - Removes Commands (and related metadata) in the
local metadata
- [ddn command show](/reference/cli/commands/ddn_command_show) - Show diff between the command and its corresponding ndc
function/procedure
- [ddn command list](/reference/cli/commands/ddn_command_list) - Lists details about the functions/procedures of DataConnectorLink, and their corresponding Commands
- [ddn command remove](/reference/cli/commands/ddn_command_remove) - Removes Commands (and related metadata) in the local metadata
- [ddn command show](/reference/cli/commands/ddn_command_show) - Show diff between the command and its corresponding ndc function/procedure
- [ddn command update](/reference/cli/commands/ddn_command_update) - Update Commands in the local metadata

## Options
Expand Down
3 changes: 1 addition & 2 deletions docs/reference/cli/commands/ddn_command_list.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
sidebar_label: ddn command list
sidebar_position: 22
description:
Lists details about the functions/procedures of DataConnectorLink, and their corresponding Commands using the DDN CLI
description: Lists details about the functions/procedures of DataConnectorLink, and their corresponding Commands using the DDN CLI
keywords:
- hasura
- DDN
Expand Down
9 changes: 3 additions & 6 deletions docs/reference/cli/commands/ddn_connector-link.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,10 @@ Perform DataConnectorLink related operations
## Available operations

- [ddn connector-link add](/reference/cli/commands/ddn_connector-link_add) - Add a new DataConnectorLink to a Subgraph
- [ddn connector-link add-resources](/reference/cli/commands/ddn_connector-link_add-resources) - Add all models,
commands and relationships from a DataConnectorLink's schema
- [ddn connector-link remove](/reference/cli/commands/ddn_connector-link_remove) - Remove a DataConnectorLink from a
Subgraph
- [ddn connector-link add-resources](/reference/cli/commands/ddn_connector-link_add-resources) - Add all models, commands and relationships from a DataConnectorLink's schema
- [ddn connector-link remove](/reference/cli/commands/ddn_connector-link_remove) - Remove a DataConnectorLink from a Subgraph
- [ddn connector-link show](/reference/cli/commands/ddn_connector-link_show) - Show DataConnectorLink details
- [ddn connector-link update](/reference/cli/commands/ddn_connector-link_update) - Fetch NDC details from the Connector
and update the DataConnectorLink
- [ddn connector-link update](/reference/cli/commands/ddn_connector-link_update) - Fetch NDC details from the Connector and update the DataConnectorLink

## Options

Expand Down
9 changes: 3 additions & 6 deletions docs/reference/cli/commands/ddn_connector.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,10 @@ Perform Connector related 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
- [ddn connector introspect](/reference/cli/commands/ddn_connector_introspect) - Introspect the Connector data source to update the Connector configuration
- [ddn connector plugin](/reference/cli/commands/ddn_connector_plugin) - Run a subcommand from a Connector plugin
- [ddn connector remove](/reference/cli/commands/ddn_connector_remove) - Remove a Connector, its corresponding
DataConnectorLink and all its associated metadata objects
- [ddn connector setenv](/reference/cli/commands/ddn_connector_setenv) - Run specified command with environment
variables set
- [ddn connector remove](/reference/cli/commands/ddn_connector_remove) - Remove a Connector, its corresponding DataConnectorLink and all its associated metadata objects
- [ddn connector setenv](/reference/cli/commands/ddn_connector_setenv) - Run specified command with environment variables set
- [ddn connector show-resources](/reference/cli/commands/ddn_connector_show-resources) - Show resources of a Connector

## Options
Expand Down
12 changes: 4 additions & 8 deletions docs/reference/cli/commands/ddn_connector_build.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,10 @@ Perform ConnectorBuild related operations

## Available operations

- [ddn connector build create](/reference/cli/commands/ddn_connector_build_create) - Create a ConnectorBuild on Hasura
DDN
- [ddn connector build delete](/reference/cli/commands/ddn_connector_build_delete) - Delete a ConnectorBuild from a
Project
- [ddn connector build get](/reference/cli/commands/ddn_connector_build_get) - List ConnectorBuilds or get details of a
specific one from Hasura DDN
- [ddn connector build logs](/reference/cli/commands/ddn_connector_build_logs) - Get logs of a ConnectorBuild from
Hasura DDN
- [ddn connector build create](/reference/cli/commands/ddn_connector_build_create) - Create a ConnectorBuild on Hasura DDN
- [ddn connector build delete](/reference/cli/commands/ddn_connector_build_delete) - Delete a ConnectorBuild from a Project
- [ddn connector build get](/reference/cli/commands/ddn_connector_build_get) - List ConnectorBuilds or get details of a specific one from Hasura DDN
- [ddn connector build logs](/reference/cli/commands/ddn_connector_build_logs) - Get logs of a ConnectorBuild from Hasura DDN

## Options

Expand Down
3 changes: 1 addition & 2 deletions docs/reference/cli/commands/ddn_connector_env.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ Manage environment variables for Connectors

## Available operations

- [ddn connector env add](/reference/cli/commands/ddn_connector_env_add) - Add environment variables and its
corresponding mapping to a Connector
- [ddn connector env add](/reference/cli/commands/ddn_connector_env_add) - Add environment variables and its corresponding mapping to a Connector

## Options

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/cli/commands/ddn_connector_init.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ddn connector init [connector-name] --hub-connector <connector-type> [flags]
ddn connector init mydb --dir ./connector --hub-connector hasura/postgres

# Initialize a NodeJS Connector "mylambda" in the Subgraph "app" on port 8765
ddn connector init mylambda --subgraph ./app/subgraph.yaml --hub-connector hasura/nodejs --configure-port 8765
ddn connector init mylambda --subgraph ./app/subgraph.yaml --hub-connector hasura/nodejs --configure-port 8765
```

## Options
Expand Down
3 changes: 1 addition & 2 deletions docs/reference/cli/commands/ddn_connector_remove.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
sidebar_label: ddn connector remove
sidebar_position: 37
description:
Remove a Connector, its corresponding DataConnectorLink and all its associated metadata objects using the DDN CLI
description: Remove a Connector, its corresponding DataConnectorLink and all its associated metadata objects using the DDN CLI
keywords:
- hasura
- DDN
Expand Down
6 changes: 2 additions & 4 deletions docs/reference/cli/commands/ddn_context.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@ Manage default value of keys to be used in DDN CLI commands

- [ddn context create-context](/reference/cli/commands/ddn_context_create-context) - Create a new context
- [ddn context get](/reference/cli/commands/ddn_context_get) - Get the value of a key in the context
- [ddn context get-context](/reference/cli/commands/ddn_context_get-context) - List contexts or get details of a
specific context
- [ddn context get-current-context](/reference/cli/commands/ddn_context_get-current-context) - Get name and contents of
current context
- [ddn context get-context](/reference/cli/commands/ddn_context_get-context) - List contexts or get details of a specific context
- [ddn context get-current-context](/reference/cli/commands/ddn_context_get-current-context) - Get name and contents of current context
- [ddn context set](/reference/cli/commands/ddn_context_set) - Set the value of a key in the context
- [ddn context set-current-context](/reference/cli/commands/ddn_context_set-current-context) - Set the current context
- [ddn context unset](/reference/cli/commands/ddn_context_unset) - Unset the value of a key in the context
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/cli/commands/ddn_context_unset.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Unset the value of a key in the context.
Unset the value of a key in the context

```bash
ddn context unset <key> (Allowed keys: selfHostedDataPlane, project, supergraph, subgraph, localEnvFile, cloudEnvFile) [flags]
ddn context unset <key> (Allowed keys: localEnvFile, cloudEnvFile, selfHostedDataPlane, project, supergraph, subgraph) [flags]
```

## Examples
Expand Down
3 changes: 1 addition & 2 deletions docs/reference/cli/commands/ddn_doctor.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ Check if the dependencies of DDN CLI are present.

## Synopsis

Check if the dependencies (Docker and Docker Compose) of DDN CLI are installed, are of the required version and if they
are running.
Check if the dependencies (Docker and Docker Compose) of DDN CLI are installed, are of the required version and if they are running.

```bash
ddn doctor [flags]
Expand Down
9 changes: 3 additions & 6 deletions docs/reference/cli/commands/ddn_model.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,9 @@ Perform Model related operations
## Available operations

- [ddn model add](/reference/cli/commands/ddn_model_add) - Add new Models to the local metadata
- [ddn model list](/reference/cli/commands/ddn_model_list) - Lists details about the collections of DataConnectorLink,
and their corresponding Models
- [ddn model remove](/reference/cli/commands/ddn_model_remove) - Removes Models (and related metadata) in the local
metadata
- [ddn model show](/reference/cli/commands/ddn_model_show) - Show diff between the model and its corresponding ndc
collection
- [ddn model list](/reference/cli/commands/ddn_model_list) - Lists details about the collections of DataConnectorLink, and their corresponding Models
- [ddn model remove](/reference/cli/commands/ddn_model_remove) - Removes Models (and related metadata) in the local metadata
- [ddn model show](/reference/cli/commands/ddn_model_show) - Show diff between the model and its corresponding ndc collection
- [ddn model update](/reference/cli/commands/ddn_model_update) - Update Models in the local metadata

## Options
Expand Down
6 changes: 2 additions & 4 deletions docs/reference/cli/commands/ddn_plugins.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ Manage plugins for the CLI.

## Synopsis

The functionality of the CLI can be extended by using plugins. For a list of all available plugins, run
`ddn plugins list`, or visit this repository: https://github.com/hasura/cli-plugins-index.
The functionality of the CLI can be extended by using plugins. For a list of all available plugins, run ``ddn plugins list``, or visit this repository: https://github.com/hasura/cli-plugins-index.

If you're interested in contributing, please open a PR against this repo.

Expand All @@ -26,8 +25,7 @@ If you're interested in contributing, please open a PR against this repo.
## Available operations

- [ddn plugins install](/reference/cli/commands/ddn_plugins_install) - Install a plugin from the index
- [ddn plugins list](/reference/cli/commands/ddn_plugins_list) - List all available plugins with index, versions and
installation status
- [ddn plugins list](/reference/cli/commands/ddn_plugins_list) - List all available plugins with index, versions and installation status
- [ddn plugins uninstall](/reference/cli/commands/ddn_plugins_uninstall) - Uninstall a plugin
- [ddn plugins upgrade](/reference/cli/commands/ddn_plugins_upgrade) - Upgrade a plugin to a newer version

Expand Down
3 changes: 1 addition & 2 deletions docs/reference/cli/commands/ddn_plugins_install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ Install a plugin from the index.

## Synopsis

To install plugins that extend the functionality of the DDN CLI, you can use the install command. This command will
install the plugin from the index and add it to your configuration file.
To install plugins that extend the functionality of the DDN CLI, you can use the install command. This command will install the plugin from the index and add it to your configuration file.

```bash
ddn plugins install <name> [flags]
Expand Down
3 changes: 1 addition & 2 deletions docs/reference/cli/commands/ddn_plugins_list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ List all available plugins with index, versions and installation status.

## Synopsis

Run the plugins list command to see a list of all the available plugins which extend the functionality of the CLI, their
versions and installation status.
Run the plugins list command to see a list of all the available plugins which extend the functionality of the CLI, their versions and installation status.

```bash
ddn plugins list [flags]
Expand Down
3 changes: 1 addition & 2 deletions docs/reference/cli/commands/ddn_plugins_uninstall.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ Uninstall a plugin.

## Synopsis

To uninstall a plugin, run the uninstall command with the name of the plugin as an argument. If unsure of the plugin's
name, you can run the `ddn plugins list` command to see a list of all the available plugins.
To uninstall a plugin, run the uninstall command with the name of the plugin as an argument. If unsure of the plugin's name, you can run the `ddn plugins list` command to see a list of all the available plugins.

```bash
ddn plugins uninstall <plugin-name> [flags]
Expand Down
Loading

0 comments on commit bb2139e

Please sign in to comment.