hereya-cli 0.77.5 → 0.78.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 CHANGED
@@ -21,7 +21,7 @@ $ npm install -g hereya-cli
21
21
  $ hereya COMMAND
22
22
  running command...
23
23
  $ hereya (--version)
24
- hereya-cli/0.77.5 linux-x64 node-v24.14.0
24
+ hereya-cli/0.78.0 linux-x64 node-v24.14.0
25
25
  $ hereya --help [COMMAND]
26
26
  USAGE
27
27
  $ hereya COMMAND
@@ -32,6 +32,7 @@ USAGE
32
32
  <!-- commands -->
33
33
  * [`hereya add PACKAGE`](#hereya-add-package)
34
34
  * [`hereya bootstrap INFRASTRUCTURETYPE`](#hereya-bootstrap-infrastructuretype)
35
+ * [`hereya clone PROJECT`](#hereya-clone-project)
35
36
  * [`hereya config export-backend [FILE]`](#hereya-config-export-backend-file)
36
37
  * [`hereya config get-backend`](#hereya-config-get-backend)
37
38
  * [`hereya config import-backend FILE`](#hereya-config-import-backend-file)
@@ -118,7 +119,7 @@ EXAMPLES
118
119
  $ hereya add cloudy/docker_postgres
119
120
  ```
120
121
 
121
- _See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/add/index.ts)_
122
+ _See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/add/index.ts)_
122
123
 
123
124
  ## `hereya bootstrap INFRASTRUCTURETYPE`
124
125
 
@@ -143,7 +144,32 @@ EXAMPLES
143
144
  $ hereya bootstrap local
144
145
  ```
145
146
 
146
- _See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/bootstrap/index.ts)_
147
+ _See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/bootstrap/index.ts)_
148
+
149
+ ## `hereya clone PROJECT`
150
+
151
+ Clone an existing template-based project to the local machine.
152
+
153
+ ```
154
+ USAGE
155
+ $ hereya clone PROJECT [--chdir <value>]
156
+
157
+ ARGUMENTS
158
+ PROJECT project name
159
+
160
+ FLAGS
161
+ --chdir=<value> directory to clone into
162
+
163
+ DESCRIPTION
164
+ Clone an existing template-based project to the local machine.
165
+
166
+ EXAMPLES
167
+ $ hereya clone myProject
168
+
169
+ $ hereya clone myProject --chdir=./myProject
170
+ ```
171
+
172
+ _See code: [src/commands/clone/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/clone/index.ts)_
147
173
 
148
174
  ## `hereya config export-backend [FILE]`
149
175
 
@@ -165,7 +191,7 @@ EXAMPLES
165
191
  $ hereya config export-backend ./path/to/export.json
166
192
  ```
167
193
 
168
- _See code: [src/commands/config/export-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/config/export-backend/index.ts)_
194
+ _See code: [src/commands/config/export-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/config/export-backend/index.ts)_
169
195
 
170
196
  ## `hereya config get-backend`
171
197
 
@@ -182,7 +208,7 @@ EXAMPLES
182
208
  $ hereya config get-backend
183
209
  ```
184
210
 
185
- _See code: [src/commands/config/get-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/config/get-backend/index.ts)_
211
+ _See code: [src/commands/config/get-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/config/get-backend/index.ts)_
186
212
 
187
213
  ## `hereya config import-backend FILE`
188
214
 
@@ -202,7 +228,7 @@ EXAMPLES
202
228
  $ hereya config import-backend ./path/to/cloud-backend.json
203
229
  ```
204
230
 
205
- _See code: [src/commands/config/import-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/config/import-backend/index.ts)_
231
+ _See code: [src/commands/config/import-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/config/import-backend/index.ts)_
206
232
 
207
233
  ## `hereya config use-backend TYPE`
208
234
 
@@ -224,7 +250,7 @@ EXAMPLES
224
250
  $ hereya config use-backend local
225
251
  ```
226
252
 
227
- _See code: [src/commands/config/use-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/config/use-backend/index.ts)_
253
+ _See code: [src/commands/config/use-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/config/use-backend/index.ts)_
228
254
 
229
255
  ## `hereya delete-state`
230
256
 
@@ -250,7 +276,7 @@ EXAMPLES
250
276
  $ hereya delete-state --workspace staging
251
277
  ```
252
278
 
253
- _See code: [src/commands/delete-state/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/delete-state/index.ts)_
279
+ _See code: [src/commands/delete-state/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/delete-state/index.ts)_
254
280
 
255
281
  ## `hereya deploy`
256
282
 
@@ -276,7 +302,7 @@ EXAMPLES
276
302
  $ hereya deploy
277
303
  ```
278
304
 
279
- _See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/deploy/index.ts)_
305
+ _See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/deploy/index.ts)_
280
306
 
281
307
  ## `hereya devenv config`
282
308
 
@@ -296,7 +322,7 @@ EXAMPLES
296
322
  $ hereya devenv config -w my-workspace
297
323
  ```
298
324
 
299
- _See code: [src/commands/devenv/config/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/devenv/config/index.ts)_
325
+ _See code: [src/commands/devenv/config/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/devenv/config/index.ts)_
300
326
 
301
327
  ## `hereya devenv install`
302
328
 
@@ -321,7 +347,7 @@ EXAMPLES
321
347
  $ hereya devenv install -w my-workspace -p instanceType=t3.large
322
348
  ```
323
349
 
324
- _See code: [src/commands/devenv/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/devenv/install/index.ts)_
350
+ _See code: [src/commands/devenv/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/devenv/install/index.ts)_
325
351
 
326
352
  ## `hereya devenv project init PROJECT`
327
353
 
@@ -353,7 +379,7 @@ EXAMPLES
353
379
  $ hereya devenv project init my-app -w my-workspace -t acme/node-starter -p region=us-east-1
354
380
  ```
355
381
 
356
- _See code: [src/commands/devenv/project/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/devenv/project/init/index.ts)_
382
+ _See code: [src/commands/devenv/project/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/devenv/project/init/index.ts)_
357
383
 
358
384
  ## `hereya devenv project uninit PROJECT`
359
385
 
@@ -379,7 +405,7 @@ EXAMPLES
379
405
  $ hereya devenv project uninit my-app -w my-workspace --force
380
406
  ```
381
407
 
382
- _See code: [src/commands/devenv/project/uninit/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/devenv/project/uninit/index.ts)_
408
+ _See code: [src/commands/devenv/project/uninit/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/devenv/project/uninit/index.ts)_
383
409
 
384
410
  ## `hereya devenv ssh`
385
411
 
@@ -399,7 +425,7 @@ EXAMPLES
399
425
  $ hereya devenv ssh -w my-workspace
400
426
  ```
401
427
 
402
- _See code: [src/commands/devenv/ssh/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/devenv/ssh/index.ts)_
428
+ _See code: [src/commands/devenv/ssh/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/devenv/ssh/index.ts)_
403
429
 
404
430
  ## `hereya devenv uninstall`
405
431
 
@@ -420,7 +446,7 @@ EXAMPLES
420
446
  $ hereya devenv uninstall -w my-workspace
421
447
  ```
422
448
 
423
- _See code: [src/commands/devenv/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/devenv/uninstall/index.ts)_
449
+ _See code: [src/commands/devenv/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/devenv/uninstall/index.ts)_
424
450
 
425
451
  ## `hereya doc PACKAGE`
426
452
 
@@ -453,7 +479,7 @@ EXAMPLES
453
479
  $ hereya doc my-package --no-doc
454
480
  ```
455
481
 
456
- _See code: [src/commands/doc/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/doc/index.ts)_
482
+ _See code: [src/commands/doc/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/doc/index.ts)_
457
483
 
458
484
  ## `hereya docker run IMAGE`
459
485
 
@@ -484,7 +510,7 @@ EXAMPLES
484
510
  $ hereya docker run myapp:latest -- --rm -v ./data:/data
485
511
  ```
486
512
 
487
- _See code: [src/commands/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/docker/run/index.ts)_
513
+ _See code: [src/commands/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/docker/run/index.ts)_
488
514
 
489
515
  ## `hereya down`
490
516
 
@@ -511,7 +537,7 @@ EXAMPLES
511
537
  $ hereya down
512
538
  ```
513
539
 
514
- _See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/down/index.ts)_
540
+ _See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/down/index.ts)_
515
541
 
516
542
  ## `hereya env [NAME]`
517
543
 
@@ -542,7 +568,7 @@ EXAMPLES
542
568
  $ hereya env -w dev -l
543
569
  ```
544
570
 
545
- _See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/env/index.ts)_
571
+ _See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/env/index.ts)_
546
572
 
547
573
  ## `hereya env set [NAME]`
548
574
 
@@ -569,7 +595,7 @@ EXAMPLES
569
595
  $ hereya env set FOO -v bar -w dev
570
596
  ```
571
597
 
572
- _See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/env/set/index.ts)_
598
+ _See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/env/set/index.ts)_
573
599
 
574
600
  ## `hereya executor start`
575
601
 
@@ -602,7 +628,7 @@ EXAMPLES
602
628
  HEREYA_TOKEN=<token> HEREYA_CLOUD_URL=https://my-cloud.example.com hereya executor start -w my-workspace
603
629
  ```
604
630
 
605
- _See code: [src/commands/executor/start/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/executor/start/index.ts)_
631
+ _See code: [src/commands/executor/start/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/executor/start/index.ts)_
606
632
 
607
633
  ## `hereya flow add PACKAGE`
608
634
 
@@ -640,7 +666,7 @@ EXAMPLES
640
666
  $ hereya flow add cloudy/docker_postgres -p DB_NAME=mydb -p DB_USER=admin
641
667
  ```
642
668
 
643
- _See code: [src/commands/flow/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/flow/add/index.ts)_
669
+ _See code: [src/commands/flow/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/flow/add/index.ts)_
644
670
 
645
671
  ## `hereya flow docker run IMAGE`
646
672
 
@@ -670,7 +696,7 @@ EXAMPLES
670
696
  $ hereya flow docker run --pin myapp:latest -- --rm
671
697
  ```
672
698
 
673
- _See code: [src/commands/flow/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/flow/docker/run/index.ts)_
699
+ _See code: [src/commands/flow/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/flow/docker/run/index.ts)_
674
700
 
675
701
  ## `hereya flow down`
676
702
 
@@ -704,7 +730,7 @@ EXAMPLES
704
730
  $ hereya flow down --pin
705
731
  ```
706
732
 
707
- _See code: [src/commands/flow/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/flow/down/index.ts)_
733
+ _See code: [src/commands/flow/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/flow/down/index.ts)_
708
734
 
709
735
  ## `hereya flow env [NAME]`
710
736
 
@@ -738,7 +764,7 @@ EXAMPLES
738
764
  $ hereya flow env -l
739
765
  ```
740
766
 
741
- _See code: [src/commands/flow/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/flow/env/index.ts)_
767
+ _See code: [src/commands/flow/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/flow/env/index.ts)_
742
768
 
743
769
  ## `hereya flow provid PACKAGE`
744
770
 
@@ -767,7 +793,7 @@ EXAMPLES
767
793
  $ hereya flow provid hereya/postgres --pin
768
794
  ```
769
795
 
770
- _See code: [src/commands/flow/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/flow/provid/index.ts)_
796
+ _See code: [src/commands/flow/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/flow/provid/index.ts)_
771
797
 
772
798
  ## `hereya flow remove PACKAGE`
773
799
 
@@ -797,7 +823,7 @@ EXAMPLES
797
823
  $ hereya flow remove cloudy/docker_postgres --profile staging
798
824
  ```
799
825
 
800
- _See code: [src/commands/flow/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/flow/remove/index.ts)_
826
+ _See code: [src/commands/flow/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/flow/remove/index.ts)_
801
827
 
802
828
  ## `hereya flow run CMD`
803
829
 
@@ -826,7 +852,7 @@ EXAMPLES
826
852
  $ hereya flow run --pin -- npm test
827
853
  ```
828
854
 
829
- _See code: [src/commands/flow/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/flow/run/index.ts)_
855
+ _See code: [src/commands/flow/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/flow/run/index.ts)_
830
856
 
831
857
  ## `hereya flow up`
832
858
 
@@ -860,7 +886,7 @@ EXAMPLES
860
886
  $ hereya flow up --pin
861
887
  ```
862
888
 
863
- _See code: [src/commands/flow/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/flow/up/index.ts)_
889
+ _See code: [src/commands/flow/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/flow/up/index.ts)_
864
890
 
865
891
  ## `hereya help [COMMAND]`
866
892
 
@@ -917,7 +943,7 @@ EXAMPLES
917
943
  $ hereya import org/my-package -f state.tfstate -w my-workspace
918
944
  ```
919
945
 
920
- _See code: [src/commands/import/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/import/index.ts)_
946
+ _See code: [src/commands/import/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/import/index.ts)_
921
947
 
922
948
  ## `hereya init PROJECT`
923
949
 
@@ -951,7 +977,7 @@ EXAMPLES
951
977
  $ hereya init myProject -w=dev -t=acme/node-starter -d=prod -p region=us-east-1
952
978
  ```
953
979
 
954
- _See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/init/index.ts)_
980
+ _See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/init/index.ts)_
955
981
 
956
982
  ## `hereya login [URL]`
957
983
 
@@ -980,7 +1006,7 @@ EXAMPLES
980
1006
  $ hereya login --token=your-token https://cloud.hereya.dev
981
1007
  ```
982
1008
 
983
- _See code: [src/commands/login/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/login/index.ts)_
1009
+ _See code: [src/commands/login/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/login/index.ts)_
984
1010
 
985
1011
  ## `hereya logout`
986
1012
 
@@ -997,7 +1023,7 @@ EXAMPLES
997
1023
  $ hereya logout
998
1024
  ```
999
1025
 
1000
- _See code: [src/commands/logout/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/logout/index.ts)_
1026
+ _See code: [src/commands/logout/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/logout/index.ts)_
1001
1027
 
1002
1028
  ## `hereya provid PACKAGE`
1003
1029
 
@@ -1025,7 +1051,7 @@ EXAMPLES
1025
1051
  $ hereya provid hereya/postgres --workspace staging
1026
1052
  ```
1027
1053
 
1028
- _See code: [src/commands/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/provid/index.ts)_
1054
+ _See code: [src/commands/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/provid/index.ts)_
1029
1055
 
1030
1056
  ## `hereya publish`
1031
1057
 
@@ -1048,7 +1074,7 @@ EXAMPLES
1048
1074
  $ hereya publish --chdir=/path/to/package
1049
1075
  ```
1050
1076
 
1051
- _See code: [src/commands/publish/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/publish/index.ts)_
1077
+ _See code: [src/commands/publish/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/publish/index.ts)_
1052
1078
 
1053
1079
  ## `hereya remove PACKAGE`
1054
1080
 
@@ -1076,7 +1102,7 @@ EXAMPLES
1076
1102
  $ hereya remove cloudy/docker_postgres
1077
1103
  ```
1078
1104
 
1079
- _See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/remove/index.ts)_
1105
+ _See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/remove/index.ts)_
1080
1106
 
1081
1107
  ## `hereya run CMD`
1082
1108
 
@@ -1102,7 +1128,7 @@ EXAMPLES
1102
1128
  $ hereya run -w uat -- node index.js
1103
1129
  ```
1104
1130
 
1105
- _See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/run/index.ts)_
1131
+ _See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/run/index.ts)_
1106
1132
 
1107
1133
  ## `hereya search QUERY`
1108
1134
 
@@ -1133,7 +1159,7 @@ EXAMPLES
1133
1159
  $ hereya search database --json
1134
1160
  ```
1135
1161
 
1136
- _See code: [src/commands/search/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/search/index.ts)_
1162
+ _See code: [src/commands/search/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/search/index.ts)_
1137
1163
 
1138
1164
  ## `hereya unbootstrap INFRASTRUCTURETYPE`
1139
1165
 
@@ -1158,7 +1184,7 @@ EXAMPLES
1158
1184
  $ hereya unbootstrap local
1159
1185
  ```
1160
1186
 
1161
- _See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/unbootstrap/index.ts)_
1187
+ _See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/unbootstrap/index.ts)_
1162
1188
 
1163
1189
  ## `hereya undeploy`
1164
1190
 
@@ -1184,7 +1210,7 @@ EXAMPLES
1184
1210
  $ hereya undeploy
1185
1211
  ```
1186
1212
 
1187
- _See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/undeploy/index.ts)_
1213
+ _See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/undeploy/index.ts)_
1188
1214
 
1189
1215
  ## `hereya uninit PROJECT`
1190
1216
 
@@ -1212,7 +1238,7 @@ EXAMPLES
1212
1238
  $ hereya uninit myProject -w dev -p prodWorkspace=prod
1213
1239
  ```
1214
1240
 
1215
- _See code: [src/commands/uninit/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/uninit/index.ts)_
1241
+ _See code: [src/commands/uninit/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/uninit/index.ts)_
1216
1242
 
1217
1243
  ## `hereya up`
1218
1244
 
@@ -1239,7 +1265,7 @@ EXAMPLES
1239
1265
  $ hereya up
1240
1266
  ```
1241
1267
 
1242
- _See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/up/index.ts)_
1268
+ _See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/up/index.ts)_
1243
1269
 
1244
1270
  ## `hereya update [VERSION]`
1245
1271
 
@@ -1261,7 +1287,7 @@ EXAMPLES
1261
1287
  $ hereya update 0.75.0
1262
1288
  ```
1263
1289
 
1264
- _See code: [src/commands/update/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/update/index.ts)_
1290
+ _See code: [src/commands/update/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/update/index.ts)_
1265
1291
 
1266
1292
  ## `hereya workspace create NAME`
1267
1293
 
@@ -1286,7 +1312,7 @@ EXAMPLES
1286
1312
  $ hereya workspace create dev
1287
1313
  ```
1288
1314
 
1289
- _See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/workspace/create/index.ts)_
1315
+ _See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/workspace/create/index.ts)_
1290
1316
 
1291
1317
  ## `hereya workspace delete NAME`
1292
1318
 
@@ -1306,7 +1332,7 @@ EXAMPLES
1306
1332
  $ hereya workspace delete dev
1307
1333
  ```
1308
1334
 
1309
- _See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/workspace/delete/index.ts)_
1335
+ _See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/workspace/delete/index.ts)_
1310
1336
 
1311
1337
  ## `hereya workspace env [NAME]`
1312
1338
 
@@ -1332,7 +1358,7 @@ EXAMPLES
1332
1358
  $ hereya workspace env myEnv -w dev
1333
1359
  ```
1334
1360
 
1335
- _See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/workspace/env/index.ts)_
1361
+ _See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/workspace/env/index.ts)_
1336
1362
 
1337
1363
  ## `hereya workspace env set`
1338
1364
 
@@ -1356,7 +1382,7 @@ EXAMPLES
1356
1382
  $ hereya workspace env set -w my-workspace -n myVar -v my-value -i aws -s
1357
1383
  ```
1358
1384
 
1359
- _See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/workspace/env/set/index.ts)_
1385
+ _See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/workspace/env/set/index.ts)_
1360
1386
 
1361
1387
  ## `hereya workspace env unset`
1362
1388
 
@@ -1377,7 +1403,7 @@ EXAMPLES
1377
1403
  $ hereya workspace env unset -w my-workspace -n myVar
1378
1404
  ```
1379
1405
 
1380
- _See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/workspace/env/unset/index.ts)_
1406
+ _See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/workspace/env/unset/index.ts)_
1381
1407
 
1382
1408
  ## `hereya workspace executor install`
1383
1409
 
@@ -1396,7 +1422,7 @@ DESCRIPTION
1396
1422
  Install a remote executor into a workspace
1397
1423
  ```
1398
1424
 
1399
- _See code: [src/commands/workspace/executor/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/workspace/executor/install/index.ts)_
1425
+ _See code: [src/commands/workspace/executor/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/workspace/executor/install/index.ts)_
1400
1426
 
1401
1427
  ## `hereya workspace executor token`
1402
1428
 
@@ -1413,7 +1439,7 @@ DESCRIPTION
1413
1439
  Generate a workspace-scoped executor token for the remote executor
1414
1440
  ```
1415
1441
 
1416
- _See code: [src/commands/workspace/executor/token/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/workspace/executor/token/index.ts)_
1442
+ _See code: [src/commands/workspace/executor/token/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/workspace/executor/token/index.ts)_
1417
1443
 
1418
1444
  ## `hereya workspace executor uninstall`
1419
1445
 
@@ -1431,7 +1457,7 @@ DESCRIPTION
1431
1457
  Uninstall the remote executor from a workspace
1432
1458
  ```
1433
1459
 
1434
- _See code: [src/commands/workspace/executor/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/workspace/executor/uninstall/index.ts)_
1460
+ _See code: [src/commands/workspace/executor/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/workspace/executor/uninstall/index.ts)_
1435
1461
 
1436
1462
  ## `hereya workspace install PACKAGE`
1437
1463
 
@@ -1458,7 +1484,7 @@ EXAMPLES
1458
1484
  $ hereya workspace install hereya/aws-cognito
1459
1485
  ```
1460
1486
 
1461
- _See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/workspace/install/index.ts)_
1487
+ _See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/workspace/install/index.ts)_
1462
1488
 
1463
1489
  ## `hereya workspace list`
1464
1490
 
@@ -1482,7 +1508,7 @@ EXAMPLES
1482
1508
  $ hereya workspace list --org personal
1483
1509
  ```
1484
1510
 
1485
- _See code: [src/commands/workspace/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/workspace/list/index.ts)_
1511
+ _See code: [src/commands/workspace/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/workspace/list/index.ts)_
1486
1512
 
1487
1513
  ## `hereya workspace set-profile PROFILE`
1488
1514
 
@@ -1506,7 +1532,7 @@ EXAMPLES
1506
1532
  $ hereya workspace set-profile prod-profile -w production
1507
1533
  ```
1508
1534
 
1509
- _See code: [src/commands/workspace/set-profile/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/workspace/set-profile/index.ts)_
1535
+ _See code: [src/commands/workspace/set-profile/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/workspace/set-profile/index.ts)_
1510
1536
 
1511
1537
  ## `hereya workspace uninstall PACKAGE`
1512
1538
 
@@ -1533,5 +1559,5 @@ EXAMPLES
1533
1559
  $ hereya workspace uninstall hereya/aws-cognito
1534
1560
  ```
1535
1561
 
1536
- _See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.77.5/src/commands/workspace/uninstall/index.ts)_
1562
+ _See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.78.0/src/commands/workspace/uninstall/index.ts)_
1537
1563
  <!-- commandsstop -->
@@ -250,6 +250,7 @@ export class CloudBackend {
250
250
  };
251
251
  }
252
252
  return {
253
+ defaultWorkspace: result.defaultWorkspace,
253
254
  found: true,
254
255
  metadata: result.metadata,
255
256
  };
@@ -326,11 +326,12 @@ export type ProjectMetadata = {
326
326
  template: string;
327
327
  };
328
328
  export type GetProjectMetadataOutput = {
329
- found: false;
330
- reason?: string;
331
- } | {
329
+ defaultWorkspace: string;
332
330
  found: true;
333
331
  metadata: ProjectMetadata;
332
+ } | {
333
+ found: false;
334
+ reason?: string;
334
335
  };
335
336
  export type SaveProjectMetadataInput = {
336
337
  metadata: ProjectMetadata;
@@ -0,0 +1,12 @@
1
+ import { Command } from '@oclif/core';
2
+ export default class Clone extends Command {
3
+ static args: {
4
+ project: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
5
+ };
6
+ static description: string;
7
+ static examples: string[];
8
+ static flags: {
9
+ chdir: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
+ };
11
+ run(): Promise<void>;
12
+ }
@@ -0,0 +1,105 @@
1
+ import { Args, Command, Flags } from '@oclif/core';
2
+ import { Listr, ListrLogger, ListrLogLevels } from 'listr2';
3
+ import fs from 'node:fs';
4
+ import path from 'node:path';
5
+ import { getBackend } from '../../backend/index.js';
6
+ import { getExecutorForWorkspace } from '../../executor/context.js';
7
+ import { getConfigManager } from '../../lib/config/index.js';
8
+ import { gitUtils } from '../../lib/git-utils.js';
9
+ import { getLogPath } from '../../lib/log.js';
10
+ export default class Clone extends Command {
11
+ static args = {
12
+ project: Args.string({ description: 'project name', required: true }),
13
+ };
14
+ static description = 'Clone an existing template-based project to the local machine.';
15
+ static examples = [
16
+ '<%= config.bin %> <%= command.id %> myProject',
17
+ '<%= config.bin %> <%= command.id %> myProject --chdir=./myProject',
18
+ ];
19
+ static flags = {
20
+ chdir: Flags.string({
21
+ description: 'directory to clone into',
22
+ required: false,
23
+ }),
24
+ };
25
+ async run() {
26
+ const { args, flags } = await this.parse(Clone);
27
+ const targetDir = flags.chdir || path.join(process.cwd(), args.project.replaceAll('/', '-'));
28
+ if (fs.existsSync(targetDir)) {
29
+ this.error(`Directory ${targetDir} already exists.`);
30
+ }
31
+ const task = new Listr([
32
+ {
33
+ async task(ctx) {
34
+ const backend = await getBackend();
35
+ if (!backend.getProjectMetadata) {
36
+ throw new Error('Clone requires cloud backend. Run `hereya login` first.');
37
+ }
38
+ const metadata$ = await backend.getProjectMetadata({ project: args.project });
39
+ if (!metadata$.found) {
40
+ throw new Error(`Project metadata not found for ${args.project}. Was it initialized with a template?`);
41
+ }
42
+ ctx.metadata = metadata$.metadata;
43
+ ctx.defaultWorkspace = metadata$.defaultWorkspace;
44
+ },
45
+ title: 'Fetching project metadata',
46
+ },
47
+ {
48
+ async task(ctx) {
49
+ const gitEnvToResolve = {};
50
+ for (const [key, value] of Object.entries(ctx.metadata.env || {})) {
51
+ if (key.startsWith('hereyaGit'))
52
+ gitEnvToResolve[key] = value;
53
+ }
54
+ const executor$ = await getExecutorForWorkspace(ctx.defaultWorkspace);
55
+ if (!executor$.success)
56
+ throw new Error(executor$.reason);
57
+ ctx.resolvedGitEnv = await executor$.executor.resolveEnvValues({ env: gitEnvToResolve });
58
+ if (!ctx.resolvedGitEnv.hereyaGitRemoteUrl) {
59
+ throw new Error('Project metadata does not contain hereyaGitRemoteUrl. Was it initialized with a template?');
60
+ }
61
+ },
62
+ title: 'Resolving git credentials',
63
+ },
64
+ {
65
+ async task(ctx) {
66
+ const cloneResult = await gitUtils.cloneWithCredentialHelper({
67
+ gitUrl: ctx.resolvedGitEnv.hereyaGitRemoteUrl,
68
+ hereyaBinPath: process.argv[1],
69
+ password: ctx.resolvedGitEnv.hereyaGitPassword,
70
+ targetDir,
71
+ username: ctx.resolvedGitEnv.hereyaGitUsername,
72
+ });
73
+ if (!cloneResult.success)
74
+ throw new Error(cloneResult.reason);
75
+ },
76
+ title: 'Cloning project repository',
77
+ },
78
+ {
79
+ async task(ctx) {
80
+ const configManager = getConfigManager();
81
+ const existing = await configManager.loadConfig({ projectRootDir: targetDir });
82
+ const config = {
83
+ ...(existing.found ? existing.config : {}),
84
+ project: args.project,
85
+ workspace: ctx.defaultWorkspace,
86
+ };
87
+ await configManager.saveConfig({ config, projectRootDir: targetDir });
88
+ await gitUtils.setupCredentialHelper({ hereyaBinPath: process.argv[1], projectDir: targetDir });
89
+ const backend = await getBackend();
90
+ await backend.saveState(config, ctx.defaultWorkspace);
91
+ },
92
+ title: 'Setting up project',
93
+ },
94
+ ], { concurrent: false });
95
+ try {
96
+ await task.run();
97
+ const myLogger = new ListrLogger({ useIcons: false });
98
+ myLogger.log(ListrLogLevels.COMPLETED, `Project ${args.project} cloned successfully`);
99
+ myLogger.log(ListrLogLevels.COMPLETED, `Project directory: ${targetDir}`);
100
+ }
101
+ catch (error) {
102
+ this.error(`${error.message}\n\nSee ${getLogPath()} for more details`);
103
+ }
104
+ }
105
+ }
@@ -102,6 +102,46 @@
102
102
  "index.js"
103
103
  ]
