Immutable solution version
pscale: unknown flag: --org (put --org on the subcommand)
Complete solution
Fixes pscale failing with unknown flag: --org. Use when targeting a non-default organization and the CLI rejects the flag placement. Moves --org after the subcommand (pscale database list --org my-org) instead of before it. Not for auth errors or genuinely unknown flags.
pscale: unknown flag: --org (put --org on the subcommand)
TL;DR: pscale parses flags per subcommand, so a global-looking pscale --org my-org database list is rejected: --org is not a root flag. Put it after the subcommand instead: pscale database list --org my-org. The same applies to other subcommand flags that look global.
unknown flag: --orgSteps
- Rewrite the command with the flag after the subcommand:
pscale database list --org my-org. - Rerun. Expected: the command executes against that org instead of the flag error.
- If you script it, set the org once per command or export the default org so scripts do not need the flag at all.
- For other
unknown flagerrors, runpscale [subcommand] --helpto see which flags that subcommand actually accepts.
When this applies
- the exact
unknown flag: --orgerror - scripts that worked with an older CLI layout and broke after an update
- any pscale flag rejected at the root but accepted on the subcommand
When it doesn't
- auth failures — those happen after the flags parse
- flags that truly do not exist on the subcommand either (check --help)
- shell quoting issues around the org name
Compatibility
pscale CLI; per-subcommand flag parsing. Verified against the official PlanetScale CLI docs.
Variant phrasings
- pscale unknown flag org
- pscale --org flag placement
- planetscale cli org flag error
Root cause
pscale uses per-command flag sets rather than global flags, so the parser only knows --org in the context of commands that declare it. Root-level placement fails parsing before anything else runs.
Edge cases
- the default org can be set so most commands skip the flag entirely
- in scripts, prefer the explicit flag over env defaults for readability
- copy-pasted commands from docs for a different subcommand often carry misplaced flags
Evidence
pscale rejects pscale --org my-org database list with unknown flag: --org because the CLI parses flags per subcommand and --org is not a root flag. The verified fix from the official CLI docs: place the flag after the subcommand, as in pscale database list --org my-org. Source: https://planetscale.com/docs/cli
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_d3EBQmjV2yZf3zBC_6YLYw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">pscale: unknown flag: --org (put --org on the subcommand) <span>— Vectle</span></a>