Skip to content
This repository was archived by the owner on Mar 17, 2026. It is now read-only.

docs: fix issues with layout and content found during review#53

Merged
jyecusch merged 6 commits intomainfrom
docs-updates
Sep 9, 2025
Merged

docs: fix issues with layout and content found during review#53
jyecusch merged 6 commits intomainfrom
docs-updates

Conversation

@jyecusch
Copy link
Copy Markdown
Member

@jyecusch jyecusch commented Sep 8, 2025

wait for #49

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Sep 8, 2025

Walkthrough

This PR updates Suga documentation across the docs site. Changes include: new suga access-token docs with a refresh flag; expanded and restructured build docs describing build stages and .suga output; revised dev, edit, init, and new command texts; generate updated for multi-language flags and outputs; installation adds onboarding, Early Access note, and Web UI section; introduction command list reorganized and suga version added; login/logout expanded with flow descriptions; templates list revised; CLI installation added to Getting Started nav; several guide Step icons removed; support email/links updated.

Suggested labels

documentation

Suggested reviewers

  • tjholm
  • HomelessDinosaur
  • raksiv

Pre-merge checks (1 passed, 1 warning, 1 inconclusive)

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The current description “wait for https://github.com/nitrictech/suga/pull/49” is off-topic and does not describe any of the documentation changes included in this PR. Please update the description to summarize the PR’s scope, for example: “This PR restructures and enriches the Suga CLI documentation and guides, adding new options, examples, and sections across multiple commands and updating navigation links.”
Title Check ❓ Inconclusive The title “docs: fix issues with layout and content found during review” is related to the documentation changes but is overly generic and does not convey the primary scope or highlight the main updates introduced across many CLI and guide pages. Consider renaming to clearly reflect the core update, such as “docs(cli): restructure and enhance command reference and guides” to give reviewers a concise summary of the main changes.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eae82aa and 816c2be.

📒 Files selected for processing (2)
  • docs/cli/installation.mdx (3 hunks)
  • docs/cli/login.mdx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • docs/cli/login.mdx
  • docs/cli/installation.mdx

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jyecusch jyecusch force-pushed the docs-updates branch 2 times, most recently from f319704 to 514513c Compare September 8, 2025 06:13
@jyecusch jyecusch marked this pull request as ready for review September 9, 2025 00:42
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (36)
docs/guides/terraform-backend-config.mdx (5)

42-47: Step icon removal: looks good; consider removing code-block icon for consistency

If the intent is a cleaner, icon-less Steps layout, drop the code-block icon here too.

Apply:

-```bash title="Generate Terraform Stack" icon="hammer"
+```bash title="Generate Terraform Stack"

51-53: Also remove code-block icon for consistency (optional)

Keeps presentation uniform with icon-less Steps.

-```bash title="Create Backend File" icon="file-plus"
+```bash title="Create Backend File"

119-128: Step icon removal: also strip terminal/rocket icons in code blocks (optional)

Prevents mixed icon usage inside an icon-less Steps block.

-```bash title="Initialize Terraform" icon="terminal"
+```bash title="Initialize Terraform"
@@
-```bash title="Deploy Infrastructure" icon="rocket"
+```bash title="Deploy Infrastructure"

131-133: Nit: capitalize CDKTF

Minor terminology polish.

-  Only the cdktf files are managed by Suga. You can safely add custom `.tf` files to the stack directory to extend the configuration.
+  Only the CDKTF-generated files are managed by Suga. You can safely add custom `.tf` files to the stack directory to extend the configuration.

139-146: Clarify workspace commands (optional)

terraform workspace new already switches to the new workspace. Suggest simplification to avoid confusion.

-# Switch to production environment
-terraform workspace new production
-terraform workspace select production
+# Create and switch to production environment
+terraform workspace new production
+# (Later) Switch to an existing workspace
+# terraform workspace select production
docs/guides/local-database-setup.mdx (4)

13-58: Step icon removal: mirror in nested code blocks (optional)

Drop code-block icons to keep a uniform, minimal layout.

