File tree Expand file tree Collapse file tree 5 files changed +25
-31
lines changed Expand file tree Collapse file tree 5 files changed +25
-31
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ import os
2
+
3
+ from anyio .from_thread import start_blocking_portal
4
+
5
+ from jumpstarter .client import client_from_channel
6
+ from jumpstarter .common .grpc import insecure_channel
7
+
8
+
9
+ def main ():
10
+ host = os .environ .get ("JUMPSTARTER_HOST" , None )
11
+
12
+ if host is None :
13
+ raise RuntimeError ("j command can only be used under jmp shell" )
14
+
15
+ with start_blocking_portal () as portal :
16
+ channel = portal .call (insecure_channel , host )
17
+ client = portal .call (client_from_channel , channel , portal )
18
+ client .cli ()()
19
+
20
+
21
+ if __name__ == "__main__" :
22
+ main ()
Original file line number Diff line number Diff line change 3
3
import click
4
4
5
5
from .client import client
6
- from .control import control_from_env
7
6
from .exporter import exporter
8
7
from .shell import shell
9
8
from .version import version
@@ -17,6 +16,7 @@ def help():
17
16
click .echo (ctx .parent .get_help ())
18
17
ctx .exit ()
19
18
19
+
20
20
@click .group (no_args_is_help = True )
21
21
def main ():
22
22
pass
@@ -26,4 +26,3 @@ def main():
26
26
main .add_command (shell )
27
27
main .add_command (exporter )
28
28
main .add_command (client )
29
- main .add_command (control_from_env (), "control" )
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ class AliasedGroup(click.Group):
10
10
"create" : ["cr" ],
11
11
"move" : ["mv" ],
12
12
"config" : ["conf" ],
13
- "delete" : ["del" ]
13
+ "delete" : ["del" ],
14
14
}
15
15
16
16
def get_command (self , ctx : click .Context , cmd_name : str ):
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ subdirectory = "python"
33
33
34
34
[tool .poetry .scripts ]
35
35
jmp = " jumpstarter.__main__:main"
36
+ j = " jumpstarter.cli.j:main"
36
37
37
38
[tool .poetry .group .dev .dependencies ]
38
39
pytest = " ^8.2.2"
You can’t perform that action at this time.
0 commit comments