From aef053e353dce7cf4eae3bb28692655546e580c6 Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Sat, 24 Oct 2026 13:34:18 +0200 Subject: [PATCH] launch: the Access screen's help names --show-key and --api-key, so a person can see or set a key of their own (#3713 #3951); test --- strata_cli/launch/screens.py | 3 ++- tests/terminal/test_launch.py | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/strata_cli/launch/screens.py b/strata_cli/launch/screens.py index d40c1adc..e15177ee 100644 --- a/strata_cli/launch/screens.py +++ b/strata_cli/launch/screens.py @@ -1328,7 +1328,8 @@ class AccessScreen(Base): step_id = "access" hints = "↑↓ choose Enter next p port k new key t key on/off Esc back ? help" help_text = ("Who can use the model. 'This computer only' is the safe default and never needs a key. Beyond it Strata makes an API key " - "for you (recommended); press t if you would rather have no key: it still starts, but anyone who can reach it can use it.") + "for you (recommended); press t if you would rather have no key: it still starts, but anyone who can reach it can use it. " + "To see the key later: strata launch --show-key. To use a key of your own: strata launch --api-key YOUR-KEY (or --api-key-env NAME).") BINDINGS = Base.BINDINGS + [Binding("p", "port", show=False), Binding("k", "newkey", show=False), Binding("t", "keytoggle", show=False)] diff --git a/tests/terminal/test_launch.py b/tests/terminal/test_launch.py index 487366cc..ccb9b7cd 100644 --- a/tests/terminal/test_launch.py +++ b/tests/terminal/test_launch.py @@ -952,6 +952,11 @@ class FlagsCommand(unittest.TestCase): self.assertIn("Nothing was changed.", out) self.assertEqual(store.list_presets(), []) + def test_the_access_help_names_the_flags_for_showing_and_setting_a_key(self): # #3713 #3951 + from strata_cli.launch import screens + self.assertIn("strata launch --show-key", screens.AccessScreen.help_text) + self.assertIn("--api-key YOUR-KEY", screens.AccessScreen.help_text) + def test_the_summary_says_where_the_engine_log_is(self): # #3656 import tempfile with tempfile.TemporaryDirectory() as d: