vmux-cli 0.5.5__tar.gz → 0.6.2__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.
@@ -33,6 +33,7 @@ pnpm-debug.log*
33
33
  # IDE
34
34
  .idea/
35
35
  .vscode/
36
+ .codex/
36
37
  *.swp
37
38
  *.swo
38
39
  *~
@@ -49,6 +50,7 @@ Thumbs.db
49
50
  # Cloudflare
50
51
  .wrangler/
51
52
  wrangler.toml
53
+ worker/worker-configuration.d.ts
52
54
 
53
55
  # Build artifacts
54
56
  *.log
@@ -59,3 +61,12 @@ wrangler.toml
59
61
 
60
62
  # Docs
61
63
  VMUX.md
64
+
65
+ # Local secrets — wrangler dev .vars holds API keys / OAuth secrets.
66
+ # Never commit. Production secrets live in `wrangler secret put`.
67
+ .dev.vars
68
+ **/.dev.vars
69
+
70
+ # Editor + tool caches
71
+ .convx/
72
+ .cursor/hooks/state/
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vmux-cli
3
- Version: 0.5.5
3
+ Version: 0.6.2
4
4
  Summary: Run anything in the cloud. Replace uv run with vmux run.
5
5
  Project-URL: Homepage, https://vmux.sdan.io
6
6
  Project-URL: Documentation, https://vmux.sdan.io
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "vmux-cli"
7
- version = "0.5.5"
7
+ version = "0.6.2"
8
8
  description = "Run anything in the cloud. Replace uv run with vmux run."
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -66,6 +66,12 @@ Issues = "https://github.com/sdan/vmux/issues"
66
66
  [tool.hatch.build.targets.wheel]
67
67
  packages = ["vmux"]
68
68
 
69
+ [tool.hatch.build.targets.sdist]
70
+ include = [
71
+ "vmux/**/*.py",
72
+ "vmux/**/*.md",
73
+ ]
74
+
69
75
  [tool.ruff]
70
76
  line-length = 100
71
77
  target-version = "py310"
@@ -2,5 +2,5 @@
2
2
 
3
3
  from .core import run_command
4
4
 
5
- __version__ = "0.4.0"
5
+ __version__ = "0.6.1"
6
6
  __all__ = ["run_command"]
@@ -0,0 +1,122 @@
1
+ ---
2
+ name: vmux
3
+ description: Deploy to vmux cloud compute. Use when user says "deploy", "vmux", "run in cloud", "preview URL", or wants to run commands on remote compute.
4
+ ---
5
+
6
+ # vmux - Cloud Compute in 5 Seconds
7
+
8
+ Run any command in the cloud. Close your laptop, keep running.
9
+
10
+ ## Setup
11
+
12
+ ```bash
13
+ vmux whoami # Check login status
14
+ vmux login # If needed
15
+ ```
16
+
17
+ ## vmux run
18
+
19
+ ```bash
20
+ vmux run [flags] <command>
21
+ ```
22
+
23
+ ### Flags
24
+
25
+ | Flag | Short | Description |
26
+ |------|-------|-------------|
27
+ | `--json` | | Emit JSON events (for LLM/agent use) |
28
+ | `--detach` | `-d` | Run in background, return session ID immediately |
29
+ | `--port <port>` | `-p` | Expose port for preview URL (can use multiple times) |
30
+ | `--preview` | | Auto-detect port from framework and expose it |
31
+ | `--env KEY=VAL` | `-e` | Set environment variable |
32
+ | `--no-bundle` | | Skip bundling local packages (faster for scripts) |
33
+
34
+ ### Flag Combinations
35
+
36
+ Flags can be combined: `-dp 8000` = detached + port 8000
37
+
38
+ ```bash
39
+ vmux run python script.py # Streams logs, blocks
40
+ vmux run -d python script.py # Detached, returns session ID
41
+ vmux run -p 8000 python server.py # Expose port 8000, get preview URL
42
+ vmux run -dp 8000 python server.py # Detached + port (most common for web)
43
+ vmux run -d --preview bun run dev # Auto-detect port from framework
44
+ vmux run -p 3000 -p 8000 npm run dev # Multiple ports
45
+ vmux run -e API_KEY=xxx python app.py # With env var
46
+ ```
47
+
48
+ ### JSON Mode (for LLMs/agents)
49
+
50
+ ```bash
51
+ vmux run --json -d python server.py
52
+ # Returns: {"session_id": "...", "preview_urls": {...}}
53
+ ```
54
+
55
+ ## After Deploy
56
+
57
+ Always give the user:
58
+ 1. The **preview URL** (if port exposed) - format: `https://<session-id>.fullsend.dev`
59
+ 2. The **session ID**
60
+ 3. How to monitor: `vmux logs -f <session-id>`
61
+ 4. How to stop: `vmux stop <session-id>`
62
+
63
+ ## Other Commands
64
+
65
+ ```bash
66
+ vmux ps # List running sessions
67
+ vmux logs <session-id> # All logs
68
+ vmux logs -f <session-id> # Follow logs in real-time
69
+ vmux logs --tail 50 <session-id> # Last 50 lines
70
+ vmux logs -f --tail 50 <session-id> # Last 50, then follow
71
+ vmux logs --json <session-id> # JSON output for agents
72
+ vmux logs --json --tail 20 <session-id> # Last 20 lines as JSON
73
+ vmux exec <session-id> <cmd> # Run command in running session
74
+ vmux exec --json <session-id> <cmd> # JSON output
75
+ vmux exec --create <cmd> # Auto-create Modal sandbox, run command
76
+ vmux exec --create --provider cloudflare <cmd> # Auto-create Cloudflare sandbox
77
+ vmux exec --create --gpu H100 <cmd> # Modal with GPU
78
+ vmux attach <session-id> # Interactive tmux session (Ctrl+B,D to detach)
79
+ vmux stop <session-id> # Kill session
80
+ vmux stop -a # Stop all running sessions
81
+ vmux debug <session-id> # Show tmux status and processes
82
+ vmux secret set KEY # Store secret in keychain
83
+ ```
84
+
85
+ ## Agent Workflow
86
+
87
+ For LLM/agent automation, use `--json` flags:
88
+
89
+ ```bash
90
+ # Option A: Start a session explicitly, then exec
91
+ vmux run --json -d -p 8000 python server.py
92
+ # Returns: {"session_id": "abc123", "preview_urls": {"8000": "https://..."}}
93
+
94
+ # Option B: Auto-create sandbox with exec --create
95
+ vmux exec --json --create --gpu H100 "pip install torch"
96
+ # Returns: {"session_id": "abc123", "stdout": "...", "exit_code": 0}
97
+
98
+ # Check logs (last 20 lines)
99
+ # Check logs (last 20 lines)
100
+ vmux logs --json --tail 20 <session-id>
101
+ # Returns: {"logs": "...", "lines": 20}
102
+
103
+ # Execute more commands (reuse session ID)
104
+ vmux exec --json <session-id> "python train.py"
105
+ # Returns: {"session_id": "abc123", "stdout": "...", "exit_code": 0}
106
+
107
+ # Stop when done
108
+ vmux stop <session-id>
109
+ ```
110
+
111
+ ### Empty Sandbox (for interactive use)
112
+
113
+ ```bash
114
+ # Provision empty sandbox (persistent until stopped)
115
+ vmux run -d sleep infinity # Cloudflare
116
+ vmux run -d --provider modal --gpu H100 sleep infinity # Modal + GPU
117
+
118
+ # Or use exec --create (provisions + runs command in one step)
119
+ vmux exec --create "pip install torch" # Modal (default)
120
+ vmux exec --create --provider cloudflare "apt install -y curl" # Cloudflare
121
+ vmux exec --create --gpu H100 "pip install torch" # Modal + GPU
122
+ ```