Skip to content

docs(cli): document projects create + setup and dedup story - #4357

Merged
saddlepaddle merged 1 commit into
mainfrom
superset-cli-projects-docs
May 10, 2026
Merged

saddlepaddle merged 1 commit into
mainfrom
superset-cli-projects-docs

Conversation

@saddlepaddle

@saddlepaddle saddlepaddle commented May 10, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Updates the CLI docs for the new projects create (#4355) and projects setup (#4356) commands, plus a few drive-by corrections that were already wrong before this work.

cli-reference.mdx — projects section

  • projects list was documented as host-scoped with repoOwner/repoName/repoPath. Actual command is org-wide returning name/slug/repoCloneUrl/id. Fixed.
  • projects create flag list updated to the shipped surface: --clone <url> (was --url), --import <path> (was --path), and --host/--local are now required (one of).
  • New projects setup <id> block documenting the dedup-aware adoption path.

host-server.mdx — Create or adopt a project

Rewrote the walkthrough so the dedup story is explicit: first machine runs create; subsequent machines run setup <id> to attach to the existing cloud project instead of duplicating it. Updated all flag examples.

getting-started.mdx

  • The "Run your first commands" section assumed a project already existed. Now shows how to bootstrap one via create or attach via setup.
  • "Local vs. remote hosts" tightened: mutating host commands (projects create, projects setup, workspaces create) require explicit --host/--local; read-only host queries default to local.

Drive-by

workspaces create flag table also said --host defaults to local — it doesn't. Fixed alongside.

Test plan

  • bun run lint clean
  • bun run build in apps/docs succeeds
  • Visually scan the rendered /cli/cli-reference, /cli/getting-started, /cli/host-server pages on Vercel preview

Summary by cubic

Adds docs for projects create and the new projects setup, and clarifies the create-vs-setup flow so teams don’t create duplicate cloud projects. Also fixes projects list output and host-targeting flags across the CLI docs.

  • New Features

    • Document projects setup <id> to adopt existing cloud projects on a new machine (clone/import modes, idempotent, no --clone needed).
    • Update projects create to the shipped surface: --clone, --import, and required --host or --local; add concise examples.
    • Rewrite host-server and getting-started guides to show when to use create vs setup.
  • Bug Fixes

    • Correct projects list: org-wide scope, columns NAME/SLUG/REPO/ID, and output shape.
    • Fix workspaces create table and host-targeting docs: mutating commands require explicit --host or --local; read-only lists default to local.

Written for commit 85004a2. Summary will update on new commits.

Summary by CodeRabbit

  • Documentation
    • Updated CLI reference documentation for projects and workspaces commands with refined options and output formats.
    • Introduced projects setup command for adopting existing projects on new hosts.
    • Reorganized getting started guide to follow a project-first workflow.
    • Clarified host targeting requirements (explicit --host or --local selection for mutating commands).

Review Change Stack

- Update the `projects` section in the CLI reference to match the
  shipped `--clone`/`--import` flags and add the new `projects setup
  <id>` block.
- Fix `projects list` shape (org-wide; columns NAME/SLUG/REPO/ID).
- Update the host-server "Create or adopt a project" walkthrough to
  explain when to use `create` vs `setup` so users adopting a project
  on a fresh machine don't end up with a duplicate cloud row.
- Tighten the "Local vs. remote hosts" section in getting-started to
  reflect that mutating host commands now require an explicit `--host`
  or `--local` (no default).
- Drive-by: fix the `workspaces create` flag table to match.
@coderabbitai

coderabbitai Bot commented May 10, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This PR updates CLI documentation to reflect a new project model where projects are org-wide repositories with cloud records. Key changes include redesigning projects list for org-wide scope, introducing projects setup for adopting existing projects, and requiring explicit host targeting in mutating commands rather than defaulting to local.

Changes

CLI Projects & Workspaces Documentation

Layer / File(s) Summary
CLI Reference - projects list output schema
apps/docs/content/docs/cli/cli-reference.mdx
Output fields replaced: removed repoOwner, repoName, repoPath; added id, name, slug, repoCloneUrl, githubRepositoryId. Command now lists all org projects.
CLI Reference - projects create command options
apps/docs/content/docs/cli/cli-reference.mdx
CLI flags changed from --url/--path to --clone/--parent-dir and --import. Host targeting changed from optional (defaulting to local) to required mutually exclusive --host or --local. JSON output now includes mainWorkspaceId.
CLI Reference - projects setup command
apps/docs/content/docs/cli/cli-reference.mdx
New command added to adopt existing org projects onto a host without duplicating cloud records, with options --host/--local, --parent-dir, --import, --allow-relocate, and idempotent behavior.
CLI Reference - workspaces create host targeting
apps/docs/content/docs/cli/cli-reference.mdx
Host targeting changed from optional (defaulting to local) to required: must explicitly choose between --host or --local.
Getting Started - project-first workflow
apps/docs/content/docs/cli/getting-started.mdx
Redesigned "Run your first commands" to project-first flow: list projects, create/setup projects locally, then create workspace. Replaces prior workspace-first approach.
Getting Started - local vs remote hosts concept
apps/docs/content/docs/cli/getting-started.mdx
Rewritten "Local vs. remote hosts" section explains --host/--local selection mechanism. Clarifies mutating commands require explicit targeting with no default; read-only queries default to local.
Host Server Guide - project setup examples
apps/docs/content/docs/cli/host-server.mdx
Added "Getting started" section with two-step adoption model: first machine runs projects create --clone --local, subsequent machines adopt via projects setup ID --import --local.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 New docs hop into view,
Projects bloom in org-wide hue,
Setup lets teams share the clone,
Targeting explicit, no more unknown—
Cloud records dance, workflows renew! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and clearly summarizes the main changes: documenting new CLI commands and clarifying the project creation vs adoption workflow.
Description check ✅ Passed The description covers required sections including Summary, Type of Change (Documentation), and Testing with completed checks. It provides clear, organized details about the changes across all modified files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch superset-cli-projects-docs

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.

@greptile-apps

greptile-apps Bot commented May 10, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR updates the CLI documentation for the new projects create and projects setup commands, introducing the dedup story (first machine runs create; subsequent machines run setup to avoid duplicate cloud project records), and corrects several pre-existing inaccuracies across three doc pages.

  • cli-reference.mdx: Adds the projects setup <id> command block, corrects projects list output fields, renames --url/--path to --clone/--import, and makes --host/--local an explicit requirement on projects create and workspaces create.
  • getting-started.mdx: Bootstrapping flow now walks through projects list → create/setup → workspaces create with all flags correct; "Local vs. remote hosts" section clarifies which commands require explicit host targeting.
  • host-server.mdx: Rewrites the "Create or adopt a project" section with a clear first-machine / subsequent-machine split, but the follow-on "Create your first workspace" example was not updated and still omits the now-required --local flag.

Confidence Score: 4/5

Safe to merge after fixing the missing --local in the host-server.mdx workspace example — a reader following that walkthrough would hit a validation error.

Two of the three files are consistent and correct. The third (host-server.mdx) has one spot where workspaces create lost its --local update while the same command was correctly updated in both other files; a user copy-pasting that snippet would get a CLI error because the flag is now required.

apps/docs/content/docs/cli/host-server.mdx — the "Create your first workspace" code block needs --local added to workspaces create.

Important Files Changed

Filename Overview
apps/docs/content/docs/cli/cli-reference.mdx Adds projects setup command block, corrects projects list output shape and scope, renames --url/--path to --clone/--import, and makes --host/--local required on projects create and workspaces create; workspaces delete may have a stale "Defaults to local" description.
apps/docs/content/docs/cli/getting-started.mdx Bootstrapping flow now covers projects create and projects setup before workspace creation; --local added to workspaces create example; "Local vs. remote hosts" clarifies mutating vs. read-only defaults correctly.
apps/docs/content/docs/cli/host-server.mdx Dedup story (first-machine create vs. subsequent-machine setup) is well written, but the "Create your first workspace" example omits the now-required --local flag from workspaces create, which would produce a validation error for readers following the guide.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A([User wants to use a project]) --> B[superset projects list]
    B --> C{Project exists in org?}
    C -- No --> D["superset projects create\n--name ... --local\n--clone URL --parent-dir ~/code\nOR --import ~/code/repo"]
    C -- "Yes, not on this machine" --> E["superset projects setup ID\n--local --parent-dir ~/code\nOR --import ~/code/repo"]
    C -- "Yes, already set up here" --> F([No-op / already ready])
    D --> G["superset workspaces create\n--project prj_... --name ... --branch ... --local"]
    E --> G
    G --> H([Workspace ready])
Loading

Comments Outside Diff (2)

  1. apps/docs/content/docs/cli/host-server.mdx, line 123-129 (link)

    P1 The workspaces create example here is missing the now-required --local (or --host) flag. Per this PR's stated rule — and consistent with the updated examples in getting-started.mdx (line 98-103) and cli-reference.mdx (line 506-511) — mutating host commands require an explicit --host or --local. A reader following this guide would get a flag-validation error.

    bash
    superset workspaces create
    --project prj_…
    --name "fix-login-bug"
    --branch fix/login-bug
    --local

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: apps/docs/content/docs/cli/host-server.mdx
    Line: 123-129
    
    Comment:
    The `workspaces create` example here is missing the now-required `--local` (or `--host`) flag. Per this PR's stated rule — and consistent with the updated examples in `getting-started.mdx` (line 98-103) and `cli-reference.mdx` (line 506-511) — mutating host commands require an explicit `--host` or `--local`. A reader following this guide would get a flag-validation error.
    
    bash
    superset workspaces create \
      --project prj_… \
      --name "fix-login-bug" \
      --branch fix/login-bug \
      --local
    ```
    ```
    
    How can I resolve this? If you propose a fix, please make it concise.
  2. apps/docs/content/docs/cli/cli-reference.mdx, line 520-522 (link)

    P2 workspaces delete still says --host defaults to the local machine, but the PR establishes that mutating host commands require an explicit --host or --local. If delete actually follows the new requirement, the description here is wrong; if it genuinely still defaults to local, a note in the "Local vs. remote hosts" prose saying which commands are exceptions would prevent confusion.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: apps/docs/content/docs/cli/cli-reference.mdx
    Line: 520-522
    
    Comment:
    `workspaces delete` still says `--host` defaults to the local machine, but the PR establishes that mutating host commands require an explicit `--host` or `--local`. If `delete` actually follows the new requirement, the description here is wrong; if it genuinely still defaults to local, a note in the "Local vs. remote hosts" prose saying which commands are exceptions would prevent confusion.
    
    
    
    How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
apps/docs/content/docs/cli/host-server.mdx:123-129
The `workspaces create` example here is missing the now-required `--local` (or `--host`) flag. Per this PR's stated rule — and consistent with the updated examples in `getting-started.mdx` (line 98-103) and `cli-reference.mdx` (line 506-511) — mutating host commands require an explicit `--host` or `--local`. A reader following this guide would get a flag-validation error.

```suggestion
```bash
superset workspaces create \
  --project prj_… \
  --name "fix-login-bug" \
  --branch fix/login-bug \
  --local
```
```

### Issue 2 of 2
apps/docs/content/docs/cli/cli-reference.mdx:520-522
`workspaces delete` still says `--host` defaults to the local machine, but the PR establishes that mutating host commands require an explicit `--host` or `--local`. If `delete` actually follows the new requirement, the description here is wrong; if it genuinely still defaults to local, a note in the "Local vs. remote hosts" prose saying which commands are exceptions would prevent confusion.

```suggestion
		{ flag: "--host <id>", description: "Target host machineId. Mutually exclusive with `--local`; one is required." },
		{ flag: "--local", description: "Target this machine. Mutually exclusive with `--host`; one is required." },
	]}
	output={`{ deleted: string[] }`}
```

Reviews (1): Last reviewed commit: "docs(cli): document `projects create` + ..." | Re-trigger Greptile

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/docs/content/docs/cli/host-server.mdx (1)

123-129: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Missing required --host or --local flag.

The workspaces create command is missing the required --host or --local flag. According to the CLI reference (cli-reference.mdx lines 498-499), one of these flags is required (mutually exclusive).

🔧 Proposed fix
 superset projects list
 superset workspaces create \
   --project prj_… \
   --name "fix-login-bug" \
-  --branch fix/login-bug
+  --branch fix/login-bug \
+  --local
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/content/docs/cli/host-server.mdx` around lines 123 - 129, The
sample CLI invocation for superset's workspace creation is missing the required
mutually exclusive flag; update the example showing "superset workspaces create"
to include either the --host or the --local flag (e.g., add --host <HOST_URL> or
--local) so it matches the CLI reference and the required options for the
workspaces create command.
🧹 Nitpick comments (1)
apps/docs/content/docs/cli/cli-reference.mdx (1)

397-430: ⚡ Quick win

Clarify when --parent-dir or --import is required.

The idempotency note (lines 420-421) explains that re-running setup on an already-configured project is a no-op, but it's not explicitly stated whether --parent-dir (clone mode) or --import (import mode) is required for the initial setup. New users might be unsure whether they can run setup <id> --local without specifying a mode.

Consider adding a sentence like: "For initial setup, specify either --parent-dir to clone the repo or --import <path> to register an existing checkout."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/content/docs/cli/cli-reference.mdx` around lines 397 - 430, Add a
clarifying sentence to the "superset projects setup <id>" command description
stating that for initial setup you must specify either --parent-dir to clone the
repo or --import <path> to register an existing checkout (when using --local or
remote host), and leave the existing idempotency note unchanged; update the
prose near the idempotency lines that reference re-running to include this
initial-setup requirement and mention the --parent-dir and --import flags by
name so users know which mode to choose.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@apps/docs/content/docs/cli/host-server.mdx`:
- Around line 123-129: The sample CLI invocation for superset's workspace
creation is missing the required mutually exclusive flag; update the example
showing "superset workspaces create" to include either the --host or the --local
flag (e.g., add --host <HOST_URL> or --local) so it matches the CLI reference
and the required options for the workspaces create command.

---

Nitpick comments:
In `@apps/docs/content/docs/cli/cli-reference.mdx`:
- Around line 397-430: Add a clarifying sentence to the "superset projects setup
<id>" command description stating that for initial setup you must specify either
--parent-dir to clone the repo or --import <path> to register an existing
checkout (when using --local or remote host), and leave the existing idempotency
note unchanged; update the prose near the idempotency lines that reference
re-running to include this initial-setup requirement and mention the
--parent-dir and --import flags by name so users know which mode to choose.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 422bce3f-8ee7-4c86-a343-b100c1a9d798

📥 Commits

Reviewing files that changed from the base of the PR and between 08943a5 and 85004a2.

📒 Files selected for processing (3)
  • apps/docs/content/docs/cli/cli-reference.mdx
  • apps/docs/content/docs/cli/getting-started.mdx
  • apps/docs/content/docs/cli/host-server.mdx

@saddlepaddle
saddlepaddle merged commit 70e53ad into main May 10, 2026
16 checks passed
@github-actions

github-actions Bot commented May 10, 2026 •

Copy link
Copy Markdown
Contributor

🚀 Preview Deployment

🔗 Preview Links

Service Status Link
Neon Database (Neon) ✅ View Branch
Vercel API (Vercel) ✅ Open Preview
Vercel Web (Vercel) ✅ Open Preview
Vercel Marketing (Vercel) ✅ Open Preview
Vercel Admin (Vercel) ✅ Open Preview
Vercel Docs (Vercel) ✅ Open Preview

Preview updates automatically with new commits

This branch was previously deployed

1 inactive deployment
preview — 85004a2e Deployed May 10, 2026 by saddlepaddle via Deploy Web #5162
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.

1 participant