bpmax-cli 0.1.6 → 0.1.8

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,61 @@ Interactive setup is still available when running the CLI directly:
41
41
  bpmax-cli setup
42
42
  ```
43
43
 
44
+ ## Profile recipes
45
+
46
+ Profile recipes are local, profile-scoped playbooks for environment-specific BPMAX operations. They live outside project repositories under:
47
+
48
+ ```text
49
+ ~/.bpmax/profiles/<profile>/recipes/<workspace>/<recipe-name>/
50
+ ```
51
+
52
+ Create a scaffold for the active profile and workspace:
53
+
54
+ ```bash
55
+ bpmax-cli recipe init create-store-staff --title "创建店员"
56
+ ```
57
+
58
+ List, inspect, or locate recipes:
59
+
60
+ ```bash
61
+ bpmax-cli recipe list --format table
62
+ bpmax-cli recipe show create-store-staff --format json
63
+ bpmax-cli recipe path create-store-staff
64
+ ```
65
+
66
+ 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.
67
+
68
+ Example `recipe.json`:
69
+
70
+ ```json
71
+ {
72
+ "version": 1,
73
+ "name": "create-store-staff",
74
+ "title": "创建店员",
75
+ "description": "发起门店人员管理流程",
76
+ "workspace": "store_mgr",
77
+ "variables": [
78
+ { "name": "name", "required": true },
79
+ { "name": "phone", "required": true }
80
+ ],
81
+ "command": {
82
+ "argv": ["project", "create", "--body", "@payload.json", "--format", "json"],
83
+ "mutating": true
84
+ }
85
+ }
86
+ ```
87
+
88
+ Run a recipe with explicit variables. Mutating recipes require `--yes`:
89
+
90
+ ```bash
91
+ bpmax-cli recipe run create-store-staff \
92
+ --yes \
93
+ --var name=杨小小 \
94
+ --vars '{"phone":"18211223344","store_group_id":"817","store_name":"TMS测试门店"}'
95
+ ```
96
+
97
+ 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.
98
+
44
99
  ## Skill distribution
45
100
 
46
101
  The project-owned skills live under `skills/`.