104
104
  },
105
+ "clone": {
106
+ "aliases": [],
107
+ "args": {
108
+ "project": {
109
+ "description": "project name",
110
+ "name": "project",
111
+ "required": true
112
+ }
113
+ },
114
+ "description": "Clone an existing template-based project to the local machine.",
115
+ "examples": [
116
+ "<%= config.bin %> <%= command.id %> myProject",
117
+ "<%= config.bin %> <%= command.id %> myProject --chdir=./myProject"
118
+ ],
119
+ "flags": {
120
+ "chdir": {
121
+ "description": "directory to clone into",
122
+ "name": "chdir",
123
+ "required": false,
124
+ "hasDynamicHelp": false,
125
+ "multiple": false,
126
+ "type": "option"
127
+ }
128
+ },
129
+ "hasDynamicHelp": false,
130
+ "hiddenAliases": [],
131
+ "id": "clone",
132
+ "pluginAlias": "hereya-cli",
133
+ "pluginName": "hereya-cli",
134
+ "pluginType": "core",
135
+ "strict": true,
136
+ "enableJsonFlag": false,
137
+ "isESM": true,
138
+ "relativePath": [
139
+ "dist",
140
+ "commands",
141
+ "clone",
142
+ "index.js"
143
+ ]
144
+ },
105
145
  "credential-helper": {
106
146
  "aliases": [],
107
147
  "args": {
@@ -1849,32 +1889,34 @@
1849
1889
  "index.js"
1850
1890
  ]
1851
1891
  },
