wokku-cli 0.5.0 → 0.5.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 07765bcc128b05f4309dcba3b0b5ac7679a67ecb7db3da6bac86b6ebe947b44d
4
- data.tar.gz: 466a009f4a186f7e621e16fbb74bae021b150a0a7bdef4f5f3e22eba417620f5
3
+ metadata.gz: 51db3894481aec24701a7fc0172ca81910c1f6967c6a00decbf5d0dadb6454eb
4
+ data.tar.gz: 7e3151f3a81c249667e3a1128eaaa58763b40d453c401504f53b35783f5da96c
5
5
  SHA512:
6
- metadata.gz: e3e6bbadba6e52c20b843542879100f0d4d40428c4b1a3f877c171c6f84452ff67ffc0bce4a15dfe182115bc32b1b7c5ea44000d8d88559c41b6e69c24bcdfde
7
- data.tar.gz: '058f35efb1dd358b5183169fbdb35ef5ce7ee68ab708576cbed8ee9b03d01a896d9c465fed9cf53d655283bc4fa3621b944f22117825e7efe9fa87c61ed245e0'
6
+ metadata.gz: c021749b27b73a5c325c1f268de70c329b9aff10c325e67cfe6ef9b2a274f656967e2bb51732393a1548ea19d193255715e8bab66bafd50b7f92de650cbc570a
7
+ data.tar.gz: e8c0fe5d6878a6105247fa049153a784885906decdc8cc92f8d3385ef357655f2d54c827658f30e6b6853a2e8eefe853ae37829f6ec92794294e0ec63c62f4c7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.2 — 2026-06-06
4
+
5
+ ### Changed
6
+
7
+ - API endpoint is now hard-locked to `https://wokku.cloud/api/v1`. Wokku is a managed-cloud product, so the endpoint is no longer configurable: removed the `WOKKU_API_URL` env override, the `auth:login --url` flag, and persisting `api_url` to `~/.wokku/config`. `mcp:install`/`mcp:switch` now pass only the token to the plugin (the MCP plugin's endpoint is fixed too, v1.2.0). Eliminates the class of bug where a stale/wrong API URL silently pointed the CLI at a dead host.
8
+
9
+ ## 0.5.1 — 2026-06-04
10
+
11
+ ### Fixed
12
+
13
+ - `wokku tunnel` — generated `frpc.toml` now writes the session token to a top-level `[metadatas]` block (in addition to `[proxies.metadatas]`). Without the top-level block frpc sent no token on the Login op, so the gateway rejected the connection before any proxy was set up. Adds `loginFailExit = true` so frpc bails immediately on auth failure instead of retrying forever.
14
+
3
15
  ## 0.5.0 — 2026-06-04
4
16
 
5
17
  `wokku tunnel` — share a local port at `https://<sub>.wokku.dev` in one command. Pairs with wokku-cloud canonical backlog 3.4.
data/README.md CHANGED
@@ -61,7 +61,7 @@ Set once and forget:
61
61
  export WOKKU_API_TOKEN=... # from wokku.cloud/dashboard/profile
62
62
  ```
63
63
 
64
- `WOKKU_API_URL` defaults to `https://wokku.cloud/api/v1` and shouldn't need to change.
64
+ The API endpoint is fixed to `https://wokku.cloud/api/v1` and is not configurable (Wokku is managed-cloud only).
65
65
 
66
66
  ## What's New in v0.2.0 (May 2026)
67
67
 
data/lib/wokku/auth.rb CHANGED
@@ -50,7 +50,7 @@ module Wokku
50
50
  when 200
51
51
  token = body.fetch("token")
52
52
  email = body.dig("user", "email")
53
- save_config({ "api_url" => url, "token" => token, "email" => email })
53
+ save_config({ "token" => token, "email" => email })
54
54
  puts
55
55
  Wokku::Output.status "Logged in as #{email}"
56
56
  Wokku::Output.status "Connected to: #{instance_label(url)}"
@@ -1,18 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- DEFAULT_API_URL = "https://wokku.cloud/api/v1"
4
-
5
3
  # --- Auth ---
6
- register "auth:login", "Authenticate with Wokku via browser device flow. Flag: --url URL (for self-hosted)" do
7
- url = DEFAULT_API_URL
4
+ register "auth:login", "Authenticate with Wokku via browser device flow" do
8
5
  while (arg = ARGV.shift)
9
- case arg
10
- when "--url" then url = ARGV.shift or abort "--url requires a value"
11
- else abort "Unknown argument: #{arg}"
12
- end
6
+ abort "Unknown argument: #{arg}"
13
7
  end
14
8
 
15
- Wokku::Auth.login_with_device_flow!(url)
9
+ Wokku::Auth.login_with_device_flow!(Wokku::Config.api_url)
16
10
  end
17
11
 
18
12
  register "auth:logout", "Log out" do
@@ -27,15 +27,14 @@ def require_logged_in!
27
27
  end
28
28
 
29
29
  def install_mcp_entry!
30
- url = Wokku::Config.api_url
31
30
  token = Wokku::Config.api_token
32
31
 
33
32
  # Idempotent — silently no-ops if the entry doesn't exist yet.
34
33
  system("claude mcp remove #{Shellwords.escape(MCP_SERVER_NAME)} > /dev/null 2>&1")
35
34
 
35
+ # Only the token is passed — the plugin's endpoint is fixed to wokku.cloud.
36
36
  ok = system(
37
37
  "claude", "mcp", "add", MCP_SERVER_NAME,
38
- "--env", "WOKKU_API_URL=#{url}",
39
38
  "--env", "WOKKU_API_TOKEN=#{token}",
40
39
  "--", "npx", "-y", "@johannesdwicahyo/wokku-plugin"
41
40
  )
@@ -111,6 +111,13 @@ register "tunnel",
111
111
  cfg.write(<<~TOML)
112
112
  serverAddr = "#{frps_host}"
113
113
  serverPort = #{frps_port}
114
+ loginFailExit = true
115
+
116
+ # Top-level metadatas: sent on the frpc Login op so the gateway can
117
+ # authenticate the client up-front. Without this, frps sees no token
118
+ # on Login and rejects the whole connection before any proxy is set up.
119
+ [metadatas]
120
+ token = "#{token}"
114
121
 
115
122
  [[proxies]]
116
123
  name = "wokku-#{sub}"
@@ -118,6 +125,8 @@ register "tunnel",
118
125
  localPort = #{local_port}
119
126
  subdomain = "#{sub}"
120
127
 
128
+ # Per-proxy metadatas: sent on NewProxy so the gateway can confirm
129
+ # the proxy registration is for the same session it auth'd at Login.
121
130
  [proxies.metadatas]
122
131
  token = "#{token}"
123
132
  TOML
data/lib/wokku/config.rb CHANGED
@@ -30,8 +30,12 @@ module Wokku
30
30
  File.chmod(0600, file)
31
31
  end
32
32
 
33
+ # Wokku is managed-cloud only — the endpoint is fixed and intentionally
34
+ # NOT overridable (no config key, no env var). Mirrors the MCP plugin.
35
+ API_URL = "https://wokku.cloud/api/v1"
36
+
33
37
  def api_url
34
- load["api_url"] || ENV["WOKKU_API_URL"] || "https://wokku.cloud/api/v1"
38
+ API_URL
35
39
  end
36
40
 
37
41
  def api_token
data/lib/wokku/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Wokku
3
- VERSION = "0.5.0"
3
+ VERSION = "0.5.2"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wokku-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johannes Dwicahyo
@@ -24,7 +24,7 @@ dependencies:
24
24
  - !ruby/object:Gem::Version
25
25
  version: '0.7'
26
26
  description: Deploy and manage apps, databases, domains, and SSH keys on Wokku.cloud
27
- or self-hosted Wokku servers.
27
+ (managed cloud).
28
28
  email:
29
29
  - johannesdwicahyo@gmail.com
30
30
  executables:
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  - !ruby/object:Gem::Version
108
108
  version: '0'
109
109
  requirements: []
110
- rubygems_version: 3.6.9
110
+ rubygems_version: 4.0.13
111
111
  specification_version: 4
112
112
  summary: Wokku CLI — manage your Wokku apps from the terminal
113
113
  test_files: []