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
After installation, you can use the CLI with any of these aliases:
28
28
```bash
29
-
wf --version
30
-
wf check
29
+
wf --version # short alias
30
+
vnext --version # alternative alias (recommended for Windows)
31
+
workflow --version # full name
31
32
```
32
33
33
34
### Install from Source
@@ -118,6 +119,8 @@ wf check
118
119
119
120
**Note:** The CLI automatically uses the current working directory as the project root. Just `cd` into your project folder before running commands.
120
121
122
+
> **Tip:** All examples use `wf` but you can also use `vnext` or `workflow` interchangeably. The `vnext` alias is recommended on Windows where `wf` may conflict with existing system commands.
#Option A: Auto-switch via vnext.config.json (recommended)
431
+
# Just cd into the project - domain profile switches automatically
432
+
cd~/projects/domain-a-app # vnext.config.json has "domain": "domain-a"
433
+
wf update# auto-switches to domain-a profile
431
434
432
-
# Switch to Domain B - config is applied automatically
433
-
wf domain use domain-b
434
-
wf check
435
+
cd~/projects/domain-b-app # vnext.config.json has "domain": "domain-b"
436
+
wf update # auto-switches to domain-b profile
437
+
438
+
# Option B: Manual switch (still works)
439
+
wf domain use domain-a
435
440
wf update
436
441
437
442
# See all domains
@@ -457,6 +462,35 @@ wf domain list
457
462
458
463
The CLI supports managing multiple domain configurations. Each domain has its own `API_BASE_URL`, `DB_NAME`, and other settings. Switch between domains with a single command.
459
464
465
+
### Auto Domain Resolution
466
+
467
+
When you run any command inside a vNext workspace that contains a `vnext.config.json`, the CLI **automatically** switches to the matching domain profile based on the `domain` field in the config file. This eliminates the need to manually run `wf domain use <name>` every time you switch between projects.
468
+
469
+
**How it works:**
470
+
1. Before each command (except `wf domain`), the CLI checks if `vnext.config.json` exists in the current directory.
471
+
2. If found, it reads the `domain` field and looks for a matching CLI domain profile (`DOMAINS[].DOMAIN_NAME`).
472
+
3. If a match is found and it differs from the current active domain, it silently switches and shows a dim log message:
473
+
```
474
+
[auto] Domain switched to "onboarding" (from vnext.config.json)
475
+
```
476
+
4. If no `vnext.config.json` is found or no matching profile exists, the current active domain is kept (no error).
477
+
478
+
**Example:** You have two projects and two domain profiles:
0 commit comments