Skip to content

feat(cli): gate pro commands behind DEVSY_PRO_ENABLED - #478

Merged
skevetter merged 1 commit into
mainfrom
disable-pro-commands
Jun 4, 2026
Merged

feat(cli): gate pro commands behind DEVSY_PRO_ENABLED#478
skevetter merged 1 commit into
mainfrom
disable-pro-commands

Conversation

@skevetter

@skevetter skevetter commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The pro feature is not ready for general use, so the pro command tree is now hidden from the CLI by default to avoid user confusion.
  • Setting DEVSY_PRO_ENABLED=true re-exposes the command (and the "Platform commands:" help group) for internal testing — no rebuild required.
  • Tests covering pro flag plumbing opt in via t.Setenv(envProEnabled, "true"); a new test locks in the default-off behavior.

Summary by CodeRabbit

  • New Features

    • Added environment variable support to optionally enable or disable the "pro" command. Users can now control platform command visibility and availability.
  • Tests

    • Enhanced test suite with new test coverage verifying that platform commands remain hidden when the feature is disabled.

The pro feature is not ready for general use. Hide the `pro` command
tree from the CLI by default to avoid user confusion, and add an
opt-in `DEVSY_PRO_ENABLED=true` env var to re-expose it for internal
testing.
@netlify

netlify Bot commented Jun 4, 2026

Copy link
Copy Markdown

Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit 0278735
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6a21da7f0eb70c00080ff8e8

@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b4c388ba-a96a-40be-8f54-558163894b07

📥 Commits

Reviewing files that changed from the base of the PR and between c374add and 0278735.

📒 Files selected for processing (2)
  • cmd/env_flags_test.go
  • cmd/root.go

📝 Walkthrough

Walkthrough

The PR adds environment variable gating for the pro command. When DEVSY_PRO_ENABLED is set to "true", the pro command and its platform commands group are registered in the root command. When unset or empty, they are omitted entirely, keeping the pro command hidden from users.

Changes

Pro command feature gate

Layer / File(s) Summary
Pro command feature gate implementation
cmd/root.go
A new DEVSY_PRO_ENABLED environment variable and proEnabled() helper determine whether pro command registration proceeds. Root command group and subcommand registration logic is refactored to conditionally include the "Platform commands" group and pro subcommand only when the gate is enabled.
Pro command gating validation and tests
cmd/env_flags_test.go
Five existing env-flag tests are updated to explicitly set envProEnabled to "true" to maintain expected behavior. A new test, TestProCommand_HiddenWhenDisabled, verifies that the pro command is not registered when the gate is disabled or unset.

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 70.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: gating pro commands behind an environment variable (DEVSY_PRO_ENABLED).
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.


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.

@github-actions github-actions Bot added the size/m label Jun 4, 2026
@skevetter
skevetter merged commit 4843d28 into main Jun 4, 2026
54 checks passed
@skevetter
skevetter deleted the disable-pro-commands branch June 4, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant