@nevermined-io/cli 1.0.9 → 1.0.10

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
@@ -44,19 +44,19 @@ Configuration is saved to `~/.config/nvm/config.json`.
44
44
  ### 2. List Plans
45
45
 
46
46
  ```bash
47
- nvm plans list
47
+ nvm plans get-plans
48
48
  ```
49
49
 
50
50
  ### 3. Get Plan Details
51
51
 
52
52
  ```bash
53
- nvm plans get did:nvm:abc123
53
+ nvm plans get-plan did:nvm:abc123
54
54
  ```
55
55
 
56
56
  ### 4. Get X402 Access Token
57
57
 
58
58
  ```bash
59
- nvm x402 get-token did:nvm:plan123
59
+ nvm x402token get-x402-access-token did:nvm:plan123
60
60
  ```
61
61
 
62
62
  ## Usage
@@ -94,7 +94,7 @@ Support for multiple profiles:
94
94
  nvm config init --profile production
95
95
 
96
96
  # Use a specific profile
97
- nvm plans list --profile production
97
+ nvm plans get-plans --profile production
98
98
 
99
99
  # Show all profiles
100
100
  nvm config show --all
@@ -106,13 +106,13 @@ All commands support multiple output formats:
106
106
 
107
107
  ```bash
108
108
  # Table format (default)
109
- nvm plans list
109
+ nvm plans get-plans
110
110
 
111
111
  # JSON format
112
- nvm plans list --format json
112
+ nvm plans get-plans --format json
113
113
 
114
114
  # Quiet mode (no output, useful for scripts)
115
- nvm plans list --format quiet
115
+ nvm plans get-plans --format quiet
116
116
  ```
117
117
 
118
118
  ## Commands
@@ -125,19 +125,28 @@ nvm plans list --format quiet
125
125
 
126
126
  ### Plan Commands
127
127
 
128
- - `nvm plans list` - List all payment plans
129
- - `nvm plans get <planId>` - Get details of a specific plan
130
- - `nvm plans register` - Register a new payment plan (see help for options)
128
+ - `nvm plans get-plans` - List all payment plans
129
+ - `nvm plans get-plan <planId>` - Get details of a specific plan
130
+ - `nvm plans get-plan-balance <planId>` - Get plan balance for a subscriber
131
+ - `nvm plans register-plan` - Register a new payment plan (flexible)
132
+ - `nvm plans register-credits-plan` - Register a credits-based plan
133
+ - `nvm plans register-time-plan` - Register a time-based plan
134
+ - `nvm plans register-credits-trial-plan` - Register a trial credits plan
135
+ - `nvm plans register-time-trial-plan` - Register a trial time plan
131
136
 
132
137
  ### Agent Commands
133
138
 
134
- - `nvm agents list` - List all AI agents
135
- - `nvm agents get <agentId>` - Get details of a specific agent
136
- - `nvm agents register` - Register a new AI agent
139
+ - `nvm agents get-agent <agentId>` - Get details of a specific agent
140
+ - `nvm agents get-agent-plans <agentId>` - Get plans associated with an agent
141
+ - `nvm agents register-agent` - Register a new AI agent
142
+ - `nvm agents register-agent-and-plan` - Register an agent with a plan
143
+ - `nvm agents add-plan-to-agent <planId>` - Associate a plan with an agent
144
+ - `nvm agents remove-plan-from-agent <planId>` - Remove a plan from an agent
145
+ - `nvm agents update-agent-metadata <agentId>` - Update agent metadata
137
146
 
138
147
  ### X402 Commands
139
148
 
140
- - `nvm x402 get-token <planId>` - Get an X402 access token for a plan
149
+ - `nvm x402token get-x402-access-token <planId>` - Get an X402 access token for a plan
141
150
 
142
151
  ## Examples
143
152
 
@@ -148,20 +157,20 @@ nvm plans list --format quiet
148
157
  nvm config init
149
158
 
150
159
  # Get X402 token for a plan
151
- nvm x402 get-token did:nvm:abc123 --format json
160
+ nvm x402token get-x402-access-token did:nvm:abc123 --format json
152
161
 
153
162
  # Get plan details
154
- nvm plans get did:nvm:abc123
163
+ nvm plans get-plan did:nvm:abc123
155
164
  ```
156
165
 
157
166
  ### Using JSON Config Files
158
167
 
159
168
  ```bash
160
169
  # Register plan from JSON config
161
- nvm plans register --config plan-config.json
170
+ nvm plans register-plan --config plan-config.json
162
171
 
163
172
  # Register agent from JSON config
164
- nvm agents register did:nvm:plan123 --config agent-config.json
173
+ nvm agents register-agent did:nvm:plan123 --config agent-config.json
165
174
  ```
166
175
 
167
176
  ## Development
@@ -741,12 +741,12 @@
741
741
  "show.js"
742
742
  ]
743
743
  },
744
- "organizations:connect-stripe-account": {
744
+ "facilitator:settle-permissions": {
745
745
  "aliases": [],
746
746
  "args": {},
747
- "description": "Connect user with Stripe",
747
+ "description": "Settle (burn) credits from a subscriber's payment plan. This method executes the actual credit consumption, burning the specified number of credits from the subscriber's balance. If the subscriber doesn't have enough credits, it will attempt to order more before settling. The planId and subscriberAddress are extracted from the x402AccessToken.",
748
748
  "examples": [
749
- "$ nvm organizations connect-stripe-account"
749
+ "$ nvm facilitator settle-permissions"
750
750
  ],
751
751
  "flags": {
752
752
  "profile": {
@@ -779,22 +779,9 @@
779
779
  "allowNo": false,
780
780
  "type": "boolean"
781
781
  },
782
- "user-email": {
783
- "name": "user-email",
784
- "required": true,
785
- "hasDynamicHelp": false,
786
- "multiple": false,
787
- "type": "option"
788
- },
789
- "user-country-code": {
790
- "name": "user-country-code",
791
- "required": true,
792
- "hasDynamicHelp": false,
793
- "multiple": false,
794
- "type": "option"
795
- },
796
- "return-url": {
797
- "name": "return-url",
782
+ "params": {
783
+ "description": "params as JSON string",
784
+ "name": "params",
798
785
  "required": true,
799
786
  "hasDynamicHelp": false,
800
787
  "multiple": false,
@@ -803,7 +790,7 @@
803
790
  },
804
791
  "hasDynamicHelp": false,
805
792
  "hiddenAliases": [],
806
- "id": "organizations:connect-stripe-account",
793
+ "id": "facilitator:settle-permissions",
807
794
  "pluginAlias": "@nevermined-io/cli",
808
795
  "pluginName": "@nevermined-io/cli",
809
796
  "pluginType": "core",
@@ -813,22 +800,16 @@
813
800
  "relativePath": [
814
801
  "dist",
815
802
  "commands",
816
- "organizations",
817
- "connect-stripe-account.js"
803
+ "facilitator",
804
+ "settle-permissions.js"
818
805
  ]
819
806
  },
820
- "organizations:create-member": {
807
+ "facilitator:verify-permissions": {
821
808
  "aliases": [],
822
- "args": {
823
- "user": {
824
- "description": "user identifier",
825
- "name": "user",
826
- "required": true
827
- }
828
- },
829
- "description": "Create a new member in the organization",
809
+ "args": {},
810
+ "description": "Verify if a subscriber has permission to use credits from a payment plan. This method simulates the credit usage without actually burning credits, checking if the subscriber has sufficient balance and permissions. The planId and subscriberAddress are extracted from the x402AccessToken.",
830
811
  "examples": [
831
- "$ nvm organizations create-member <userId>"
812
+ "$ nvm facilitator verify-permissions"
832
813
  ],
833
814
  "flags": {
834
815
  "profile": {
@@ -861,16 +842,10 @@
861
842
  "allowNo": false,
862
843
  "type": "boolean"
863
844
  },
864
- "user-email": {
865
- "name": "user-email",
866
- "required": false,
867
- "hasDynamicHelp": false,
868
- "multiple": false,
869
- "type": "option"
870
- },
871
- "user-role": {
872
- "name": "user-role",
873
- "required": false,
845
+ "params": {
846
+ "description": "params as JSON string",
847
+ "name": "params",
848
+ "required": true,
874
849
  "hasDynamicHelp": false,
875
850
  "multiple": false,
876
851
  "type": "option"
@@ -878,7 +853,7 @@
878
853
  },
879
854
  "hasDynamicHelp": false,
880
855
  "hiddenAliases": [],
881
- "id": "organizations:create-member",
856
+ "id": "facilitator:verify-permissions",
882
857
  "pluginAlias": "@nevermined-io/cli",
883
858
  "pluginName": "@nevermined-io/cli",
884
859
  "pluginType": "core",
@@ -888,16 +863,16 @@
888
863
  "relativePath": [
889
864
  "dist",
890
865
  "commands",
891
- "organizations",
892
- "create-member.js"
866
+ "facilitator",
867
+ "verify-permissions.js"
893
868
  ]
894
869
  },
895
- "organizations:get-members": {
870
+ "organizations:connect-stripe-account": {
896
871
  "aliases": [],
897
872
  "args": {},
898
- "description": "OrganizationsAPI getMembers",
873
+ "description": "Connect user with Stripe",
899
874
  "examples": [
900
- "$ nvm organizations get-members"
875
+ "$ nvm organizations connect-stripe-account"
901
876
  ],
902
877
  "flags": {
903
878
  "profile": {
@@ -930,30 +905,23 @@
930
905
  "allowNo": false,
931
906
  "type": "boolean"
932
907
  },
933
- "role": {
934
- "name": "role",
935
- "required": false,
936
- "hasDynamicHelp": false,
937
- "multiple": false,
938
- "type": "option"
939
- },
940
- "is-active": {
941
- "name": "is-active",
942
- "required": false,
908
+ "user-email": {
909
+ "name": "user-email",
910
+ "required": true,
943
911
  "hasDynamicHelp": false,
944
912
  "multiple": false,
945
913
  "type": "option"
946
914
  },
947
- "page": {
948
- "name": "page",
949
- "required": false,
915
+ "user-country-code": {
916
+ "name": "user-country-code",
917
+ "required": true,
950
918
  "hasDynamicHelp": false,
951
919
  "multiple": false,
952
920
  "type": "option"
953
921
  },
954
- "offset": {
955
- "name": "offset",
956
- "required": false,
922
+ "return-url": {
923
+ "name": "return-url",
924
+ "required": true,
957
925
  "hasDynamicHelp": false,
958
926
  "multiple": false,
959
927
  "type": "option"
@@ -961,7 +929,7 @@
961
929
  },
962
930
  "hasDynamicHelp": false,
963
931
  "hiddenAliases": [],
964
- "id": "organizations:get-members",
932
+ "id": "organizations:connect-stripe-account",
965
933
  "pluginAlias": "@nevermined-io/cli",
966
934
  "pluginName": "@nevermined-io/cli",
967
935
  "pluginType": "core",
@@ -972,15 +940,21 @@
972
940
  "dist",
973
941
  "commands",
974
942
  "organizations",
975
- "get-members.js"
943
+ "connect-stripe-account.js"
976
944
  ]
977
945
  },
978
- "facilitator:settle-permissions": {
946
+ "organizations:create-member": {
979
947
  "aliases": [],
980
- "args": {},
981
- "description": "Settle (burn) credits from a subscriber's payment plan. This method executes the actual credit consumption, burning the specified number of credits from the subscriber's balance. If the subscriber doesn't have enough credits, it will attempt to order more before settling. The planId and subscriberAddress are extracted from the x402AccessToken.",
948
+ "args": {
949
+ "user": {
950
+ "description": "user identifier",
951
+ "name": "user",
952
+ "required": true
953
+ }
954
+ },
955
+ "description": "Create a new member in the organization",
982
956
  "examples": [
983
- "$ nvm facilitator settle-permissions"
957
+ "$ nvm organizations create-member <userId>"
984
958
  ],
985
959
  "flags": {
986
960
  "profile": {
@@ -1013,10 +987,16 @@
1013
987
  "allowNo": false,
1014
988
  "type": "boolean"
1015
989
  },
1016
- "params": {
1017
- "description": "params as JSON string",
1018
- "name": "params",
1019
- "required": true,
990
+ "user-email": {
991
+ "name": "user-email",
992
+ "required": false,
993
+ "hasDynamicHelp": false,
994
+ "multiple": false,
995
+ "type": "option"
996
+ },
997
+ "user-role": {
998
+ "name": "user-role",
999
+ "required": false,
1020
1000
  "hasDynamicHelp": false,
1021
1001
  "multiple": false,
1022
1002
  "type": "option"
@@ -1024,7 +1004,7 @@
1024
1004
  },
1025
1005
  "hasDynamicHelp": false,
1026
1006
  "hiddenAliases": [],
1027
- "id": "facilitator:settle-permissions",
1007
+ "id": "organizations:create-member",
1028
1008
  "pluginAlias": "@nevermined-io/cli",
1029
1009
  "pluginName": "@nevermined-io/cli",
1030
1010
  "pluginType": "core",
@@ -1034,16 +1014,16 @@
1034
1014
  "relativePath": [
1035
1015
  "dist",
1036
1016
  "commands",
1037
- "facilitator",
1038
- "settle-permissions.js"
1017
+ "organizations",
1018
+ "create-member.js"
1039
1019
  ]
1040
1020
  },
1041
- "facilitator:verify-permissions": {
1021
+ "organizations:get-members": {
1042
1022
  "aliases": [],
1043
1023
  "args": {},
1044
- "description": "Verify if a subscriber has permission to use credits from a payment plan. This method simulates the credit usage without actually burning credits, checking if the subscriber has sufficient balance and permissions. The planId and subscriberAddress are extracted from the x402AccessToken.",
1024
+ "description": "OrganizationsAPI getMembers",
1045
1025
  "examples": [
1046
- "$ nvm facilitator verify-permissions"
1026
+ "$ nvm organizations get-members"
1047
1027
  ],
1048
1028
  "flags": {
1049
1029
  "profile": {
@@ -1076,10 +1056,30 @@
1076
1056
  "allowNo": false,
1077
1057
  "type": "boolean"
1078
1058
  },
1079
- "params": {
1080
- "description": "params as JSON string",
1081
- "name": "params",
1082
- "required": true,
1059
+ "role": {
1060
+ "name": "role",
1061
+ "required": false,
1062
+ "hasDynamicHelp": false,
1063
+ "multiple": false,
1064
+ "type": "option"
1065
+ },
1066
+ "is-active": {
1067
+ "name": "is-active",
1068
+ "required": false,
1069
+ "hasDynamicHelp": false,
1070
+ "multiple": false,
1071
+ "type": "option"
1072
+ },
1073
+ "page": {
1074
+ "name": "page",
1075
+ "required": false,
1076
+ "hasDynamicHelp": false,
1077
+ "multiple": false,
1078
+ "type": "option"
1079
+ },
1080
+ "offset": {
1081
+ "name": "offset",
1082
+ "required": false,
1083
1083
  "hasDynamicHelp": false,
1084
1084
  "multiple": false,
1085
1085
  "type": "option"
@@ -1087,7 +1087,7 @@
1087
1087
  },
1088
1088
  "hasDynamicHelp": false,
1089
1089
  "hiddenAliases": [],
1090
- "id": "facilitator:verify-permissions",
1090
+ "id": "organizations:get-members",
1091
1091
  "pluginAlias": "@nevermined-io/cli",
1092
1092
  "pluginName": "@nevermined-io/cli",
1093
1093
  "pluginType": "core",
@@ -1097,8 +1097,8 @@
1097
1097
  "relativePath": [
1098
1098
  "dist",
1099
1099
  "commands",
1100
- "facilitator",
1101
- "verify-permissions.js"
1100
+ "organizations",
1101
+ "get-members.js"
1102
1102
  ]
1103
1103
  },
1104
1104
  "x402token:get-x402-access-token": {
@@ -3131,5 +3131,5 @@
3131
3131
  ]
3132
3132
  }
3133
3133
  },
3134
- "version": "1.0.9"
3134
+ "version": "1.0.10"
3135
3135
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nevermined-io/cli",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "CLI for Nevermined Payments SDK",
5
5
  "author": "Nevermined AG",
6
6
  "license": "Apache-2.0",