hereya-cli 0.69.2 → 0.70.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.69.2 linux-x64 node-v24.14.0
24
+ hereya-cli/0.70.0 linux-x64 node-v24.14.0
25
25
  $ hereya --help [COMMAND]
26
26
  USAGE
27
27
  $ hereya COMMAND
@@ -38,6 +38,9 @@ USAGE
38
38
  * [`hereya config use-backend TYPE`](#hereya-config-use-backend-type)
39
39
  * [`hereya delete-state`](#hereya-delete-state)
40
40
  * [`hereya deploy`](#hereya-deploy)
41
+ * [`hereya devenv config`](#hereya-devenv-config)
42
+ * [`hereya devenv install`](#hereya-devenv-install)
43
+ * [`hereya devenv ssh`](#hereya-devenv-ssh)
41
44
  * [`hereya doc PACKAGE`](#hereya-doc-package)
42
45
  * [`hereya docker run IMAGE`](#hereya-docker-run-image)
43
46
  * [`hereya down`](#hereya-down)
@@ -110,7 +113,7 @@ EXAMPLES
110
113
  $ hereya add cloudy/docker_postgres
111
114
  ```
112
115
 
113
- _See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/add/index.ts)_
116
+ _See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/add/index.ts)_
114
117
 
115
118
  ## `hereya bootstrap INFRASTRUCTURETYPE`
116
119
 
@@ -135,7 +138,7 @@ EXAMPLES
135
138
  $ hereya bootstrap local
136
139
  ```
137
140
 
138
- _See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/bootstrap/index.ts)_
141
+ _See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/bootstrap/index.ts)_
139
142
 
140
143
  ## `hereya config export-backend [FILE]`
141
144
 
@@ -157,7 +160,7 @@ EXAMPLES
157
160
  $ hereya config export-backend ./path/to/export.json
158
161
  ```
159
162
 
160
- _See code: [src/commands/config/export-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/config/export-backend/index.ts)_
163
+ _See code: [src/commands/config/export-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/config/export-backend/index.ts)_
161
164
 
162
165
  ## `hereya config get-backend`
163
166
 
@@ -174,7 +177,7 @@ EXAMPLES
174
177
  $ hereya config get-backend
175
178
  ```
176
179
 
177
- _See code: [src/commands/config/get-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/config/get-backend/index.ts)_
180
+ _See code: [src/commands/config/get-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/config/get-backend/index.ts)_
178
181
 
179
182
  ## `hereya config import-backend FILE`
180
183
 
@@ -194,7 +197,7 @@ EXAMPLES
194
197
  $ hereya config import-backend ./path/to/cloud-backend.json
195
198
  ```
196
199
 
197
- _See code: [src/commands/config/import-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/config/import-backend/index.ts)_
200
+ _See code: [src/commands/config/import-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/config/import-backend/index.ts)_
198
201
 
199
202
  ## `hereya config use-backend TYPE`
200
203
 
@@ -216,7 +219,7 @@ EXAMPLES
216
219
  $ hereya config use-backend local
217
220
  ```
218
221
 
219
- _See code: [src/commands/config/use-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/config/use-backend/index.ts)_
222
+ _See code: [src/commands/config/use-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/config/use-backend/index.ts)_
220
223
 
221
224
  ## `hereya delete-state`
222
225
 
@@ -242,7 +245,7 @@ EXAMPLES
242
245
  $ hereya delete-state --workspace staging
243
246
  ```
244
247
 
245
- _See code: [src/commands/delete-state/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/delete-state/index.ts)_
248
+ _See code: [src/commands/delete-state/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/delete-state/index.ts)_
246
249
 
247
250
  ## `hereya deploy`
248
251
 
@@ -267,7 +270,72 @@ EXAMPLES
267
270
  $ hereya deploy
268
271
  ```
269
272
 
270
- _See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/deploy/index.ts)_
273
+ _See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/deploy/index.ts)_
274
+
275
+ ## `hereya devenv config`
276
+
277
+ Configure SSH for a dev environment and display connection details.
278
+
279
+ ```
280
+ USAGE
281
+ $ hereya devenv config -w <value>
282
+
283
+ FLAGS
284
+ -w, --workspace=<value> (required) name of the workspace to configure SSH for
285
+
286
+ DESCRIPTION
287
+ Configure SSH for a dev environment and display connection details.
288
+
289
+ EXAMPLES
290
+ $ hereya devenv config -w my-workspace
291
+ ```
292
+
293
+ _See code: [src/commands/devenv/config/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/devenv/config/index.ts)_
294
+
295
+ ## `hereya devenv install`
296
+
297
+ Provision a remote dev environment on a workspace.
298
+
299
+ ```
300
+ USAGE
301
+ $ hereya devenv install -w <value> [--debug] [-p <value>...] [-f <value>] [-v <value>]
302
+
303
+ FLAGS
304
+ -f, --parameter-file=<value> path to a file containing parameters for the package
305
+ -p, --parameter=<value>... [default: ] parameter for the package, in the form of 'key=value'. Can be specified
306
+ multiple times.
307
+ -v, --version=<value> version of the dev environment package
308
+ -w, --workspace=<value> (required) name of the workspace to provision the dev environment on
309
+ --debug enable debug mode
310
+
311
+ DESCRIPTION
312
+ Provision a remote dev environment on a workspace.
313
+
314
+ EXAMPLES
315
+ $ hereya devenv install -w my-workspace -p instanceType=t3.large
316
+ ```
317
+
318
+ _See code: [src/commands/devenv/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/devenv/install/index.ts)_
319
+
320
+ ## `hereya devenv ssh`
321
+
322
+ SSH into a dev environment instance.
323
+
324
+ ```
325
+ USAGE
326
+ $ hereya devenv ssh -w <value>
327
+
328
+ FLAGS
329
+ -w, --workspace=<value> (required) name of the workspace to SSH into
330
+
331
+ DESCRIPTION
332
+ SSH into a dev environment instance.
333
+
334
+ EXAMPLES
335
+ $ hereya devenv ssh -w my-workspace
336
+ ```
337
+
338
+ _See code: [src/commands/devenv/ssh/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/devenv/ssh/index.ts)_
271
339
 
272
340
  ## `hereya doc PACKAGE`
273
341
 
@@ -300,7 +368,7 @@ EXAMPLES
300
368
  $ hereya doc my-package --no-doc
301
369
  ```
302
370
 
303
- _See code: [src/commands/doc/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/doc/index.ts)_
371
+ _See code: [src/commands/doc/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/doc/index.ts)_
304
372
 
305
373
  ## `hereya docker run IMAGE`
306
374
 
@@ -331,7 +399,7 @@ EXAMPLES
331
399
  $ hereya docker run myapp:latest -- --rm -v ./data:/data
332
400
  ```
333
401
 
334
- _See code: [src/commands/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/docker/run/index.ts)_
402
+ _See code: [src/commands/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/docker/run/index.ts)_
335
403
 
336
404
  ## `hereya down`
337
405
 
@@ -358,7 +426,7 @@ EXAMPLES
358
426
  $ hereya down
359
427
  ```
360
428
 
361
- _See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/down/index.ts)_
429
+ _See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/down/index.ts)_
362
430
 
363
431
  ## `hereya env [NAME]`
364
432
 
@@ -389,7 +457,7 @@ EXAMPLES
389
457
  $ hereya env -w dev -l
390
458
  ```
391
459
 
392
- _See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/env/index.ts)_
460
+ _See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/env/index.ts)_
393
461
 
394
462
  ## `hereya env set [NAME]`
395
463
 
@@ -416,7 +484,7 @@ EXAMPLES
416
484
  $ hereya env set FOO -v bar -w dev
417
485
  ```
418
486
 
419
- _See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/env/set/index.ts)_
487
+ _See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/env/set/index.ts)_
420
488
 
421
489
  ## `hereya executor start`
422
490
 
@@ -449,7 +517,7 @@ EXAMPLES
449
517
  HEREYA_TOKEN=<token> HEREYA_CLOUD_URL=https://my-cloud.example.com hereya executor start -w my-workspace
450
518
  ```
451
519
 
452
- _See code: [src/commands/executor/start/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/executor/start/index.ts)_
520
+ _See code: [src/commands/executor/start/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/executor/start/index.ts)_
453
521
 
454
522
  ## `hereya flow add PACKAGE`
455
523
 
@@ -487,7 +555,7 @@ EXAMPLES
487
555
  $ hereya flow add cloudy/docker_postgres -p DB_NAME=mydb -p DB_USER=admin
488
556
  ```
489
557
 
490
- _See code: [src/commands/flow/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/flow/add/index.ts)_
558
+ _See code: [src/commands/flow/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/flow/add/index.ts)_
491
559
 
492
560
  ## `hereya flow docker run IMAGE`
493
561
 
@@ -517,7 +585,7 @@ EXAMPLES
517
585
  $ hereya flow docker run --pin myapp:latest -- --rm
518
586
  ```
519
587
 
520
- _See code: [src/commands/flow/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/flow/docker/run/index.ts)_
588
+ _See code: [src/commands/flow/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/flow/docker/run/index.ts)_
521
589
 
522
590
  ## `hereya flow down`
523
591
 
@@ -551,7 +619,7 @@ EXAMPLES
551
619
  $ hereya flow down --pin
552
620
  ```
553
621
 
554
- _See code: [src/commands/flow/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/flow/down/index.ts)_
622
+ _See code: [src/commands/flow/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/flow/down/index.ts)_
555
623
 
556
624
  ## `hereya flow env [NAME]`
557
625
 
@@ -585,7 +653,7 @@ EXAMPLES
585
653
  $ hereya flow env -l
586
654
  ```
587
655
 
588
- _See code: [src/commands/flow/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/flow/env/index.ts)_
656
+ _See code: [src/commands/flow/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/flow/env/index.ts)_
589
657
 
590
658
  ## `hereya flow provid PACKAGE`
591
659
 
@@ -614,7 +682,7 @@ EXAMPLES
614
682
  $ hereya flow provid hereya/postgres --pin
615
683
  ```
616
684
 
617
- _See code: [src/commands/flow/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/flow/provid/index.ts)_
685
+ _See code: [src/commands/flow/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/flow/provid/index.ts)_
618
686
 
619
687
  ## `hereya flow remove PACKAGE`
620
688
 
@@ -644,7 +712,7 @@ EXAMPLES
644
712
  $ hereya flow remove cloudy/docker_postgres --profile staging
645
713
  ```
646
714
 
647
- _See code: [src/commands/flow/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/flow/remove/index.ts)_
715
+ _See code: [src/commands/flow/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/flow/remove/index.ts)_
648
716
 
649
717
  ## `hereya flow run CMD`
650
718
 
@@ -673,7 +741,7 @@ EXAMPLES
673
741
  $ hereya flow run --pin -- npm test
674
742
  ```
675
743
 
676
- _See code: [src/commands/flow/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/flow/run/index.ts)_
744
+ _See code: [src/commands/flow/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/flow/run/index.ts)_
677
745
 
678
746
  ## `hereya flow up`
679
747
 
@@ -707,7 +775,7 @@ EXAMPLES
707
775
  $ hereya flow up --pin
708
776
  ```
709
777
 
710
- _See code: [src/commands/flow/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/flow/up/index.ts)_
778
+ _See code: [src/commands/flow/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/flow/up/index.ts)_
711
779
 
712
780
  ## `hereya help [COMMAND]`
713
781
 
@@ -764,7 +832,7 @@ EXAMPLES
764
832
  $ hereya import org/my-package -f state.tfstate -w my-workspace
765
833
  ```
766
834
 
767
- _See code: [src/commands/import/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/import/index.ts)_
835
+ _See code: [src/commands/import/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/import/index.ts)_
768
836
 
769
837
  ## `hereya init PROJECT`
770
838
 
@@ -790,7 +858,7 @@ EXAMPLES
790
858
  $ hereya init myProject -w=defaultWorkspace --chdir=./myProject
791
859
  ```
792
860
 
793
- _See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/init/index.ts)_
861
+ _See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/init/index.ts)_
794
862
 
795
863
  ## `hereya login [URL]`
796
864
 
@@ -819,7 +887,7 @@ EXAMPLES
819
887
  $ hereya login --token=your-token https://cloud.hereya.dev
820
888
  ```
821
889
 
822
- _See code: [src/commands/login/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/login/index.ts)_
890
+ _See code: [src/commands/login/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/login/index.ts)_
823
891
 
824
892
  ## `hereya logout`
825
893
 
@@ -836,7 +904,7 @@ EXAMPLES
836
904
  $ hereya logout
837
905
  ```
838
906
 
839
- _See code: [src/commands/logout/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/logout/index.ts)_
907
+ _See code: [src/commands/logout/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/logout/index.ts)_
840
908
 
841
909
  ## `hereya provid PACKAGE`
842
910
 
@@ -864,7 +932,7 @@ EXAMPLES
864
932
  $ hereya provid hereya/postgres --workspace staging
865
933
  ```
866
934
 
867
- _See code: [src/commands/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/provid/index.ts)_
935
+ _See code: [src/commands/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/provid/index.ts)_
868
936
 
869
937
  ## `hereya publish`
870
938
 
@@ -887,7 +955,7 @@ EXAMPLES
887
955
  $ hereya publish --chdir=/path/to/package
888
956
  ```
889
957
 
890
- _See code: [src/commands/publish/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/publish/index.ts)_
958
+ _See code: [src/commands/publish/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/publish/index.ts)_
891
959
 
892
960
  ## `hereya remove PACKAGE`
893
961
 
@@ -915,7 +983,7 @@ EXAMPLES
915
983
  $ hereya remove cloudy/docker_postgres
916
984
  ```
917
985
 
918
- _See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/remove/index.ts)_
986
+ _See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/remove/index.ts)_
919
987
 
920
988
  ## `hereya run CMD`
921
989
 
@@ -941,7 +1009,7 @@ EXAMPLES
941
1009
  $ hereya run -w uat -- node index.js
942
1010
  ```
943
1011
 
944
- _See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/run/index.ts)_
1012
+ _See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/run/index.ts)_
945
1013
 
