From c8fe3cd7c3bf3ecd2eefd70ddeeec464a391b745 Mon Sep 17 00:00:00 2001 From: William Tan <1284324+Ninja3047@users.noreply.github.com> Date: Mon, 23 Feb 2026 03:57:09 -0500 Subject: [PATCH] Show Tailscale IP in droplet list (#39) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a Tailscale IP column to `dropkit ls` output. The IP is read from the SSH config — if the configured hostname is a Tailscale IP (100.x.x.x), it's displayed; otherwise shows "—". Co-authored-by: Claude Opus 4.6 --- dropkit/main.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dropkit/main.py b/dropkit/main.py index 2f8a91d..442131b 100644 --- a/dropkit/main.py +++ b/dropkit/main.py @@ -2272,6 +2272,7 @@ def list_droplets(): table.add_column("Name", style="white", no_wrap=True) table.add_column("Status", style="white", no_wrap=True) table.add_column("IP Address", style="cyan", no_wrap=True) + table.add_column("Tailscale IP", style="magenta", no_wrap=True) table.add_column("Region", style="white", no_wrap=True) table.add_column("Size", style="white", no_wrap=True) table.add_column("SSH", style="white", no_wrap=True) @@ -2292,9 +2293,11 @@ def list_droplets(): region = droplet.get("region", {}).get("slug", "N/A") size = droplet.get("size_slug", "N/A") - # Check if in SSH config + # Check if in SSH config and get Tailscale IP ssh_hostname = get_ssh_hostname(name) in_ssh_config = "✓" if host_exists(config.ssh.config_path, ssh_hostname) else "✗" + ssh_ip = get_ssh_host_ip(config.ssh.config_path, ssh_hostname) + tailscale_ip = ssh_ip if ssh_ip and is_tailscale_ip(ssh_ip) else "—" # Color status if status == "active": @@ -2304,7 +2307,9 @@ def list_droplets(): else: status_colored = f"[red]{status}[/red]" - table.add_row(name, status_colored, ip_address, region, size, in_ssh_config) + table.add_row( + name, status_colored, ip_address, tailscale_ip, region, size, in_ssh_config + ) console.print(table)