Skip to content

Commit

Permalink
Update Quickstart with Windows Installer and ddn doctor command (#705)
Browse files Browse the repository at this point in the history
Co-authored-by: Sean Park-Ross <[email protected]>
  • Loading branch information
SandeepSamba and seanparkross authored Oct 18, 2024
1 parent dcf0b48 commit 2aaf9ea
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 53 deletions.
55 changes: 5 additions & 50 deletions docs/_install-the-cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import CodeBlock from "@theme/CodeBlock";
import Version from "@site/src/components/CliVersion";
import Admonition from "@theme/Admonition";

<Version />

Expand All @@ -18,57 +19,11 @@ Simply run the installer script in your terminal:
</TabItem>

<TabItem value="windows" label="Windows">
Download the latest `cli-ddn-windows-amd64.exe` binary and run it.

<CodeBlock language="bash">
{`curl.exe -L https://graphql-engine-cdn.hasura.io/ddn/cli/${
props.revision || "v4"
}/latest/cli-ddn-windows-amd64.exe -o ddn.exe`}
</CodeBlock>

:::info Unrecognized application warning

In Windows, if you get an "Unrecognized application" warning, click "Run anyway".

:::

Additionally, you'll need to add this executable to your system's PATH:

**Step 1: Locate the and rename the executable:**

Find the full path to the directory containing the executable. For
example, if the executable is located in `C:\Program Files\cli-ddn-windows-amd64.exe`, note this path. Also, rename it
to `ddn` for ease when writing commands later on.

**Step 2: Open System Properties:**

- Press `Win + X` and select **System**.
- Click on **Advanced system settings** on the left side.
- In the System Properties window, click on the **Environment Variables** button.
<br />

**Step 3: Edit the PATH Variable:**

- In the Environment Variables window, find the **System variables** section.
- Scroll down and select the **Path** variable, then click **Edit**.
- In the Edit Environment Variable window, click **New** and paste the path to the directory containing your executable
(e.g., `C:\Program Files\ddn.exe`).
<br />

**Step 4: Save Your Changes:**

- Click **OK** to close the Edit Environment Variable window.
- Click **OK** to close the Environment Variables window.
- Click **OK** to close the System Properties window.
- Download the latest <a href={`https://graphql-engine-cdn.hasura.io/ddn/cli/${props.revision || "v4"}/latest/DDN_CLI_Setup.exe`}>DDN CLI installer for Windows.</a>
- Run the `DDN_CLI_Setup.exe` installer file and follow the instructions. This will only take a minute.
- By default, the DDN CLI is installed under `C:\Users\{Username}\AppData\Local\Programs\DDN_CLI`
- The DDN CLI is added to your `%PATH%` environment variable so that you can use the `ddn` command from your terminal.
<br />

**Step 5: Verify the Changes:**

Open a new Command Prompt or PowerShell window and run the following command.

```bash title="From any directory, run:"
ddn
```

</TabItem>
</Tabs>
11 changes: 9 additions & 2 deletions docs/getting-started/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ is_guide: true

import Step from "@site/src/components/CodeStep";
import InstallTheCli from "@site/docs/_install-the-cli.mdx";
import CodeBlock from "@theme/CodeBlock";

# Quickstart a Supergraph API

Expand Down Expand Up @@ -44,8 +45,14 @@ import InstallTheCli from "@site/docs/_install-the-cli.mdx";

2. **Install [Docker](https://docs.docker.com/engine/install/)** (needed for local development)

The Docker based workflow helps you iterate and develop locally without deploying any changes to Hasura DDN, making
the development experience faster and your feedback loops shorter. **You'll need Docker Compose `v2.27.1` or later.**
The Docker based workflow helps you iterate and develop locally without deploying any changes to Hasura DDN, making
the development experience faster and your feedback loops shorter. **You'll need Docker Compose `v2.27.1` or later.**

3. **Validate the installation**

You can verify that the DDN CLI is installed correctly by running:

<CodeBlock language="bash">{`ddn doctor`}</CodeBlock>

<Step
id="login"
Expand Down
2 changes: 1 addition & 1 deletion src/components/CliVersion/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const Index: React.FC = () => {
<p>
{/*You can download the CLI binary below. The latest version of the CLI is <kbd>{version}</kbd>. Please follow the*/}
{/*instructions for your system.*/}
You can download the CLI binary below. Please follow the instructions for your system.
Download the CLI binary below. Please follow the instructions for your system.
</p>
</div>
);
Expand Down

0 comments on commit 2aaf9ea

Please sign in to comment.