-```yaml title="docker-compose.yml" icon="docker"
+```yaml title="docker-compose.yml"
@@
-```bash title=".env" icon="shield-check"
+```bash title=".env"
@@
-```bash title="Start Database" icon="play"
+```bash title="Start Database"
@@
-```bash title="Verify Database" icon="check-circle"
+```bash title="Verify Database"

60-89: Consistency: remove code-block icons within this Step (optional)

Matches the icon-less Step header.

-```bash title="Open Suga Editor" icon="edit"
+```bash title="Open Suga Editor"
@@
-```yaml title="suga.yaml" icon="file-code"
+```yaml title="suga.yaml"

91-122: Consistency: remove code-block icons (optional)

Keep visuals consistent across Steps.

-```sql title="init.sql" icon="database"
+```sql title="init.sql"
@@
-```bash title="Reset Database with Schema" icon="refresh-cw"
+```bash title="Reset Database with Schema"

124-141: Consistency: remove code-block icons (optional)

Same rationale here.

-```bash title="Test Direct Connection" icon="database"
+```bash title="Test Direct Connection"
@@
-```bash title="Start Your Application" icon="rocket"
+```bash title="Start Your Application"
docs/cli/templates.mdx (1)

19-22: Align example with surrounding copy

The page says “Shows available templates with descriptions,” but the example list has no descriptions. Either add short descriptions per template or update the sentence above to remove that claim.

You could revise the earlier line (outside this hunk) to:

Shows available templates to help you choose the right starting point.
docs/cli/edit.mdx (1)

6-6: Use imperative voice for command docs

Change “Edits an application…” to “Edit an application…” for consistency with other CLI pages.

-Edits an application using the suga.yaml application spec and referenced platform.
+Edit an application using the suga.yaml application spec and referenced platform.
docs/cli/access-token.mdx (2)

3-3: Minor grammar tweak

Add an article for readability.

-description: 'Get access token'
+description: 'Get an access token'

14-17: Show refresh usage and caution about output

Add an example with -r and a brief note to avoid leaking tokens in logs.

Example snippet (outside this hunk):

suga access-token -r
# Retrieves a new token, bypassing cache

And a short note:
“Note: Treat tokens as secrets; avoid committing or logging them.”

docs/cli/login.mdx (3)

3-6: Use “Log in” (verb) consistently

Prefer “Log in to Suga” and “Log in to the Suga CLI” for consistency with standard usage.

-description: 'Login to Suga'
+description: 'Log in to Suga'
...
-Login to the Suga CLI.
+Log in to the Suga CLI.

12-19: Clarify storage details (optional)

If possible, specify where credentials are stored (path or OS-specific location) and that they’re encrypted, or link to a security note.


27-29: Fix verb forms in the note

Use “log in”/“log out” as verbs.

-You'll need to login before using most Suga CLI commands. Your session will remain active until you explicitly logout or the session expires.
+You'll need to log in before using most Suga CLI commands. Your session will remain active until you explicitly log out or the session expires.
docs/cli/installation.mdx (4)

8-15: Surface the login step immediately after install.

Early Access requires auth. Add an explicit “Authenticate” step right after Verify to reduce confusion.

 ## Verify Installation

 ```bash
 suga version

+## Authenticate
+
+bash +suga login +


---

`31-33`: **Add a short security note for curl | sh installs.**

A one-liner reminding users to review the script or verify checksums would be helpful.


```diff
   <Tab title="Linux">
     ```bash
     curl -sSL https://addsuga.com/install.sh | sh
     ```
   </Tab>
@@
   <Tab title="Linux">
     ```bash
     curl -sSL https://addsuga.com/install.sh | sh
     ```
   </Tab>
+  <Note>
+    For security, review the install script before running or verify its checksum.
+  </Note>

Also applies to: 58-59


39-41: Confirm deprecation/alias of --version.

If suga --version still works, consider noting both forms for discoverability; if deprecated, add a brief note.


63-80: Clarify Web UI auth and behavior of suga edit.

State that opening the editor may prompt for login (Early Access) and that the command opens a browser but continues using the local CLI context.

 ## Web UI
