tog-cli
v0.2.0
Published
Tog (short for toggle) is a framework for clients and servers to converse about feature flags over Redis.
Downloads
2
Maintainers
Readme
Tog CLI
Tog (short for toggle) is a framework for clients and servers to converse about feature flags over Redis.
This is the command-line tool that interacts with the Server API to update flags and experiments.
Prerequisites
- Node.js >= 10.0
Versioning
Tog command-line uses Semantic Versioning 2.
Getting Started
- Install:
npm install -g tog-cli
- Log in:
tog login -h <host-url>
, where<host-url>
is the address to your deployment of Tog Server (e.g.https://tog.mysite.com
)
Examples
# Set my_app as default namespace
> tog config namespace my_app
# List flags
> tog list
namespace: my_app
┌──────────────┬─────────────┬───────────────┐
│ name │ description │ rollout │
├──────────────┼─────────────┼───────────────┤
│ blue-button │ - │ - value: true │
└──────────────┴─────────────┴───────────────┘
# Get a flag
> tog get blue-button
namespace: my_app
name: blue-button
description: "Make the button blue"
rollout:
- value: true
percentage: 30
- value: false
# Set a flag's description
> tog set blue-button -d "Make the button blue"
# Set a flag's rollout
> tog set blue-button --rollout "[{ percentage: 30, value: true }, value: false]"
# Set a flag's rollout to always true
> tog set blue-button --on
# Set a flag's rollout to always false
> tog set blue-button --off