Metadata-Version: 2.4
Name: portable-ovscode
Version: 0.2.1
Summary: Run openvscode-server anywhere with uvx
Author: WR
License-Expression: MIT
License-File: LICENSE
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# portable-ovscode

[![PyPI](https://img.shields.io/pypi/v/portable-ovscode)](https://pypi.org/project/portable-ovscode/)

Run [openvscode-server](https://github.com/gitpod-io/openvscode-server) anywhere with a single command. No pre-install needed — just `uvx`.

## Quick Start

```bash
# SSH to your server, then:
uvx portable-ovscode
```

That's it. It downloads openvscode-server (if not cached), generates a token, starts the server in the current directory, and prints the URL.

## Usage

```
uvx portable-ovscode [OPTIONS] [-- EXTRA_ARGS]
```

| Flag | Default | Description |
|------|---------|-------------|
| `--install-dir DIR` | `~/.local/share/openvscode-server` | Where to put the binary |
| `--version VER` | `1.109.5` | openvscode-server version |
| `--host ADDR` | `127.0.0.1` | Bind address |
| `--port PORT` | `3000` | Bind port |
| `--token TOKEN` | auto-generated | Connection token |
| `--no-token` | | Disable auth token |
| `--folder PATH` | | Default folder to open |
| `--https` | | Enable HTTPS with auto-generated self-signed cert |
| `--cert PATH` | | Path to TLS certificate (implies --https) |
| `--cert-key PATH` | | Path to TLS private key (implies --https) |
| `--install-only` | | Download only, print binary path |

Extra arguments after `--` are passed directly to openvscode-server.

## Examples

```bash
# Install + run on port 8080, open ~/work
uvx portable-ovscode --port 8080 --folder ~/work

# Custom install location
uvx portable-ovscode --install-dir /opt/ovscode --folder ~/project

# Specific version
uvx portable-ovscode --version 1.95.3 --folder ~/code

# Just install, don't start
uvx portable-ovscode --install-only

# HTTPS with self-signed cert (for LAN access)
uvx portable-ovscode --https --host 192.168.1.50 --port 443

# Bring your own cert
uvx portable-ovscode --cert /path/cert.pem --cert-key /path/key.pem --host 0.0.0.0

# With SSH tunnel (from local machine)
ssh -L 3000:127.0.0.1:3000 user@remote
# then on remote:
uvx portable-ovscode --folder ~/project
# open http://127.0.0.1:3000/?tkn=<printed-token> locally
```

## How It Works

1. Detects platform architecture (x64/arm64).
2. Downloads the release tarball from GitHub (cached in `--install-dir`).
3. Generates a random connection token.
4. Starts `openvscode-server` bound to loopback by default.
5. Prints the URL with token to stderr.

## License

MIT