@@
-Access it through the CLI:
+Access it through the CLI (you may be prompted to log in):
@@
-This opens the visual editor in your browser and connects it to your local CLI, with the full platform features available at [app.addsuga.com](https://app.addsuga.com).
+This opens the visual editor in your browser and connects it to your local CLI session. Full platform features are available at [app.addsuga.com](https://app.addsuga.com).
docs/cli/init.mdx (2)

6-15: Note idempotency/overwrites and prerequisites.

Briefly state whether running init overwrites an existing suga.yaml (or requires --force) and whether login is required during Early Access.


16-24: Cross-link the suga.yaml reference.

If a dedicated page exists, link to it to help users understand what gets created.

-This creates the necessary Suga configuration files (`suga.yaml`) to transform your existing application into a Suga project, allowing you to define and manage cloud infrastructure alongside your code.
+This creates the necessary Suga configuration files (`suga.yaml`) to transform your existing application into a Suga project, allowing you to define and manage cloud infrastructure alongside your code. See the [`suga.yaml` reference](/reference/suga-yaml) for details.
docs/cli/new.mdx (3)

12-19: Call out template discovery.

Since the page emphasizes templates, add a one-liner pointing users to list templates with suga templates.

 The command creates a new directory with your project name, including:
@@
 - Example infrastructure setup
+
+List available templates with:
+```bash
+suga templates
+```

32-38: Add missing JavaScript example for completeness.

JS is supported per generate docs; include it here too.

 # Create project with default template
 suga new my-app
@@
 # Force overwrite existing directory
 suga new my-app --force
+
+# (Optional) Create with a JavaScript template interactively
+# suga templates   # choose a JS template
+# suga new my-js-app

40-42: Mirror the “Alternative” cross-link phrasing used in init.mdx.

Keep the two pages symmetric so users can quickly choose the right path.

docs/cli/logout.mdx (2)

12-19: Clarify server-side vs local revocation.

State whether tokens/sessions are invalidated server-side or only removed locally, and any impact on active Web UI sessions.


26-28: Consistency: “log in” vs “login.”

If following a style guide, prefer “log in” (verb) and keep “login” for the command/name. Otherwise, standardize across the docs.

docs/cli/build.mdx (3)

12-20: Be explicit about what “Generates Terraform” includes.

Does build also build/push container images, or only generate infra code? Add a line clarifying artifacts and side effects.


21-28: Tighten Output Structure wording and align with actual directory shape.

Confirm the exact on-disk path and whether images are produced locally or referenced by tag. If the provider list is dynamic, avoid hardcoding.

-The build process creates a `.suga/stacks/` directory containing:
-- **Terraform configuration** - Cloud provider resources (AWS, GCP, Azure)
-- **Application containers** - Services, built into Docker Containers ready for deployment  
+The build process creates a `.suga/stacks/` directory (per stack) containing:
+- **Terraform configuration** - Cloud provider resources (e.g., AWS, GCP, Azure)
+- **Application containers** - Service image definitions (and, if applicable, built images/tags)

31-35: Add cross-links and flags for non-interactive builds.

If suga build accepts provider/region flags (for CI), document them and link to suga config for defaults.

docs/cli/generate.mdx (3)

14-19: State requirement when no language flags are provided.

Document whether at least one language flag is mandatory and what the default behavior is.


20-26: Document defaults for output paths and package names.

If omitted, where do clients get generated and what package/module names are used?


29-41: Add JavaScript example and an overwrite note.

JS is listed but not exemplified; include it. Also note whether generation overwrites existing files or requires a flag.

 ```bash
 # Generate TypeScript client
 suga generate --ts --ts-out ./client
@@
 # Generate Python client
 suga generate --python --python-out ./python-client
+
+# Generate JavaScript client
+suga generate --js --js-out ./js-client
@@
 # Generate multiple clients at once
 suga generate --ts --ts-out ./ts-client --go --go-out ./go-client --go-package-name suga

+

  • Generation may overwrite existing files in the output directory. Commit or back up changes before regenerating.
    +

</blockquote></details>
<details>
<summary>docs/cli/introduction.mdx (3)</summary><blockquote>

`26-42`: **Minor table polish and parity check.**

- “autocompletion” vs “autocomplete”: pick one globally.
- Ensure every listed command has a corresponding page (e.g., `team`, `access-token`) and that names/descriptions match CLI help.

---

`45-64`: **Include Access Token in “Team Authentication” card.**

Users often need both login and access-token; mention both for quicker discovery.


```diff
   <Card title="Team Authentication" icon="key" href="/cli/login">
-    Use `suga login` to connect to Suga Platform
+    Use `suga login` to connect to Suga Platform and `suga access-token` to retrieve tokens for tools/CI
   </Card>

12-22: Add login to Quick Start (Early Access).

Reflect the requirement introduced on the Installation page.

 ```bash
 # Install the CLI
 brew install nitrictech/tap/suga
 
+# Authenticate (Early Access)
+suga login
+
 # Create a new project
 suga new my-app
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2ef815f and eae82aa.

📒 Files selected for processing (17)
  • docs/cli/access-token.mdx (1 hunks)
  • docs/cli/build.mdx (1 hunks)
  • docs/cli/dev.mdx (1 hunks)
  • docs/cli/edit.mdx (2 hunks)
  • docs/cli/generate.mdx (1 hunks)
  • docs/cli/init.mdx (1 hunks)
  • docs/cli/installation.mdx (3 hunks)
  • docs/cli/introduction.mdx (1 hunks)
  • docs/cli/login.mdx (1 hunks)
  • docs/cli/logout.mdx (1 hunks)
  • docs/cli/new.mdx (1 hunks)
  • docs/cli/templates.mdx (1 hunks)
  • docs/docs.json (1 hunks)
  • docs/guides/local-database-setup.mdx (4 hunks)
  • docs/guides/overview.mdx (1 hunks)
  • docs/guides/terraform-backend-config.mdx (2 hunks)
  • docs/index.mdx (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-27T03:55:50.432Z
Learnt from: davemooreuws
PR: nitrictech/suga#29
File: docs/guides/terraform-backend-config.mdx:25-34
Timestamp: 2025-08-27T03:55:50.432Z
Learning: In the Suga project, the default directory for CDKTF synthesized output is `terraform/`, not `cdktf.out/`. The directory structure is terraform/stacks/<stack_name>/ containing the generated Terraform configurations.

Applied to files:

  • docs/guides/terraform-backend-config.mdx
🔇 Additional comments (9)
docs/guides/terraform-backend-config.mdx (1)

48-54: Path matches Suga’s CDKTF output

Using terraform/stacks/<stack_name>/ aligns with our recorded default output location. Nice.

docs/guides/overview.mdx (1)

44-44: Support email change looks good

Address matches other pages (docs.json navbar and index.mdx). No further action.

docs/docs.json (1)

25-25: Confirm new nav target exists and builds

Ensure docs/cli/installation.mdx is present and included in the build so this nav item doesn’t 404.

docs/index.mdx (1)

71-71: Consistent support address

Updated mailto uses addsuga.com and matches other docs. LGTM.

docs/cli/templates.mdx (1)

19-22: Verify template slugs

Please confirm these identifiers exactly match what suga templates outputs (including hyphens and casing), so users can copy-paste reliably.

docs/cli/edit.mdx (1)

24-24: Editor URL update looks correct

Domain matches the rest of the rebrand.

docs/cli/dev.mdx (1)

6-6: Confirm feature claims

Intro now emphasizes “local testing of resources,” while the Features still list “Hot reloading.” Please verify both are supported by suga dev and adjust wording if needed.

docs/cli/installation.mdx (1)

20-33: Validate package sources (brew/scoop/script) are current.

Please confirm the Homebrew tap, Scoop bucket URL, and install script endpoint are still the recommended sources for vNext of the CLI. If #49 changes these, update here too.

Also applies to: 52-59

docs/cli/new.mdx (1)

26-29: Confirm options parity with CLI help.

If --template (or similar) was removed, ensure the CLI help aligns and the removal is intentional.

Comment thread docs/cli/installation.mdx
Comment thread docs/cli/login.mdx Outdated
Comment thread docs/docs.json
@davemooreuws davemooreuws self-assigned this Sep 9, 2025
@jyecusch jyecusch merged commit cb21a44 into main Sep 9, 2025
5 checks passed
@jyecusch jyecusch deleted the docs-updates branch September 9, 2025 05:15
@nitric-bot
Copy link
Copy Markdown

🎉 This PR is included in version 0.0.5 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants