Skip to content

Add SDKs & CLI documentation page#305

Merged
pengying merged 4 commits intomainfrom
peng-mintlify-sdks
Mar 27, 2026
Merged

Add SDKs & CLI documentation page#305
pengying merged 4 commits intomainfrom
peng-mintlify-sdks

Conversation

@pengying
Copy link
Copy Markdown
Contributor

Summary

  • Adds an SDKs & CLI page to the API Reference tab linking to the Kotlin SDK and JS/TS SDK, plus CLI documentation with command reference and an end-to-end example
  • Creates reusable snippets (snippets/sdks.mdx, snippets/cli.mdx) so the content can be included on any page
  • Fixes a mermaid diagram parse error in README.md (optalt to support else)

Test plan

  • Run make lint and confirm no new warnings
  • Run mint dev and verify the SDKs & CLI page renders under API Reference
  • Confirm SDK cards link to the correct GitHub repos
  • Confirm CLI example code blocks render correctly (no blank boxes)

🤖 Generated with Claude Code

- Add API Reference page for SDKs (Kotlin, JS/TS) and CLI documentation
- Create reusable snippets for SDKs and CLI so they can be included anywhere
- Add CLI command reference, configuration guide, and end-to-end example
- Fix mermaid diagram parse error in README (opt → alt for else support)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
grid-flow-builder Ready Ready Preview, Comment Mar 27, 2026 10:21pm

Request Review

@mintlify
Copy link
Copy Markdown

mintlify bot commented Mar 27, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Grid 🟢 Ready View Preview Mar 27, 2026, 10:01 PM

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 27, 2026

Greptile Summary

This PR adds a new SDKs & CLI page to the API Reference section, introducing reusable snippets (snippets/sdks.mdx, snippets/cli.mdx) for SDK cards and CLI documentation, and fixes a Mermaid optalt parse error in README.md.

All feedback from the previous review round has been addressed:

  • ✅ Prerequisites and git clone step added to installation
  • ✅ End-to-end example converted to <Steps> component
  • grid transactions get added to the Commands reference table
  • ✅ Kotlin card now uses the custom kotlin.svg icon instead of icon=\"java\"

One remaining issue: Step 5 of the end-to-end example calls grid transactions get <transactionId>, but no prior step in the flow produces or surfaces a transaction ID. Users following the guide will be left without a value to substitute at that step.

Confidence Score: 4/5

Safe to merge once the missing transactionId source in step 5 is clarified for users.

All prior review concerns are resolved and the overall structure is solid. One P1 documentation gap remains: the end-to-end example leaves users stranded at step 5 with no guidance on where to obtain the <transactionId>. This will break the tutorial for anyone following it literally and should be fixed before merge.

mintlify/snippets/cli.mdx — step 5 of the end-to-end example needs a transactionId source.

Important Files Changed

Filename Overview
mintlify/snippets/cli.mdx New CLI snippet with installation, command reference, and end-to-end example. Previous review concerns (Steps component, prerequisites, missing command) are resolved, but step 5 references a <transactionId> that no prior step produces.
mintlify/snippets/sdks.mdx New SDK cards snippet using CardGroup with JS/TS and Kotlin links; Kotlin now uses the custom SVG icon added in this PR (addressing the prior java-icon comment).
mintlify/api-reference/sdks.mdx New API reference page composing the two snippets; valid frontmatter, existing code.svg icon, and correct og:image field.
mintlify/docs.json Appends api-reference/sdks to the API Reference navigation group — minimal, correct change.
mintlify/images/icons/kotlin.svg New custom Kotlin icon SVG using a diamond/arrow path that represents the Kotlin logo shape.
README.md Fixes mermaid parse error by replacing opt (no else support) with alt (supports else branches) — correct fix.

Sequence Diagram

sequenceDiagram
    participant User
    participant CLI as Grid CLI
    participant API as Grid API
    participant Sandbox

    User->>CLI: grid customers create ...
    CLI->>API: POST /customers
    API-->>CLI: customerId
    CLI-->>User: customerId

    User->>CLI: grid accounts external create --customer-id
    CLI->>API: POST /accounts/external
    API-->>CLI: externalAccountId
    CLI-->>User: externalAccountId

    User->>CLI: grid quotes create --source-customer --dest-account
    CLI->>API: POST /quotes
    API-->>CLI: quoteId
    CLI-->>User: quoteId

    User->>CLI: grid sandbox send --quote-id
    CLI->>Sandbox: Simulate USDC deposit
    Sandbox-->>CLI: (transactionId?)
    CLI-->>User: (transactionId not surfaced)

    Note over User,CLI: ⚠️ transactionId source unclear
    User->>CLI: grid transactions get transactionId
    CLI->>API: GET /transactions/{id}
    API-->>CLI: transaction status
    CLI-->>User: status
Loading
Prompt To Fix All With AI
This is a comment left during a code review.
Path: mintlify/snippets/cli.mdx
Line: 113-116

Comment:
**`<transactionId>` placeholder has no source in the example flow**

Step 5 tells the user to run `grid transactions get <transactionId>`, but no earlier step produces or surfaces a transaction ID. The flow goes: customer → external account → quote → sandbox send — none of these visibly emit a `transactionId`.

A user following this guide literally will be stuck at step 5 with no `<transactionId>` to substitute. Consider one of:

1. Add an explicit sub-step after step 4 showing how to retrieve the ID, e.g.:

```suggestion
<Step title="Check transaction status">
```bash
# First, find the transaction ID from the list
grid transactions list

# Then fetch the details
grid transactions get <transactionId>
```
</Step>
```

2. Or note that `grid sandbox send` returns the transactionId in its output and show the expected output snippet so users know where to copy it from.

How can I resolve this? If you propose a fix, please make it concise.

Reviews (3): Last reviewed commit: "Add custom Kotlin SVG icon for SDK card" | Re-trigger Greptile

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add `grid transactions get` to commands table
- Convert example to use `<Steps>` component
- Change Kotlin card icon from `java` to `kotlin`

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor Author

pengying commented Mar 27, 2026

Merge activity

  • Mar 27, 10:31 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Mar 27, 10:31 PM UTC: @pengying merged this pull request with Graphite.

@pengying pengying merged commit 008bf83 into main Mar 27, 2026
10 checks passed
@pengying pengying deleted the peng-mintlify-sdks branch March 27, 2026 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants