Add railway flag command for feature flag management#997
Merged
Conversation
Introduces list/create/set/unset subcommands with workspace-scoped owner resolution and a local GraphQL schema for signal operations. Co-authored-by: Cursor <cursoragent@cursor.com>
The commands! macro already registers signals as an alias; remove the redundant visible_alias from the Parser struct. Co-authored-by: Cursor <cursoragent@cursor.com>
Introduces flag as the primary command for upserting defaults, listing flags, and managing targeting rules, with signal kept as an alias. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Replace the public --owner flag with --scope (workspace:<id> or project:<id>) while keeping a hidden owner alias for compatibility. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds CLI support for Railway Feature Flags — define flags, set default values, attach targeting rules, delete flags, and inspect registered flags for a workspace.
railway flagis the primary commandrailway flag set <name> <value>setcommand with--when--whensubset for common predicates, plus raw JSON as an escape hatch--fullincludes rule IDs and empty rule sectionsrailway flag delete <name>railway flag unset <name> --rule-id <id>true,42,"blue", JSON objects); explicit--typesupported onsetrailway flag set --force --type(clears rules when the type changes)Owner scope defaults to the linked project's workspace (
railway link), or can be set with--owner/RAILWAY_SIGNALS_OWNER.Examples
--whensupports a CEL-shaped subset for comparisons,&&,||,!, receiver calls likesource_repo.contains("miner"), list membership, and bucket rollouts. Raw JSON expressions are still accepted for full-fidelity use cases.Test plan
cargo fmtcargo test signals --quietcargo test flag_list_tests --quietcargo buildrailway flag listagainst a linked project with flags configuredlist --fullandlist --json--force --typere-type flowMade with Cursor