Skip to content

Conversation

@bkeepers
Copy link
Collaborator

@bkeepers bkeepers commented May 1, 2022

This adds a flipper CLI, which exposes basic flipper features over the command line.

$ flipper enable -g admin -a "User;1" foo
"foo" is enabled for 1 actor, 1 group

$ flipper disable foo
"foo" is disabled

$ flipper enable -p 50 foo
"foo" is enabled for 50% of actors

$ flipper enable foo
"foo" is fully enabled

Here's what's currently only my list to implement for the initial version:

  • enable feature / disable feature
    • no args (boolean)
    • -a, --actor
    • -g, --group
    • -p, --percentage-of-actors
    • -t, --percentage-of-time
  • -h, --help to show CLI help
    • list available commands
    • help [command]
  • Initialize via local Rails app
  • list
  • show feature

Here's stuff that would be really nice to have eventually, but not a priority for this first version:

  • Standalone mode
    • via FLIPPER_CLOUD_TOKEN env var
    • via config file in project or home directory
    • with browser workflow to authenticate
  • -e, '--environment` option for all other commands to update features in remote environments
  • audit
  • undo to revert last feature change
  • environments
    • list with no args
    • -c, --create
    • -d, --delete
  • webhooks
  • tokens
  • actors

* origin/v1.0: (229 commits)
  Update changelog
  Use climate_control to modify ENV in specs
  Add direct links to homepage urls in gemspecs
  Merge Cloud::Engine and Railtie
  Only configure flipper-cloud if token is present
  Update gem metadata to point to docs and support email
  Merge cloud into flipper gem
  Update Changelog
  Fix API spec
  Release 0.28.3
  Update changelog
  Remove sync interval from cloud config sync
  Avoid any possibility of sync writing back to remote
  Release v0.28.2
  UI: fix path to bundled assets when mapped to a prefix
  Prepare for 0.28.1
  Update changelog
  Improve performance of `color_name` function in log subscriber
  Update Changelog.md
  remove remote source from CSP.
  ...
@bkeepers bkeepers changed the base branch from main to v1.0 August 1, 2023 17:17
Base automatically changed from v1.0 to main August 23, 2023 17:51
@jnunemaker
Copy link
Collaborator

This looks good to me. I'd say finish up whatever you want and get it merged.

@jnunemaker
Copy link
Collaborator

I was going to say it feels a little weird to have feature after the enablements. Not a blocker though and maybe it does work either way but the examples were just with feature key last.

* origin/main: (371 commits)
  Relax moneta version
  Refactor logic for strict adapter
  Use top level sequel to qualify table and column name
  Use Gem::Specification.load to load other gemspecs
  Add Ruby 3.3 to the build matrix
  Fix for setting strict = true
  Env var for sending debug output to stdout
  Add more frameworks and standardize header keys
  Run http specs when client changes
  Minor reformatting
  Another lowercase header
  Standardize on lower case hyphen headers
  Accept encoding gzip for cloud
  Symbol header
  Add proof it works with gzip
  Allow api to deflate responses when requested
  use rack constants
  Fix: Define default_strict_value before it's called
  Use flippercloud.io API, don't retry failures
  Move rails constants
  ...
@bkeepers bkeepers marked this pull request as ready for review January 4, 2024 21:13
@bkeepers
Copy link
Collaborator Author

bkeepers commented Jan 4, 2024

I was going to say it feels a little weird to have feature after the enablements. Not a blocker though and maybe it does work either way but the examples were just with feature key last.

Fixed. Now either of these work:

$ flipper enable foo -p 50
$ flipper enable -p 50 foo

@bkeepers bkeepers merged commit ccdbecb into main Jan 4, 2024
@bkeepers bkeepers deleted the cli branch January 4, 2024 21:23
@bkeepers bkeepers mentioned this pull request Jan 16, 2024
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.

3 participants