You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: update copyright information from Reflag ApS to Bucket ApS
- Changed copyright statements in LICENSE and various README files to reflect the new ownership by Bucket ApS.
- Updated references in the browser and node SDKs to ensure consistency with the new branding.
- Adjusted example files and documentation to align with the updated copyright information.
Copy file name to clipboardExpand all lines: packages/cli/README.md
+37-92Lines changed: 37 additions & 92 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# Reflag CLI
2
2
3
3
Command-line interface for interacting with Reflag services. The CLI allows you to manage apps,
4
-
features, authentication, and generate TypeScript types for your Reflag features. With this tool,
4
+
flags, authentication, and generate TypeScript types for your Reflag flags. With this tool,
5
5
you can streamline your feature flagging workflow directly from your terminal.
6
6
7
7
## Usage
@@ -17,7 +17,7 @@ yarn add --dev @reflag/cli
17
17
```
18
18
19
19
Then running the `new` command from your project's root directory,
20
-
initializing the CLI, creating a feature, and generating the types all at once:
20
+
initializing the CLI, creating a flag, and generating the types all at once:
21
21
22
22
```bash
23
23
# npm
@@ -35,19 +35,19 @@ Instead of running `new` you can call each step individually.
35
35
# Initialize Reflag in your project (if not already setup)
36
36
npx reflag init
37
37
38
-
# Create a new feature
39
-
npx reflag features create "My Feature"
38
+
# Create a new flag
39
+
npx reflag flags create "My new flag"
40
40
41
-
# Generate TypeScript types for your features
42
-
npx reflag features types
41
+
# Generate TypeScript types for your flags
42
+
npx reflag flags types
43
43
```
44
44
45
45
## Configuration
46
46
47
47
The CLI creates a `reflag.config.json` file in your project directory when you run `reflag init`.
48
48
This file contains all the necessary settings for your Reflag integration.
49
49
50
-
### Configuration File Structure
50
+
### Configuration file structure
51
51
52
52
Here's a comprehensive list of configuration options available in the `reflag.config.json` file:
53
53
@@ -59,7 +59,7 @@ Here's a comprehensive list of configuration options available in the `reflag.co
59
59
"appId": "ap123456789",
60
60
"typesOutput": [
61
61
{
62
-
"path": "gen/features.d.ts",
62
+
"path": "gen/flags.d.ts",
63
63
"format": "react"
64
64
}
65
65
]
@@ -72,7 +72,7 @@ Here's a comprehensive list of configuration options available in the `reflag.co
72
72
|`baseUrl`| Base URL for Reflag services. | "https://app.bucket.co"|
73
73
|`apiUrl`| API URL for Reflag services (overrides baseUrl for API calls). | "https://app.bucket.co/api"|
74
74
|`appId`| Your Reflag application ID. | Required |
75
-
|`typesOutput`| Path(s) where TypeScript types will be generated. Can be a string or an array of objects with `path` and `format` properties. Available formats: `react` and `node`. | "gen/features.ts" with format "react" |
75
+
|`typesOutput`| Path(s) where TypeScript types will be generated. Can be a string or an array of objects with `path` and `format` properties. Available formats: `react` and `node`. | "gen/flags.ts" with format "react"|
76
76
77
77
You can override these settings using command-line options for individual commands.
78
78
@@ -91,26 +91,26 @@ Options:
91
91
92
92
-`--overwrite`: Overwrite existing configuration file if one exists.
93
93
-`--app-id <id>`: Set the application ID.
94
-
-`--key-format <format>`: Set the key format for features.
94
+
-`--key-format <format>`: Set the key format for flags.
95
95
96
-
### `reflag new [featureName]`
96
+
### `reflag new [flagName]`
97
97
98
-
All-in-one command to get started quickly. This command combines `init`, feature creation,
98
+
All-in-one command to get started quickly. This command combines `init`, flag creation,
99
99
and type generation in a single step. Use this for the fastest way to get up and running with Reflag.
100
100
101
101
```bash
102
-
npx reflag new "My Feature" [--app-id ap123456789] [--key my-feature] [--key-format custom] [--out gen/features.ts] [--format react]
102
+
npx reflag new "My flag" [--app-id ap123456789] [--key my-flag] [--key-format custom] [--out gen/flags.ts] [--format react]
103
103
```
104
104
105
105
Options:
106
106
107
-
-`--key`: Specific key for the feature.
107
+
-`--key`: Specific key for the flag.
108
108
-`--app-id`: App ID to use.
109
-
-`--key-format`: Format for feature keys (custom, snake, camel, etc.).
109
+
-`--key-format`: Format for flag keys (custom, snake, camel, etc.).
110
110
-`--out`: Path to generate TypeScript types.
111
111
-`--format`: Format of the generated types (react or node).
112
112
113
-
If you prefer more control over each step, you can use the individual commands (`init`, `features create`, `features types`) instead.
113
+
If you prefer more control over each step, you can use the individual commands (`init`, `flags create`, `flags types`) instead.
114
114
115
115
### `reflag login`
116
116
@@ -128,45 +128,45 @@ Log out from your Reflag account, removing stored credentials.
128
128
npx reflag logout
129
129
```
130
130
131
-
### `reflag features`
131
+
### `reflag flags`
132
132
133
-
Manage your Reflag features with the following subcommands.
133
+
Manage your Reflag flags with the following subcommands.
134
134
135
-
#### `reflag features create [featureName]`
135
+
#### `reflag flags create [flagName]`
136
136
137
-
Create a new feature in your Reflag app.
138
-
The command guides you through the feature creation process with interactive prompts if options are not provided.
137
+
Create a new flag in your Reflag app.
138
+
The command guides you through the flag creation process with interactive prompts if options are not provided.
139
139
140
140
```bash
141
-
npx reflag features create "My Feature" [--app-id ap123456789] [--key my-feature] [--key-format custom]
@@ -246,7 +191,7 @@ These options can be used with any command:
246
191
247
192
## AI-Assisted Development
248
193
249
-
Reflag provides powerful AI-assisted development capabilities through rules and Model Context Protocol (MCP). These features help your AI development tools better understand your features and provide more accurate assistance.
194
+
Reflag provides powerful AI-assisted development capabilities through rules and Model Context Protocol (MCP). These features help your AI development tools better understand your flags and provide more accurate assistance.
250
195
251
196
### Reflag Rules (Recommended)
252
197
@@ -267,7 +212,7 @@ This command will add rules to your project that provide AI tools with context a
267
212
268
213
## Model Context Protocol
269
214
270
-
The Model Context Protocol (MCP) is an open protocol that provides a standardized way to connect AI models to different data sources and tools. In the context of Reflag, MCP enables your code editor to understand your feature flags, their states, and their relationships within your codebase. This creates a seamless bridge between your feature management workflow and AI-powered development tools. The MCP server is hosted by Reflag, so it's very easy to get started.
215
+
The Model Context Protocol (MCP) is an open protocol that provides a standardized way to connect AI models to different data sources and tools. In the context of Reflag, MCP enables your code editor to understand your flags, their states, and their relationships within your codebase. This creates a seamless bridge between your feature management workflow and AI-powered development tools. The MCP server is hosted by Reflag, so it's very easy to get started.
271
216
272
217
_\*\*Note: The Reflag `mcp` CLI command was previously used for a \_local_ server. However, in recent versions of the Reflag CLI, the `mcp` command has been repurposed to help you connect to the new remote MCP server.\*\*\_
273
218
@@ -321,11 +266,11 @@ Example CI workflow:
321
266
```yaml
322
267
# GitHub Actions example
323
268
- name: Generate types
324
-
run: npx reflag features types --api-key ${{ secrets.REFLAG_API_KEY }}
0 commit comments