@flagify/cli 1.6.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -26,13 +26,20 @@ echo 'alias flag="flagify"' >> ~/.zshrc && source ~/.zshrc
|
|
|
26
26
|
## Quick Start
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
|
-
#
|
|
30
|
-
flagify login
|
|
29
|
+
# Sign in (creates a profile called "default" on first run)
|
|
30
|
+
flagify auth login
|
|
31
31
|
|
|
32
|
-
#
|
|
33
|
-
flagify
|
|
34
|
-
flagify
|
|
35
|
-
flagify
|
|
32
|
+
# Or add a named profile — handy when you juggle work and personal accounts
|
|
33
|
+
flagify auth login --profile work
|
|
34
|
+
flagify auth list
|
|
35
|
+
flagify auth switch personal
|
|
36
|
+
|
|
37
|
+
# Pin a repo to a workspace/project/environment in a committable file
|
|
38
|
+
flagify init --workspace-id ws_01J... --project-id pr_01J... --environment development
|
|
39
|
+
|
|
40
|
+
# See the resolved context for this invocation + the source of every field
|
|
41
|
+
flagify status
|
|
42
|
+
flagify status --format json
|
|
36
43
|
|
|
37
44
|
# Manage feature flags
|
|
38
45
|
flagify flags list -p <project-id>
|
|
@@ -46,9 +53,17 @@ flagify flags toggle my-flag -p <project-id>
|
|
|
46
53
|
|
|
47
54
|
| Command | Description |
|
|
48
55
|
|---------|-------------|
|
|
49
|
-
| `flagify login` |
|
|
50
|
-
| `flagify logout` |
|
|
51
|
-
| `flagify
|
|
56
|
+
| `flagify auth login` | Sign in with the browser flow (`--profile <name>` to add a second identity without signing out of the first) |
|
|
57
|
+
| `flagify auth logout` | Sign out of the active profile (`--profile <name>` or `--all`) |
|
|
58
|
+
| `flagify auth list` | List signed-in profiles (`--format json`) |
|
|
59
|
+
| `flagify auth switch <name>` | Set the active profile |
|
|
60
|
+
| `flagify auth remove <name>` | Delete a profile and any repo bindings that point to it |
|
|
61
|
+
| `flagify auth rename <old> <new>` | Rename a profile and update bindings |
|
|
62
|
+
| `flagify whoami` | Show the current user and pinned profile (`--format json`) |
|
|
63
|
+
| `flagify status` | Show the resolved context for this invocation with `sources` per field (`--format json`) |
|
|
64
|
+
| `flagify init` | Write `.flagify/project.json` for the current repo (`--print` to dry-run, `--force` to overwrite in non-TTY) |
|
|
65
|
+
| `flagify project bind --profile <name>` | Bind this repo to a local profile without touching the project file |
|
|
66
|
+
| `flagify project set <field> <value>` | Update a field in `.flagify/project.json` (environment, project, workspace, preferred-profile, …) |
|
|
52
67
|
| `flagify workspaces list` | List your workspaces (`--format json`) |
|
|
53
68
|
| `flagify workspaces pick` | Interactively select a default workspace |
|
|
54
69
|
| `flagify projects list` | List projects in a workspace (`--format json`) |
|
|
@@ -71,6 +86,7 @@ flagify flags toggle my-flag -p <project-id>
|
|
|
71
86
|
| `flagify targeting set <flag-key>` | Replace all targeting rules for a flag (`--rules '<json>'`, `--format json`) |
|
|
72
87
|
| `flagify whoami` | Show current authenticated user (`--format json`) |
|
|
73
88
|
| `flagify ai-setup` | Generate AI tool configs (Claude, Cursor, Copilot, Windsurf). Includes the integrations catalogue; use `--include-flags` for a snapshot |
|
|
89
|
+
| `flagify types` | Generate typed flag key constants (`--typescript` or `--go`) for compile-time safety in application code |
|
|
74
90
|
| `flagify config` | Show current configuration (`--format json`) |
|
|
75
91
|
| `flagify config set <key> <value>` | Set a config value (api-url, console-url, workspace, project, environment) |
|
|
76
92
|
| `flagify config get <key>` | Get a single config value |
|
|
@@ -96,7 +112,20 @@ flagify completion fish > ~/.config/fish/completions/flagify.fish
|
|
|
96
112
|
|
|
97
113
|
## Configuration
|
|
98
114
|
|
|
99
|
-
|
|
115
|
+
Credentials live under named profiles in `~/.flagify/config.json` (schema v2, migrated automatically from any older flat file with a `.bak` preserved alongside).
|
|
116
|
+
|
|
117
|
+
Scope is resolved per-invocation. Precedence, highest first:
|
|
118
|
+
|
|
119
|
+
1. CLI flags (`--profile`, `--workspace-id`, `--workspace`, `--project-id`, `--project`, `--environment`).
|
|
120
|
+
2. Environment variables (`FLAGIFY_PROFILE`, `FLAGIFY_WORKSPACE_ID`, `FLAGIFY_WORKSPACE`, `FLAGIFY_PROJECT_ID`, `FLAGIFY_PROJECT`, `FLAGIFY_ENVIRONMENT`, `FLAGIFY_API_URL`).
|
|
121
|
+
3. `.flagify/project.json` walked up from the current directory.
|
|
122
|
+
4. Local binding recorded by `flagify project bind`.
|
|
123
|
+
5. The active profile's defaults.
|
|
124
|
+
6. Built-in defaults.
|
|
125
|
+
|
|
126
|
+
Run `flagify status` to see exactly which signal won for each field. See the full CLI reference at [flagify.dev/docs/cli](https://flagify.dev/docs/cli) for multi-account workflows and project file details.
|
|
127
|
+
|
|
128
|
+
> **Ephemeral tokens**: set `FLAGIFY_ACCESS_TOKEN` (and optionally `FLAGIFY_REFRESH_TOKEN`) to override the stored credentials for a single invocation. The CLI does not persist refreshed tokens when these are set.
|
|
100
129
|
|
|
101
130
|
## Requirements
|
|
102
131
|
|