steve-cli 0.3.5__tar.gz → 0.3.6__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: steve-cli
3
- Version: 0.3.5
3
+ Version: 0.3.6
4
4
  Summary: A simple CLI tool to run jobs from jobs.yaml with proper environment setup
5
5
  Author: Frank
6
6
  License: MIT
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
 
6
6
  [project]
7
7
  name = "steve-cli"
8
- version = "0.3.5"
8
+ version = "0.3.6"
9
9
  description = "A simple CLI tool to run jobs from jobs.yaml with proper environment setup"
10
10
  readme = "README.md"
11
11
  license = {text = "MIT"}
@@ -178,6 +178,7 @@ def jobs_run(job_name: str, jobs_file: Optional[Path]):
178
178
 
179
179
  APPS_DIR = Path.home() / ".steve" / "apps"
180
180
  AUTH_PROXY_INTERNAL_URL = "http://auth-proxy-service"
181
+ APP_NAME_PREFIX = "term-"
181
182
 
182
183
 
183
184
  class AppsConfig:
@@ -227,6 +228,10 @@ def _pid_file(app_name: str) -> Path:
227
228
  return APPS_DIR / f"{app_name}.pid"
228
229
 
229
230
 
231
+ def _url_file(app_name: str) -> Path:
232
+ return APPS_DIR / f"{app_name}.url"
233
+
234
+
230
235
  def _get_running_pid(app_name: str) -> Optional[int]:
231
236
  pf = _pid_file(app_name)
232
237
  if not pf.exists():
@@ -342,6 +347,9 @@ def apps_start(app_name: str, apps_file: Optional[Path]):
342
347
  existing_pid = _get_running_pid(app_name)
343
348
  if existing_pid:
344
349
  click.echo(f"⚠️ App '{app_name}' is already running (PID {existing_pid})")
350
+ uf = _url_file(app_name)
351
+ if uf.exists():
352
+ click.echo(f"🌐 Access at: {click.style(uf.read_text().strip(), fg='cyan')}")
345
353
  return
346
354
 
347
355
  command = app_def.get('command', [])
@@ -383,7 +391,7 @@ def apps_start(app_name: str, apps_file: Optional[Path]):
383
391
 
384
392
  _pid_file(app_name).write_text(str(proc.pid))
385
393
 
386
- result = _register_app(session_name, app_name, port)
394
+ result = _register_app(session_name, f"{APP_NAME_PREFIX}{app_name}", port)
387
395
 
388
396
  if result:
389
397
  click.echo(f"✅ App started (PID {proc.pid}) and registered with auth-proxy")
@@ -395,7 +403,10 @@ def apps_start(app_name: str, apps_file: Optional[Path]):
395
403
  if public_url:
396
404
  click.echo(f"🌐 Access at: {click.style(public_url, fg='cyan')}")
397
405
  else:
398
- click.echo(f"🌐 Access at (local): {click.style(f'http://localhost:{port}', fg='yellow')}")
406
+ public_url = f'http://localhost:{port}'
407
+ click.echo(f"🌐 Access at (local): {click.style(public_url, fg='yellow')}")
408
+
409
+ _url_file(app_name).write_text(public_url)
399
410
 
400
411
  click.echo(f"📄 Logs: {click.style(str(log_file), fg='yellow')}")
401
412
 
@@ -420,9 +431,10 @@ def apps_stop(app_name: str, apps_file: Optional[Path]):
420
431
  click.echo(f"❌ Failed to stop process: {e}", err=True)
421
432
 
422
433
  _pid_file(app_name).unlink(missing_ok=True)
434
+ _url_file(app_name).unlink(missing_ok=True)
423
435
 
424
436
  if session_name:
425
- _deregister_app(session_name, app_name)
437
+ _deregister_app(session_name, f"{APP_NAME_PREFIX}{app_name}")
426
438
  click.echo(f"🔌 Deregistered from auth-proxy")
427
439
 
428
440
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: steve-cli
3
- Version: 0.3.5
3
+ Version: 0.3.6
4
4
  Summary: A simple CLI tool to run jobs from jobs.yaml with proper environment setup
5
5
  Author: Frank
6
6
  License: MIT
File without changes
File without changes