946
1014
  ## `hereya search QUERY`
947
1015
 
@@ -972,7 +1040,7 @@ EXAMPLES
972
1040
  $ hereya search database --json
973
1041
  ```
974
1042
 
975
- _See code: [src/commands/search/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/search/index.ts)_
1043
+ _See code: [src/commands/search/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/search/index.ts)_
976
1044
 
977
1045
  ## `hereya unbootstrap INFRASTRUCTURETYPE`
978
1046
 
@@ -997,7 +1065,7 @@ EXAMPLES
997
1065
  $ hereya unbootstrap local
998
1066
  ```
999
1067
 
1000
- _See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/unbootstrap/index.ts)_
1068
+ _See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/unbootstrap/index.ts)_
1001
1069
 
1002
1070
  ## `hereya undeploy`
1003
1071
 
@@ -1022,7 +1090,7 @@ EXAMPLES
1022
1090
  $ hereya undeploy
1023
1091
  ```
1024
1092
 
1025
- _See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/undeploy/index.ts)_
1093
+ _See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/undeploy/index.ts)_
1026
1094
 
1027
1095
  ## `hereya up`
1028
1096
 
@@ -1049,7 +1117,7 @@ EXAMPLES
1049
1117
  $ hereya up
1050
1118
  ```
1051
1119
 
1052
- _See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/up/index.ts)_
1120
+ _See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/up/index.ts)_
1053
1121
 
1054
1122
  ## `hereya workspace create NAME`
1055
1123
 
@@ -1074,7 +1142,7 @@ EXAMPLES
1074
1142
  $ hereya workspace create dev
1075
1143
  ```
1076
1144
 
1077
- _See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/workspace/create/index.ts)_
1145
+ _See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/workspace/create/index.ts)_
1078
1146
 
1079
1147
  ## `hereya workspace delete NAME`
1080
1148
 
@@ -1094,7 +1162,7 @@ EXAMPLES
1094
1162
  $ hereya workspace delete dev
1095
1163
  ```
1096
1164
 
1097
- _See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/workspace/delete/index.ts)_
1165
+ _See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/workspace/delete/index.ts)_
1098
1166
 
1099
1167
  ## `hereya workspace env [NAME]`
1100
1168
 
@@ -1120,7 +1188,7 @@ EXAMPLES
1120
1188
  $ hereya workspace env myEnv -w dev
1121
1189
  ```
1122
1190
 
1123
- _See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/workspace/env/index.ts)_
1191
+ _See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/workspace/env/index.ts)_
1124
1192
 
1125
1193
  ## `hereya workspace env set`
1126
1194
 
@@ -1144,7 +1212,7 @@ EXAMPLES
1144
1212
  $ hereya workspace env set -w my-workspace -n myVar -v my-value -i aws -s
1145
1213
  ```
1146
1214
 
1147
- _See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/workspace/env/set/index.ts)_
1215
+ _See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/workspace/env/set/index.ts)_
1148
1216
 
1149
1217
  ## `hereya workspace env unset`
1150
1218
 
@@ -1165,7 +1233,7 @@ EXAMPLES
1165
1233
  $ hereya workspace env unset -w my-workspace -n myVar
1166
1234
  ```
1167
1235
 
1168
- _See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/workspace/env/unset/index.ts)_
1236
+ _See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/workspace/env/unset/index.ts)_
1169
1237
 
1170
1238
  ## `hereya workspace executor install`
1171
1239
 
@@ -1184,7 +1252,7 @@ DESCRIPTION
1184
1252
  Install a remote executor into a workspace
1185
1253
  ```
1186
1254
 
1187
- _See code: [src/commands/workspace/executor/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/workspace/executor/install/index.ts)_
1255
+ _See code: [src/commands/workspace/executor/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/workspace/executor/install/index.ts)_
1188
1256
 
1189
1257
  ## `hereya workspace executor token`
1190
1258
 
@@ -1201,7 +1269,7 @@ DESCRIPTION
1201
1269
  Generate a workspace-scoped executor token for the remote executor
1202
1270
  ```
1203
1271
 
1204
- _See code: [src/commands/workspace/executor/token/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/workspace/executor/token/index.ts)_
1272
+ _See code: [src/commands/workspace/executor/token/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/workspace/executor/token/index.ts)_
1205
1273
 
1206
1274
  ## `hereya workspace executor uninstall`
1207
1275
 
@@ -1219,7 +1287,7 @@ DESCRIPTION
1219
1287
  Uninstall the remote executor from a workspace
1220
1288
  ```
1221
1289
 
1222
- _See code: [src/commands/workspace/executor/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/workspace/executor/uninstall/index.ts)_
1290
+ _See code: [src/commands/workspace/executor/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/workspace/executor/uninstall/index.ts)_
1223
1291
 
1224
1292
  ## `hereya workspace install PACKAGE`
1225
1293
 
@@ -1246,7 +1314,7 @@ EXAMPLES
1246
1314
  $ hereya workspace install hereya/aws-cognito
1247
1315
  ```
1248
1316
 
1249
- _See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/workspace/install/index.ts)_
1317
+ _See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/workspace/install/index.ts)_
1250
1318
 
1251
1319
  ## `hereya workspace list`
1252
1320
 
@@ -1270,7 +1338,7 @@ EXAMPLES
1270
1338
  $ hereya workspace list --org personal
1271
1339
  ```
1272
1340
 
1273
- _See code: [src/commands/workspace/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/workspace/list/index.ts)_
1341
+ _See code: [src/commands/workspace/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/workspace/list/index.ts)_
1274
1342
 
1275
1343
  ## `hereya workspace set-profile PROFILE`
1276
1344
 
@@ -1294,7 +1362,7 @@ EXAMPLES
1294
1362
  $ hereya workspace set-profile prod-profile -w production
1295
1363
  ```
1296
1364
 
1297
- _See code: [src/commands/workspace/set-profile/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/workspace/set-profile/index.ts)_
1365
+ _See code: [src/commands/workspace/set-profile/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/workspace/set-profile/index.ts)_
1298
1366
 
1299
1367
  ## `hereya workspace uninstall PACKAGE`
1300
1368
 
@@ -1321,5 +1389,5 @@ EXAMPLES
1321
1389
  $ hereya workspace uninstall hereya/aws-cognito
1322
1390
  ```
1323
1391
 
1324
- _See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.2/src/commands/workspace/uninstall/index.ts)_
1392
+ _See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.70.0/src/commands/workspace/uninstall/index.ts)_
1325
1393
  <!-- commandsstop -->
@@ -1,5 +1,5 @@
1
1
  import { Args, Command, Flags } from '@oclif/core';
2
- import { Listr, ListrLogger, ListrLogLevels } from 'listr2';
2
+ import { getRendererClass, Listr, ListrLogger, ListrLogLevels } from 'listr2';
3
3
  import { getBackend } from '../../backend/index.js';
4
4
  import { getExecutorForWorkspace } from '../../executor/context.js';
5
5
  import { getConfigManager } from '../../lib/config/index.js';
@@ -259,6 +259,7 @@ export default class Add extends Command {
259
259
  })), { concurrent: true, exitOnError: false, rendererOptions: { collapseSubtasks: !isDebug() } });
260
260
  task.task.subtasks = subtasks.tasks;
261
261
  task.task.emit('SUBTASK', subtasks.tasks);
262
+ subtasks.rendererClass = getRendererClass('silent');
262
263
  await subtasks.run(ctx);
263
264
  const failed = subtasks.tasks.filter(t => t.hasFailed());
264
265
  if (failed.length > 0) {
@@ -1,5 +1,5 @@
1
1
  import { Command, Flags } from '@oclif/core';
2
- import { Listr, ListrLogger, ListrLogLevels } from 'listr2';
2
+ import { getRendererClass, Listr, ListrLogger, ListrLogLevels } from 'listr2';
3
3
  import path from 'node:path';
4
4
  import { getBackend } from '../../backend/index.js';
5
5
  import { getExecutor } from '../../executor/index.js';
@@ -171,6 +171,7 @@ export default class Deploy extends Command {
171
171
  })), { concurrent: true, exitOnError: false, rendererOptions: { collapseSubtasks: !isDebug() } });
172
172
  task.task.subtasks = subtasks.tasks;
173
173
  task.task.emit('SUBTASK', subtasks.tasks);
174
+ subtasks.rendererClass = getRendererClass('silent');
174
175
  await subtasks.run(ctx);
175
176
  const failed = subtasks.tasks.filter(t => t.hasFailed());
176
177
  if (failed.length > 0) {
@@ -221,6 +222,7 @@ export default class Deploy extends Command {
221
222
  })), { concurrent: true, exitOnError: false, rendererOptions: { collapseSubtasks: !isDebug() } });
222
223
  task.task.subtasks = subtasks.tasks;
223
224
  task.task.emit('SUBTASK', subtasks.tasks);
225
+ subtasks.rendererClass = getRendererClass('silent');
224
226
  await subtasks.run(ctx);
225
227
  const failed = subtasks.tasks.filter(t => t.hasFailed());
226
228
  if (failed.length > 0) {
@@ -274,6 +276,7 @@ export default class Deploy extends Command {
274
276
  })), { concurrent: true, exitOnError: false, rendererOptions: { collapseSubtasks: !isDebug() } });
275
277
  task.task.subtasks = subtasks.tasks;
276
278
  task.task.emit('SUBTASK', subtasks.tasks);
279
+ subtasks.rendererClass = getRendererClass('silent');
277
280
  await subtasks.run(ctx);
278
281
  const failed = subtasks.tasks.filter(t => t.hasFailed());
279
282
  if (failed.length > 0) {
@@ -392,6 +395,7 @@ export default class Deploy extends Command {
392
395
  })), { concurrent: true, exitOnError: false, rendererOptions: { collapseSubtasks: !isDebug() } });
393
396
  task.task.subtasks = subtasks.tasks;
394
397
  task.task.emit('SUBTASK', subtasks.tasks);
398
+ subtasks.rendererClass = getRendererClass('silent');
395
399
  await subtasks.run(ctx);
396
400
  const failed = subtasks.tasks.filter(t => t.hasFailed());
397
401
  if (failed.length > 0) {
@@ -0,0 +1,9 @@
1
+ import { Command } from '@oclif/core';
2
+ export default class DevenvConfig extends Command {
3
+ static description: string;
4
+ static examples: string[];
5
+ static flags: {
6
+ workspace: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
7
+ };
8
+ run(): Promise<void>;
9
+ }
@@ -0,0 +1,59 @@
1
+ import { Command, Flags } from '@oclif/core';
2
+ import fs from 'node:fs/promises';
3
+ import os from 'node:os';
4
+ import path from 'node:path';
5
+ import { getBackend } from '../../../backend/index.js';
6
+ import { getExecutorForWorkspace } from '../../../executor/context.js';
7
+ import { setKeyFilePermissions, setSshDirPermissions } from '../../../lib/ssh-utils.js';
8
+ export default class DevenvConfig extends Command {
9
+ static description = 'Configure SSH for a dev environment and display connection details.';
10
+ static examples = [
11
+ '<%= config.bin %> <%= command.id %> -w my-workspace',
12
+ ];
13
+ static flags = {
14
+ workspace: Flags.string({
15
+ char: 'w',
16
+ description: 'name of the workspace to configure SSH for',
17
+ required: true,
18
+ }),
19
+ };
20
+ async run() {
21
+ const { flags } = await this.parse(DevenvConfig);
22
+ const { workspace } = flags;
23
+ const backend = await getBackend();
24
+ const getWorkspaceEnvOutput = await backend.getWorkspaceEnv({ workspace });
25
+ if (!getWorkspaceEnvOutput.success) {
26
+ this.error(getWorkspaceEnvOutput.reason);
27
+ }
28
+ let { env } = getWorkspaceEnvOutput;
29
+ const executor$ = await getExecutorForWorkspace(workspace);
30
+ if (!executor$.success) {
31
+ this.error(executor$.reason);
32
+ }
33
+ const { executor } = executor$;
34
+ env = await executor.resolveEnvValues({ env });
35
+ const sshHost = env.devEnvSshHost;
36
+ const sshPrivateKey = env.devEnvSshPrivateKey;
37
+ const sshUser = env.devEnvSshUser;
38
+ const sshHostDns = env.devEnvSshHostDns;
39
+ if (!sshHost || !sshPrivateKey || !sshUser) {
40
+ this.error('devEnvSshHost, devEnvSshPrivateKey, and devEnvSshUser must be set in the workspace environment');
41
+ }
42
+ const host = sshHostDns || sshHost;
43
+ const sshDir = path.join(os.homedir(), '.ssh');
44
+ const sanitizedWorkspace = workspace.replaceAll('/', '-');
45
+ const keyFilePath = path.join(sshDir, `hereya-devenv-${sanitizedWorkspace}`);
46
+ await fs.mkdir(sshDir, { recursive: true });
47
+ await setSshDirPermissions(sshDir);
48
+ await fs.writeFile(keyFilePath, sshPrivateKey);
49
+ await setKeyFilePermissions(keyFilePath);
50
+ this.log('SSH connection configured successfully.');
51
+ this.log('');
52
+ this.log('Fill in the Claude Code SSH connection form with:');
53
+ this.log('');
54
+ this.log(` Name: ${workspace}`);
55
+ this.log(` SSH Host: ${sshUser}@${host}`);
56
+ this.log(` SSH Port: 22`);
57
+ this.log(` Identity File: ${keyFilePath}`);
58
+ }
59
+ }
@@ -0,0 +1,13 @@
1
+ import { Command } from '@oclif/core';
2
+ export default class DevenvInstall extends Command {
3
+ static description: string;
4
+ static examples: string[];
5
+ static flags: {
6
+ debug: import("@oclif/core/interfaces").BooleanFlag<boolean>;
7
+ parameter: import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
8
+ 'parameter-file': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
9
+ version: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
+ workspace: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
11
+ };
12
+ run(): Promise<void>;
13
+ }
@@ -0,0 +1,170 @@
1
+ import { Command, Flags } from '@oclif/core';
2
+ import { Listr, ListrLogger, ListrLogLevels } from 'listr2';
3
+ import { getCloudCredentials, loadBackendConfig } from '../../../backend/config.js';
4
+ import { getBackend } from '../../../backend/index.js';
5
+ import { getExecutor } from '../../../executor/index.js';
6
+ import { getLogger, getLogPath, isDebug, setDebug } from '../../../lib/log.js';
7
+ import { arrayOfStringToObject } from '../../../lib/object-utils.js';
8
+ import { delay } from '../../../lib/shell.js';
9
+ import { load } from '../../../lib/yaml-utils.js';
10
+ export default class DevenvInstall extends Command {
11
+ static description = 'Provision a remote dev environment on a workspace.';
12
+ static examples = ['<%= config.bin %> <%= command.id %> -w my-workspace -p instanceType=t3.large'];
13
+ static flags = {
14
+ debug: Flags.boolean({
15
+ default: false,
16
+ description: 'enable debug mode',
17
+ }),
18
+ parameter: Flags.string({
19
+ char: 'p',
20
+ default: [],
21
+ description: "parameter for the package, in the form of 'key=value'. Can be specified multiple times.",
22
+ multiple: true,
23
+ }),
24
+ 'parameter-file': Flags.string({
25
+ char: 'f',
26
+ description: 'path to a file containing parameters for the package',
27
+ }),
28
+ version: Flags.string({
29
+ char: 'v',
30
+ description: 'version of the dev environment package',
31
+ }),
32
+ workspace: Flags.string({
33
+ char: 'w',
34
+ description: 'name of the workspace to provision the dev environment on',
35
+ required: true,
36
+ }),
37
+ };
38
+ async run() {
39
+ const { flags } = await this.parse(DevenvInstall);
40
+ setDebug(flags.debug);
41
+ const pkg = flags.version ? `hereya/dev-env-aws@${flags.version}` : 'hereya/dev-env-aws';
42
+ const myLogger = new ListrLogger({ useIcons: false });
43
+ const task = new Listr([
44
+ {
45
+ async task(ctx, task) {
46
+ return task.newListr([
47
+ {
48
+ async task(ctx) {
49
+ const backend = await getBackend();
50
+ const loadWorkspaceOutput = await backend.getWorkspace(flags.workspace);
51
+ if (!loadWorkspaceOutput.found || loadWorkspaceOutput.hasError) {
52
+ throw new Error(`Workspace ${flags.workspace} not found`);
53
+ }
54
+ if (loadWorkspaceOutput.workspace.mirrorOf) {
55
+ throw new Error(`Workspace ${flags.workspace} is a mirror of ${loadWorkspaceOutput.workspace.mirrorOf}`);
56
+ }
57
+ ctx.workspace = loadWorkspaceOutput;
58
+ await delay(500);
59
+ },
60
+ title: `Loading workspace ${flags.workspace}`,
61
+ },
62
+ {
63
+ async task(ctx) {
64
+ const parametersInCmdline = arrayOfStringToObject(flags.parameter);
65
+ let parametersFromFile = {};
66
+ if (flags['parameter-file']) {
67
+ const { data, found } = await load(flags['parameter-file']);
68
+ if (!found) {
69
+ throw new Error(`Parameter file ${flags['parameter-file']} not found`);
70
+ }
71
+ parametersFromFile = data;
72
+ }
73
+ const parameters = { ...parametersFromFile, ...parametersInCmdline };
74
+ ctx.parameters = parameters;
75
+ await delay(500);
76
+ },
77
+ title: 'Resolving parameters',
78
+ },
79
+ {
80
+ async task(ctx) {
81
+ const token = await generateHereyaToken(flags.workspace);
82
+ if (token) {
83
+ ctx.parameters = { ...ctx.parameters, hereyaCloudUrl: token.cloudUrl, hereyaToken: token.token };
84
+ }
85
+ },
86
+ title: 'Generating Hereya token for dev environment',
87
+ },
88
+ {
89
+ rendererOptions: {
90
+ persistentOutput: isDebug(),
91
+ },
92
+ async task(ctx, task) {
93
+ const executor$ = getExecutor();
94
+ if (!executor$.success) {
95
+ throw new Error(executor$.reason);
96
+ }
97
+ const { executor } = executor$;
98
+ const provisionOutput = await executor.provision({
99
+ logger: getLogger(task),
100
+ package: pkg,
101
+ parameters: ctx.parameters,
102
+ workspace: flags.workspace,
103
+ });
104
+ if (!provisionOutput.success) {
105
+ throw new Error(provisionOutput.reason);
106
+ }
107
+ ctx.provisionOutput = provisionOutput;
108
+ },
109
+ title: 'Provisioning dev environment',
110
+ },
111
+ {
112
+ async task(ctx) {
113
+ const { env, metadata } = ctx.provisionOutput;
114
+ const backend = await getBackend();
115
+ const output = await backend.addPackageToWorkspace({
116
+ env,
117
+ infra: metadata.infra,
118
+ package: ctx.provisionOutput.pkgName,
119
+ parameters: ctx.parameters,
120
+ version: ctx.provisionOutput.version,
121
+ workspace: flags.workspace,
122
+ });
123
+ if (!output.success) {
124
+ throw new Error(output.reason);
125
+ }
126
+ },
127
+ title: 'Saving exported environment variables to workspace',
128
+ },
129
+ ]);
130
+ },
131
+ title: `Installing ${pkg} into workspace ${flags.workspace}`,
132
+ },
133
+ ], { concurrent: false, rendererOptions: { collapseSubtasks: !isDebug() } });
134
+ try {
135
+ await task.run();
136
+ myLogger.log(ListrLogLevels.COMPLETED, `Dev environment provisioned successfully into workspace ${flags.workspace}`);
137
+ }
138
+ catch (error) {
139
+ this.error(`${error.message}
140
+
141
+ See ${getLogPath()} for more details`);
142
+ }
143
+ }
144
+ }
145
+ async function generateHereyaToken(workspace) {
146
+ const backendConfig = await loadBackendConfig();
147
+ if (!backendConfig.cloud) {
148
+ return null;
149
+ }
150
+ const { clientId, url } = backendConfig.cloud;
151
+ const credentials = await getCloudCredentials(clientId);
152
+ if (!credentials) {
153
+ return null;
154
+ }
155
+ const formData = new FormData();
156
+ formData.append('description', `Dev environment: ${workspace}`);
157
+ formData.append('expiresInDays', '365');
158
+ const response = await fetch(`${url}/api/personal-tokens`, {
159
+ body: formData,
160
+ headers: {
161
+ Authorization: `Bearer ${credentials.accessToken}`,
162
+ },
163
+ method: 'POST',
164
+ });
165
+ if (!response.ok) {
166
+ return null;
167
+ }
168
+ const result = await response.json();
169
+ return { cloudUrl: url, token: result.data.token };
170
+ }
@@ -0,0 +1,10 @@
1
+ import { Command } from '@oclif/core';
2
+ export default class DevenvSsh extends Command {
3
+ static description: string;
4
+ static examples: string[];
5
+ static flags: {
6
+ workspace: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
7
+ };
8
+ run(): Promise<void>;
9
+ protected spawnSsh(args: string[]): Promise<void>;
10
+ }
@@ -0,0 +1,79 @@
1
+ import { Command, Flags } from '@oclif/core';
2
+ import { spawn } from 'node:child_process';
3
+ import { randomUUID } from 'node:crypto';
4
+ import fs from 'node:fs/promises';
5
+ import os from 'node:os';
6
+ import path from 'node:path';
7
+ import { getBackend } from '../../../backend/index.js';
8
+ import { getExecutorForWorkspace } from '../../../executor/context.js';
9
+ import { setKeyFilePermissions } from '../../../lib/ssh-utils.js';
10
+ export default class DevenvSsh extends Command {
11
+ static description = 'SSH into a dev environment instance.';
12
+ static examples = [
13
+ '<%= config.bin %> <%= command.id %> -w my-workspace',
14
+ ];
15
+ static flags = {
16
+ workspace: Flags.string({
17
+ char: 'w',
18
+ description: 'name of the workspace to SSH into',
19
+ required: true,
20
+ }),
21
+ };
22
+ async run() {
23
+ const { flags } = await this.parse(DevenvSsh);
24
+ const { workspace } = flags;
25
+ const backend = await getBackend();
26
+ const getWorkspaceEnvOutput = await backend.getWorkspaceEnv({ workspace });
27
+ if (!getWorkspaceEnvOutput.success) {
28
+ this.error(getWorkspaceEnvOutput.reason);
29
+ }
30
+ let { env } = getWorkspaceEnvOutput;
31
+ const executor$ = await getExecutorForWorkspace(workspace);
32
+ if (!executor$.success) {
33
+ this.error(executor$.reason);
34
+ }
35
+ const { executor } = executor$;
36
+ env = await executor.resolveEnvValues({ env });
37
+ const sshHost = env.devEnvSshHost;
38
+ const sshPrivateKey = env.devEnvSshPrivateKey;
39
+ const sshUser = env.devEnvSshUser;
40
+ const sshHostDns = env.devEnvSshHostDns;
41
+ if (!sshHost || !sshPrivateKey || !sshUser) {
42
+ this.error('devEnvSshHost, devEnvSshPrivateKey, and devEnvSshUser must be set in the workspace environment');
43
+ }
44
+ const host = sshHostDns || sshHost;
45
+ const tempKeyPath = path.join(os.tmpdir(), `hereya-ssh-${randomUUID()}`);
46
+ try {
47
+ await fs.writeFile(tempKeyPath, sshPrivateKey);
48
+ await setKeyFilePermissions(tempKeyPath);
49
+ const sshArgs = ['-i', tempKeyPath, '-o', 'StrictHostKeyChecking=no', `${sshUser}@${host}`];
50
+ await this.spawnSsh(sshArgs);
51
+ }
52
+ finally {
53
+ try {
54
+ await fs.unlink(tempKeyPath);
55
+ }
56
+ catch {
57
+ // Ignore cleanup errors
58
+ }
59
+ }
60
+ }
61
+ spawnSsh(args) {
62
+ return new Promise((resolve, reject) => {
63
+ const child = spawn('ssh', args, {
64
+ stdio: 'inherit',
65
+ });
66
+ child.on('close', (code) => {
67
+ if (code === 0) {
68
+ resolve();
69
+ }
70
+ else {
71
+ reject(new Error(`SSH exited with code ${code}`));
72
+ }
73
+ });
74
+ child.on('error', (err) => {
75
+ reject(err);
76
+ });
77
+ });
78
+ }
79
+ }
@@ -1,5 +1,5 @@
1
1
  import { Command, Flags } from '@oclif/core';
2
- import { Listr, ListrLogger, ListrLogLevels } from 'listr2';
2
+ import { getRendererClass, Listr, ListrLogger, ListrLogLevels } from 'listr2';
3
3
  import { getBackend } from '../../backend/index.js';
4
4
  import { getExecutorForWorkspace } from '../../executor/context.js';
5
5
  import { getConfigManager } from '../../lib/config/index.js';
@@ -207,6 +207,7 @@ export default class Down extends Command {
207
207
  })), { concurrent: true, exitOnError: false, rendererOptions: { collapseSubtasks: !isDebug() } });
208
208
  parentTask.task.subtasks = subtasks.tasks;
209
209
  parentTask.task.emit('SUBTASK', subtasks.tasks);
210
+ subtasks.rendererClass = getRendererClass('silent');
210
211
  await subtasks.run(ctx);
211
212
  const failed = subtasks.tasks.filter(t => t.hasFailed());
212
213
  if (failed.length > 0) {
@@ -282,6 +283,7 @@ export default class Down extends Command {
282
283
  })), { concurrent: true, exitOnError: false, rendererOptions: { collapseSubtasks: !isDebug() } });
283
284
  parentTask.task.subtasks = subtasks.tasks;
284
285
  parentTask.task.emit('SUBTASK', subtasks.tasks);
286
+ subtasks.rendererClass = getRendererClass('silent');
285
287
  await subtasks.run(ctx);
286
288
  const failed = subtasks.tasks.filter(t => t.hasFailed());
287
289
  if (failed.length > 0) {
@@ -1,5 +1,5 @@
1
1
  import { Args, Command, Flags } from '@oclif/core';
2
- import { Listr, ListrLogger, ListrLogLevels } from 'listr2';
2
+ import { getRendererClass, Listr, ListrLogger, ListrLogLevels } from 'listr2';
3
3
  import { getBackend } from '../../backend/index.js';
4
4
  import { getExecutorForWorkspace } from '../../executor/context.js';
5
5
  import { getConfigManager } from '../../lib/config/index.js';
@@ -273,6 +273,7 @@ export default class Remove extends Command {
273
273
  })), { concurrent: true, exitOnError: false, rendererOptions: { collapseSubtasks: !isDebug() } });
274
274
  task.task.subtasks = subtasks.tasks;
275
275
  task.task.emit('SUBTASK', subtasks.tasks);
276
+ subtasks.rendererClass = getRendererClass('silent');
276
277
  await subtasks.run(ctx);
277
278
  const failed = subtasks.tasks.filter(t => t.hasFailed());
278
279
  if (failed.length > 0) {
@@ -1,5 +1,5 @@
1
1
  import { Command, Flags } from '@oclif/core';
2
- import { Listr, ListrLogger, ListrLogLevels } from 'listr2';
2
+ import { getRendererClass, Listr, ListrLogger, ListrLogLevels } from 'listr2';
3
3
  import path from 'node:path';
4
4
  import { getBackend } from '../../backend/index.js';
5
5
  import { getExecutor } from '../../executor/index.js';
@@ -221,6 +221,7 @@ export default class Undeploy extends Command {
221
221
  })), { concurrent: true, exitOnError: false, rendererOptions: { collapseSubtasks: !isDebug() } });
222
222
  task.task.subtasks = subtasks.tasks;
223
223
  task.task.emit('SUBTASK', subtasks.tasks);
224
+ subtasks.rendererClass = getRendererClass('silent');
224
225
  await subtasks.run(ctx);
225
226
  const failed = subtasks.tasks.filter(t => t.hasFailed());
226
227
  if (failed.length > 0) {
@@ -1,5 +1,5 @@
1
1
  import { Command, Flags } from '@oclif/core';
2
- import { Listr, ListrLogger, ListrLogLevels } from 'listr2';
2
+ import { getRendererClass, Listr, ListrLogger, ListrLogLevels } from 'listr2';
3
3
  import { getBackend } from '../../backend/index.js';
4
4
  import { getExecutorForWorkspace } from '../../executor/context.js';
5
5
  import { getConfigManager } from '../../lib/config/index.js';
@@ -169,6 +169,7 @@ export default class Up extends Command {
169
169
  })), { concurrent: true, exitOnError: false, rendererOptions: { collapseSubtasks: !isDebug() } });
170
170
  parentTask.task.subtasks = subtasks.tasks;
171
171
  parentTask.task.emit('SUBTASK', subtasks.tasks);
172
+ subtasks.rendererClass = getRendererClass('silent');
172
173
  await subtasks.run(ctx);
173
174
  const failed = subtasks.tasks.filter(t => t.hasFailed());
174
175
  if (failed.length > 0) {
@@ -222,6 +223,7 @@ export default class Up extends Command {
222
223
  })), { concurrent: true, exitOnError: false, rendererOptions: { collapseSubtasks: !isDebug() } });
223
224
  parentTask.task.subtasks = subtasks.tasks;
224
225
  parentTask.task.emit('SUBTASK', subtasks.tasks);
226
+ subtasks.rendererClass = getRendererClass('silent');
225
227
  await subtasks.run(ctx);
226
228
  const failed = subtasks.tasks.filter(t => t.hasFailed());
227
229
  if (failed.length > 0) {
@@ -350,6 +352,7 @@ export default class Up extends Command {
350
352
  })), { concurrent: true, exitOnError: false, rendererOptions: { collapseSubtasks: !isDebug() } });
351
353
  parentTask.task.subtasks = subtasks.tasks;
352
354
  parentTask.task.emit('SUBTASK', subtasks.tasks);
355
+ subtasks.rendererClass = getRendererClass('silent');
353
356
  await subtasks.run(ctx);
354
357
  const failed = subtasks.tasks.filter(t => t.hasFailed());
