devs-cli 2.0.5__tar.gz → 2.0.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.
- {devs_cli-2.0.5/devs_cli.egg-info → devs_cli-2.0.6}/PKG-INFO +1 -1
- {devs_cli-2.0.5 → devs_cli-2.0.6}/devs/cli.py +16 -71
- {devs_cli-2.0.5 → devs_cli-2.0.6/devs_cli.egg-info}/PKG-INFO +1 -1
- {devs_cli-2.0.5 → devs_cli-2.0.6}/pyproject.toml +1 -1
- {devs_cli-2.0.5 → devs_cli-2.0.6}/LICENSE +0 -0
- {devs_cli-2.0.5 → devs_cli-2.0.6}/README.md +0 -0
- {devs_cli-2.0.5 → devs_cli-2.0.6}/devs/__init__.py +0 -0
- {devs_cli-2.0.5 → devs_cli-2.0.6}/devs/config.py +0 -0
- {devs_cli-2.0.5 → devs_cli-2.0.6}/devs/core/__init__.py +0 -0
- {devs_cli-2.0.5 → devs_cli-2.0.6}/devs/core/integration.py +0 -0
- {devs_cli-2.0.5 → devs_cli-2.0.6}/devs/exceptions.py +0 -0
- {devs_cli-2.0.5 → devs_cli-2.0.6}/devs/utils/__init__.py +0 -0
- {devs_cli-2.0.5 → devs_cli-2.0.6}/devs_cli.egg-info/SOURCES.txt +0 -0
- {devs_cli-2.0.5 → devs_cli-2.0.6}/devs_cli.egg-info/dependency_links.txt +0 -0
- {devs_cli-2.0.5 → devs_cli-2.0.6}/devs_cli.egg-info/entry_points.txt +0 -0
- {devs_cli-2.0.5 → devs_cli-2.0.6}/devs_cli.egg-info/requires.txt +0 -0
- {devs_cli-2.0.5 → devs_cli-2.0.6}/devs_cli.egg-info/top_level.txt +0 -0
- {devs_cli-2.0.5 → devs_cli-2.0.6}/setup.cfg +0 -0
- {devs_cli-2.0.5 → devs_cli-2.0.6}/tests/test_cli.py +0 -0
- {devs_cli-2.0.5 → devs_cli-2.0.6}/tests/test_cli_clean.py +0 -0
- {devs_cli-2.0.5 → devs_cli-2.0.6}/tests/test_cli_misc.py +0 -0
- {devs_cli-2.0.5 → devs_cli-2.0.6}/tests/test_cli_start.py +0 -0
- {devs_cli-2.0.5 → devs_cli-2.0.6}/tests/test_cli_stop.py +0 -0
- {devs_cli-2.0.5 → devs_cli-2.0.6}/tests/test_cli_vscode.py +0 -0
- {devs_cli-2.0.5 → devs_cli-2.0.6}/tests/test_container_manager.py +0 -0
- {devs_cli-2.0.5 → devs_cli-2.0.6}/tests/test_e2e.py +0 -0
- {devs_cli-2.0.5 → devs_cli-2.0.6}/tests/test_error_parsing.py +0 -0
- {devs_cli-2.0.5 → devs_cli-2.0.6}/tests/test_integration.py +0 -0
- {devs_cli-2.0.5 → devs_cli-2.0.6}/tests/test_live_mode.py +0 -0
- {devs_cli-2.0.5 → devs_cli-2.0.6}/tests/test_project.py +0 -0
- {devs_cli-2.0.5 → devs_cli-2.0.6}/tests/test_workspace_manager.py +0 -0
|
@@ -794,7 +794,7 @@ def runtests(dev_name: str, reset_workspace: bool, live: bool, env: tuple, debug
|
|
|
794
794
|
|
|
795
795
|
|
|
796
796
|
@cli.command()
|
|
797
|
-
@click.argument('dev_name'
|
|
797
|
+
@click.argument('dev_name')
|
|
798
798
|
@click.option('--auth', is_flag=True, help='Set up tunnel authentication (interactive, one-time setup)')
|
|
799
799
|
@click.option('--status', is_flag=True, help='Check tunnel status instead of starting')
|
|
800
800
|
@click.option('--kill', 'kill_tunnel', is_flag=True, help='Kill running tunnel')
|
|
@@ -809,26 +809,18 @@ def tunnel(dev_name: str, auth: bool, status: bool, kill_tunnel: bool, live: boo
|
|
|
809
809
|
tunnel service, and your local VS Code connects through that.
|
|
810
810
|
|
|
811
811
|
First-time setup requires authentication:
|
|
812
|
-
devs tunnel --auth
|
|
812
|
+
devs tunnel <name> --auth
|
|
813
813
|
|
|
814
|
-
|
|
814
|
+
Auth is stored in a bind-mounted directory so it persists across
|
|
815
|
+
all containers on this machine.
|
|
815
816
|
|
|
816
817
|
DEV_NAME: Development environment name
|
|
817
818
|
|
|
818
|
-
Example: devs tunnel --auth
|
|
819
|
+
Example: devs tunnel sally --auth # One-time auth setup
|
|
819
820
|
Example: devs tunnel sally # Start tunnel (background)
|
|
820
821
|
Example: devs tunnel sally --status # Check tunnel status
|
|
821
822
|
Example: devs tunnel sally --kill # Stop running tunnel
|
|
822
823
|
"""
|
|
823
|
-
# Handle authentication mode - no project or dev_name needed
|
|
824
|
-
if auth:
|
|
825
|
-
_handle_tunnel_auth(debug=debug)
|
|
826
|
-
return
|
|
827
|
-
|
|
828
|
-
# All other modes require dev_name
|
|
829
|
-
if not dev_name:
|
|
830
|
-
raise click.UsageError("DEV_NAME is required unless using --auth")
|
|
831
|
-
|
|
832
824
|
check_dependencies()
|
|
833
825
|
project = get_project()
|
|
834
826
|
|
|
@@ -847,7 +839,17 @@ def tunnel(dev_name: str, auth: bool, status: bool, kill_tunnel: bool, live: boo
|
|
|
847
839
|
# Ensure workspace exists (handles live mode internally)
|
|
848
840
|
workspace_dir = workspace_manager.create_workspace(dev_name, live=live)
|
|
849
841
|
|
|
850
|
-
if
|
|
842
|
+
if auth:
|
|
843
|
+
# Interactive authentication inside the container
|
|
844
|
+
container_manager.tunnel_auth(
|
|
845
|
+
dev_name=dev_name,
|
|
846
|
+
workspace_dir=workspace_dir,
|
|
847
|
+
debug=debug,
|
|
848
|
+
live=live,
|
|
849
|
+
extra_env=extra_env
|
|
850
|
+
)
|
|
851
|
+
|
|
852
|
+
elif status:
|
|
851
853
|
# Check tunnel status
|
|
852
854
|
is_running, status_msg = container_manager.get_tunnel_status(
|
|
853
855
|
dev_name=dev_name,
|
|
@@ -889,63 +891,6 @@ def tunnel(dev_name: str, auth: bool, status: bool, kill_tunnel: bool, live: boo
|
|
|
889
891
|
sys.exit(1)
|
|
890
892
|
|
|
891
893
|
|
|
892
|
-
def _handle_tunnel_auth(debug: bool) -> None:
|
|
893
|
-
"""Handle VS Code tunnel authentication.
|
|
894
|
-
|
|
895
|
-
Runs the VS Code CLI on the host to authenticate. Auth is stored
|
|
896
|
-
in ~/.devs/vscode-cli/ and bind-mounted into containers.
|
|
897
|
-
"""
|
|
898
|
-
try:
|
|
899
|
-
config.ensure_directories()
|
|
900
|
-
|
|
901
|
-
console.print("🔐 Setting up VS Code tunnel authentication...")
|
|
902
|
-
console.print(f" Configuration will be saved to: {config.vscode_cli_dir}")
|
|
903
|
-
console.print("")
|
|
904
|
-
console.print(" Starting interactive authentication...")
|
|
905
|
-
console.print(" Follow the prompts to authenticate with GitHub")
|
|
906
|
-
console.print("")
|
|
907
|
-
|
|
908
|
-
env = os.environ.copy()
|
|
909
|
-
env['VSCODE_CLI_DATA_DIR'] = str(config.vscode_cli_dir)
|
|
910
|
-
|
|
911
|
-
cmd = ['code', 'tunnel', 'user', 'login', '--provider', 'github']
|
|
912
|
-
|
|
913
|
-
if debug:
|
|
914
|
-
console.print(f"[dim]Running: {' '.join(cmd)}[/dim]")
|
|
915
|
-
console.print(f"[dim]VSCODE_CLI_DATA_DIR: {config.vscode_cli_dir}[/dim]")
|
|
916
|
-
|
|
917
|
-
result = subprocess.run(cmd, env=env, check=False)
|
|
918
|
-
|
|
919
|
-
if result.returncode == 0:
|
|
920
|
-
console.print("")
|
|
921
|
-
console.print("✅ Tunnel authentication configured successfully!")
|
|
922
|
-
console.print(f" Configuration saved to: {config.vscode_cli_dir}")
|
|
923
|
-
console.print(" This authentication will be shared across all devcontainers")
|
|
924
|
-
console.print("")
|
|
925
|
-
console.print("💡 You can now start tunnels from any project:")
|
|
926
|
-
console.print(" devs tunnel <name>")
|
|
927
|
-
else:
|
|
928
|
-
console.print("")
|
|
929
|
-
console.print("[yellow]Authentication was cancelled or failed.[/yellow]")
|
|
930
|
-
|
|
931
|
-
except FileNotFoundError:
|
|
932
|
-
console.print("❌ VS Code CLI not found on host machine")
|
|
933
|
-
console.print("")
|
|
934
|
-
console.print("Please install VS Code CLI first:")
|
|
935
|
-
console.print(" https://code.visualstudio.com/docs/editor/command-line")
|
|
936
|
-
console.print("")
|
|
937
|
-
console.print("Or install the standalone CLI:")
|
|
938
|
-
console.print(" curl -fSL 'https://update.code.visualstudio.com/latest/cli-linux-x64/stable' -o /tmp/vscode-cli.tar.gz")
|
|
939
|
-
console.print(" sudo tar -xf /tmp/vscode-cli.tar.gz -C /usr/local/bin")
|
|
940
|
-
sys.exit(1)
|
|
941
|
-
|
|
942
|
-
except Exception as e:
|
|
943
|
-
console.print(f"❌ Failed to configure tunnel authentication: {e}")
|
|
944
|
-
if debug:
|
|
945
|
-
import traceback
|
|
946
|
-
console.print(traceback.format_exc())
|
|
947
|
-
sys.exit(1)
|
|
948
|
-
|
|
949
894
|
|
|
950
895
|
@cli.command()
|
|
951
896
|
@click.option('--all-projects', is_flag=True, help='List containers for all projects')
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|