1852
- "flow:remove": {
1892
+ "flow:run": {
1853
1893
  "aliases": [],
1854
1894
  "args": {
1855
- "package": {
1856
- "description": "Remove a previously added package.",
1857
- "name": "package",
1895
+ "cmd": {
1896
+ "description": "command to run",
1897
+ "name": "cmd",
1858
1898
  "required": true
1859
1899
  }
1860
1900
  },
1861
- "description": "Remove a package from the project in a git branch-based workspace",
1901
+ "description": "Run a command with hereya env vars in a git branch-based workspace",
1862
1902
  "examples": [
1863
- "<%= config.bin %> <%= command.id %> cloudy/docker_postgres",
1864
- "<%= config.bin %> <%= command.id %> cloudy/docker_postgres --profile staging"
1903
+ "<%= config.bin %> <%= command.id %> -- npm run dev",
1904
+ "<%= config.bin %> <%= command.id %> --profile staging -- node index.js",
1905
+ "<%= config.bin %> <%= command.id %> --pin -- npm test"
1865
1906
  ],
1866
1907
  "flags": {
1867
1908
  "chdir": {
1868
- "description": "\n Directory where the command will be executed.\n If not specified, it defaults to the current working directory.\n Alternatively, you can define the project root by setting the HEREYA_PROJECT_ROOT_DIR environment variable.\n ",
1909
+ "description": "directory to run command in",
1869
1910
  "name": "chdir",
1870
1911
  "required": false,
1871
1912
  "hasDynamicHelp": false,
1872
1913
  "multiple": false,
1873
1914
  "type": "option"
1874
1915
  },
1875
- "debug": {
1876
- "description": "enable debug mode",
1877
- "name": "debug",
1916
+ "pin": {
1917
+ "description": "append git commit SHA to workspace name for commit-specific isolation",
1918
+ "name": "pin",
1919
+ "required": false,
1878
1920
  "allowNo": false,
1879
1921
  "type": "boolean"
1880
1922
  },
@@ -1889,49 +1931,47 @@
1889
1931
  },
1890
1932
  "hasDynamicHelp": false,
1891
1933
  "hiddenAliases": [],
1892
- "id": "flow:remove",
1934
+ "id": "flow:run",
1893
1935
  "pluginAlias": "hereya-cli",
1894
1936
  "pluginName": "hereya-cli",
1895
1937
  "pluginType": "core",
1896
- "strict": true,
1938
+ "strict": false,
1897
1939
  "enableJsonFlag": false,
1898
1940
  "isESM": true,
1899
1941
  "relativePath": [
1900
1942
  "dist",
1901
1943
  "commands",
1902
1944
  "flow",
1903
- "remove",
1945
+ "run",
1904
1946
  "index.js"
1905
1947
  ]
1906
1948
  },
1907
- "flow:run": {
1949
+ "flow:remove": {
1908
1950
  "aliases": [],
1909
1951
  "args": {
1910
- "cmd": {
1911
- "description": "command to run",
1912
- "name": "cmd",
1952
+ "package": {
1953
+ "description": "Remove a previously added package.",
1954
+ "name": "package",
1913
1955
  "required": true
1914
1956
  }
1915
1957
  },
1916
- "description": "Run a command with hereya env vars in a git branch-based workspace",
1958
+ "description": "Remove a package from the project in a git branch-based workspace",
1917
1959
  "examples": [
1918
- "<%= config.bin %> <%= command.id %> -- npm run dev",
1919
- "<%= config.bin %> <%= command.id %> --profile staging -- node index.js",
1920
- "<%= config.bin %> <%= command.id %> --pin -- npm test"
1960
+ "<%= config.bin %> <%= command.id %> cloudy/docker_postgres",
1961
+ "<%= config.bin %> <%= command.id %> cloudy/docker_postgres --profile staging"
1921
1962
  ],
1922
1963
  "flags": {
1923
1964
  "chdir": {
1924
- "description": "directory to run command in",
1965
+ "description": "\n Directory where the command will be executed.\n If not specified, it defaults to the current working directory.\n Alternatively, you can define the project root by setting the HEREYA_PROJECT_ROOT_DIR environment variable.\n ",
1925
1966
  "name": "chdir",
1926
1967
  "required": false,
1927
1968
  "hasDynamicHelp": false,
1928
1969
  "multiple": false,
1929
1970
  "type": "option"
1930
1971
  },
1931
- "pin": {
1932
- "description": "append git commit SHA to workspace name for commit-specific isolation",
1933
- "name": "pin",
1934
- "required": false,
1972
+ "debug": {
1973
+ "description": "enable debug mode",
1974
+ "name": "debug",
1935
1975
  "allowNo": false,
1936
1976
  "type": "boolean"
1937
1977
  },
@@ -1946,18 +1986,18 @@
1946
1986
  },
1947
1987
  "hasDynamicHelp": false,
1948
1988
  "hiddenAliases": [],
1949
- "id": "flow:run",
1989
+ "id": "flow:remove",
1950
1990
  "pluginAlias": "hereya-cli",
1951
1991
  "pluginName": "hereya-cli",
1952
1992
  "pluginType": "core",
1953
- "strict": false,
1993
+ "strict": true,
1954
1994
  "enableJsonFlag": false,
1955
1995
  "isESM": true,
1956
1996
  "relativePath": [
1957
1997
  "dist",
1958
1998
  "commands",
1959
1999
  "flow",
1960
- "run",
2000
+ "remove",
1961
2001
  "index.js"
1962
2002
  ]
1963
2003
  },
@@ -2817,5 +2857,5 @@
2817
2857
  ]
2818
2858
  }
2819
2859
  },
2820
- "version": "0.77.5"
2860
+ "version": "0.78.0"
2821
2861
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hereya-cli",
3
3
  "description": "Infrastructure as Package",
4
- "version": "0.77.5",
4
+ "version": "0.78.0",
5
5
  "author": "Hereya Developers",
6
6
  "bin": {
7
7
  "hereya": "./bin/run.js"