355
358
  if (failed.length > 0) {
@@ -192,7 +192,7 @@ export class CloudPackageManager {
192
192
  try {
193
193
  // Try to get package from registry
194
194
  // Registry API accepts both 'name' and 'org/name' formats
195
- const result = version
195
+ const result = (version && version !== 'latest')
196
196
  ? await this.backend.getPackageByVersion(packageName, version)
197
197
  : await this.backend.getPackageLatest(packageName);
198
198
  if (result.success && result.package) {
@@ -0,0 +1,2 @@
1
+ export declare function setKeyFilePermissions(filePath: string): Promise<void>;
2
+ export declare function setSshDirPermissions(dirPath: string): Promise<void>;
@@ -0,0 +1,18 @@
1
+ import { exec } from 'node:child_process';
2
+ import { chmod } from 'node:fs/promises';
3
+ import { promisify } from 'node:util';
4
+ const execAsync = promisify(exec);
5
+ export async function setKeyFilePermissions(filePath) {
6
+ // On Windows, use icacls to restrict the key file to the current user only.
7
+ // On Unix, chmod 600 restricts the file to owner read/write.
8
+ await (process.platform === 'win32'
9
+ ? execAsync(`icacls "${filePath}" /inheritance:r /grant:r "%USERNAME%:R"`)
10
+ : chmod(filePath, 0o600));
11
+ }
12
+ export async function setSshDirPermissions(dirPath) {
13
+ // chmod is a no-op on Windows; permissions are inherited from the parent directory
14
+ if (process.platform === 'win32') {
15
+ return;
16
+ }
17
+ await chmod(dirPath, 0o700);
18
+ }
@@ -496,6 +496,30 @@
496
496
  "index.js"
497
497
  ]
498
498
  },
499
+ "logout": {
500
+ "aliases": [],
501
+ "args": {},
502
+ "description": "Logout from Hereya Cloud",
503
+ "examples": [
504
+ "<%= config.bin %> <%= command.id %>"
505
+ ],
506
+ "flags": {},
507
+ "hasDynamicHelp": false,
508
+ "hiddenAliases": [],
509
+ "id": "logout",
510
+ "pluginAlias": "hereya-cli",
511
+ "pluginName": "hereya-cli",
512
+ "pluginType": "core",
513
+ "strict": true,
514
+ "enableJsonFlag": false,
515
+ "isESM": true,
516
+ "relativePath": [
517
+ "dist",
518
+ "commands",
519
+ "logout",
520
+ "index.js"
521
+ ]
522
+ },
499
523
  "login": {
500
524
  "aliases": [],
501
525
  "args": {
@@ -540,30 +564,6 @@
540
564
  "index.js"
541
565
  ]
542
566
  },
543
- "logout": {
544
- "aliases": [],
545
- "args": {},
546
- "description": "Logout from Hereya Cloud",
547
- "examples": [
548
- "<%= config.bin %> <%= command.id %>"
549
- ],
550
- "flags": {},
551
- "hasDynamicHelp": false,
552
- "hiddenAliases": [],
553
- "id": "logout",
554
- "pluginAlias": "hereya-cli",
555
- "pluginName": "hereya-cli",
556
- "pluginType": "core",
557
- "strict": true,
558
- "enableJsonFlag": false,
559
- "isESM": true,
560
- "relativePath": [
561
- "dist",
562
- "commands",
563
- "logout",
564
- "index.js"
565
- ]
566
- },
567
567
  "provid": {
568
568
  "aliases": [],
569
569
  "args": {
@@ -1082,6 +1082,142 @@
1082
1082
  "index.js"
1083
1083
  ]
1084
1084
  },
1085
+ "devenv:config": {
1086
+ "aliases": [],
1087
+ "args": {},
1088
+ "description": "Configure SSH for a dev environment and display connection details.",
1089
+ "examples": [
1090
+ "<%= config.bin %> <%= command.id %> -w my-workspace"
1091
+ ],
1092
+ "flags": {
1093
+ "workspace": {
1094
+ "char": "w",
1095
+ "description": "name of the workspace to configure SSH for",
1096
+ "name": "workspace",
1097
+ "required": true,
1098
+ "hasDynamicHelp": false,
1099
+ "multiple": false,
1100
+ "type": "option"
1101
+ }
1102
+ },
1103
+ "hasDynamicHelp": false,
1104
+ "hiddenAliases": [],
1105
+ "id": "devenv:config",
1106
+ "pluginAlias": "hereya-cli",
1107
+ "pluginName": "hereya-cli",
1108
+ "pluginType": "core",
1109
+ "strict": true,
1110
+ "enableJsonFlag": false,
1111
+ "isESM": true,
1112
+ "relativePath": [
1113
+ "dist",
1114
+ "commands",
1115
+ "devenv",
1116
+ "config",
1117
+ "index.js"
1118
+ ]
1119
+ },
1120
+ "devenv:install": {
1121
+ "aliases": [],
1122
+ "args": {},
1123
+ "description": "Provision a remote dev environment on a workspace.",
1124
+ "examples": [
1125
+ "<%= config.bin %> <%= command.id %> -w my-workspace -p instanceType=t3.large"
1126
+ ],
1127
+ "flags": {
1128
+ "debug": {
1129
+ "description": "enable debug mode",
1130
+ "name": "debug",
1131
+ "allowNo": false,
1132
+ "type": "boolean"
1133
+ },
1134
+ "parameter": {
1135
+ "char": "p",
1136
+ "description": "parameter for the package, in the form of 'key=value'. Can be specified multiple times.",
1137
+ "name": "parameter",
1138
+ "default": [],
1139
+ "hasDynamicHelp": false,
1140
+ "multiple": true,
1141
+ "type": "option"
1142
+ },
1143
+ "parameter-file": {
1144
+ "char": "f",
1145
+ "description": "path to a file containing parameters for the package",
1146
+ "name": "parameter-file",
1147
+ "hasDynamicHelp": false,
1148
+ "multiple": false,
1149
+ "type": "option"
1150
+ },
1151
+ "version": {
1152
+ "char": "v",
1153
+ "description": "version of the dev environment package",
1154
+ "name": "version",
1155
+ "hasDynamicHelp": false,
1156
+ "multiple": false,
1157
+ "type": "option"
1158
+ },
1159
+ "workspace": {
1160
+ "char": "w",
1161
+ "description": "name of the workspace to provision the dev environment on",
1162
+ "name": "workspace",
1163
+ "required": true,
1164
+ "hasDynamicHelp": false,
1165
+ "multiple": false,
1166
+ "type": "option"
1167
+ }
1168
+ },
1169
+ "hasDynamicHelp": false,
1170
+ "hiddenAliases": [],
1171
+ "id": "devenv:install",
1172
+ "pluginAlias": "hereya-cli",
1173
+ "pluginName": "hereya-cli",
1174
+ "pluginType": "core",
1175
+ "strict": true,
1176
+ "enableJsonFlag": false,
1177
+ "isESM": true,
1178
+ "relativePath": [
1179
+ "dist",
1180
+ "commands",
1181
+ "devenv",
1182
+ "install",
1183
+ "index.js"
1184
+ ]
1185
+ },
1186
+ "devenv:ssh": {
1187
+ "aliases": [],
1188
+ "args": {},
1189
+ "description": "SSH into a dev environment instance.",
1190
+ "examples": [
1191
+ "<%= config.bin %> <%= command.id %> -w my-workspace"
1192
+ ],
1193
+ "flags": {
1194
+ "workspace": {
1195
+ "char": "w",
1196
+ "description": "name of the workspace to SSH into",
1197
+ "name": "workspace",
1198
+ "required": true,
1199
+ "hasDynamicHelp": false,
1200
+ "multiple": false,
1201
+ "type": "option"
1202
+ }
1203
+ },
1204
+ "hasDynamicHelp": false,
1205
+ "hiddenAliases": [],
1206
+ "id": "devenv:ssh",
1207
+ "pluginAlias": "hereya-cli",
1208
+ "pluginName": "hereya-cli",
1209
+ "pluginType": "core",
1210
+ "strict": true,
1211
+ "enableJsonFlag": false,
1212
+ "isESM": true,
1213
+ "relativePath": [
1214
+ "dist",
1215
+ "commands",
1216
+ "devenv",
1217
+ "ssh",
1218
+ "index.js"
1219
+ ]
1220
+ },
1085
1221
  "docker:run": {
1086
1222
  "aliases": [],
1087
1223
  "args": {
@@ -2352,5 +2488,5 @@
2352
2488
  ]
2353
2489
  }
2354
2490
  },
2355
- "version": "0.69.2"
2491
+ "version": "0.70.0"
2356
2492
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hereya-cli",
3
3
  "description": "Infrastructure as Package",
4
- "version": "0.69.2",
4
+ "version": "0.70.0",
5
5
  "author": "Hereya Developers",
6
6
  "bin": {
7
7
  "hereya": "./bin/run.js"