bpmax-cli 0.1.7 → 0.1.9

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 CHANGED
@@ -41,6 +41,76 @@ Interactive setup is still available when running the CLI directly:
41
41
  bpmax-cli setup
42
42
  ```
43
43
 
44
+ ## BPMAX web URLs
45
+
46
+ Generate common in-system URLs from the active profile origin and workspace:
47
+
48
+ ```bash
49
+ bpmax-cli url workspace
50
+ bpmax-cli url project-list
51
+ bpmax-cli url project-detail 13094
52
+ bpmax-cli url project-step 13094 --step-id 15687 --format json
53
+ ```
54
+
55
+ The default `pretty` output prints only the URL. Use `--format json` for structured fields such as `kind`, `profile`, `origin`, `workspace`, `path`, and `url`.
56
+
57
+ Project detail and create commands also attach a `url` field when the returned object includes a project id.
58
+
59
+ ## Profile recipes
60
+
61
+ Profile recipes are local, profile-scoped playbooks for environment-specific BPMAX operations. They live outside project repositories under:
62
+
63
+ ```text
64
+ ~/.bpmax/profiles/<profile>/recipes/<workspace>/<recipe-name>/
65
+ ```
66
+
67
+ Create a scaffold for the active profile and workspace:
68
+
69
+ ```bash
70
+ bpmax-cli recipe init create-store-staff --title "创建店员"
71
+ ```
72
+
73
+ List, inspect, or locate recipes:
74
+
75
+ ```bash
76
+ bpmax-cli recipe list --format table
77
+ bpmax-cli recipe show create-store-staff --format json
78
+ bpmax-cli recipe path create-store-staff
79
+ ```
80
+
81
+ Each recipe directory contains `recipe.json`, `README.md`, and `payload.json`. `recipe.json` is the machine-readable definition. `payload.json` can use `{{variable}}` placeholders, and `@payload.json` in `command.argv` means the file is read relative to the recipe directory, rendered, and passed as that argument value.
82
+
83
+ Example `recipe.json`:
84
+
85
+ ```json
86
+ {
87
+ "version": 1,
88
+ "name": "create-store-staff",
89
+ "title": "创建店员",
90
+ "description": "发起门店人员管理流程",
91
+ "workspace": "store_mgr",
92
+ "variables": [
93
+ { "name": "name", "required": true },
94
+ { "name": "phone", "required": true }
95
+ ],
96
+ "command": {
97
+ "argv": ["project", "create", "--body", "@payload.json", "--format", "json"],
98
+ "mutating": true
99
+ }
100
+ }
101
+ ```
102
+
103
+ Run a recipe with explicit variables. Mutating recipes require `--yes`:
104
+
105
+ ```bash
106
+ bpmax-cli recipe run create-store-staff \
107
+ --yes \
108
+ --var name=杨小小 \
109
+ --vars '{"phone":"18211223344","store_group_id":"817","store_name":"TMS测试门店"}'
110
+ ```
111
+
112
+ Recipe execution is intentionally limited to bpmax-cli subcommands. It does not run arbitrary shell commands. `--profile <profile>` is injected into the child command when the recipe did not already specify it.
113
+
44
114
  ## Skill distribution
45
115
 
46
116
  The project-owned skills live under `skills/`.