Add --slug flag to reuse a specific subdomain across sessions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jose Luis Montañes Ojados
2026-02-09 01:27:17 +01:00
parent c83fa3530d
commit 803b4049a6
4 changed files with 68 additions and 31 deletions

View File

@@ -37,6 +37,7 @@ func main() {
tokenFlag := flag.String("token", "", "Authentication token (overrides config)")
hostHeaderFlag := flag.String("host-header", "", "Custom Host header to send to local service")
localHttpsFlag := flag.Bool("local-https", false, "Use HTTPS to connect to local service (implied if port is 443)")
slugFlag := flag.String("slug", "", "Request a specific subdomain slug (e.g., myapp)")
flag.Parse()
// Load config
@@ -58,7 +59,7 @@ func main() {
serverAddr = "localhost:2222"
}
m := tui.InitialModel(*localPort, serverAddr, authToken, *hostHeaderFlag, *localHttpsFlag)
m := tui.InitialModel(*localPort, serverAddr, authToken, *hostHeaderFlag, *localHttpsFlag, *slugFlag)
p := tea.NewProgram(m, tea.WithAltScreen())
if _, err := p.Run(); err != nil {