From 426d810a62304e4c149613ac12d7448a90456830 Mon Sep 17 00:00:00 2001 From: Charlie Tonneslan Date: Sun, 10 May 2026 12:32:03 -0400 Subject: [PATCH] token create: don't show default localhost URL in output When no project URL is configured, the --url flag falls back to its default of http://localhost:7880, and that default was getting printed as "Project URL" in the token output. That's confusing since the user didn't configure anything. Now we skip the URL line if it wasn't explicitly set. --- cmd/lk/token.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cmd/lk/token.go b/cmd/lk/token.go index a5f69b47..573b15de 100644 --- a/cmd/lk/token.go +++ b/cmd/lk/token.go @@ -457,9 +457,16 @@ func createToken(ctx context.Context, c *cli.Command) error { return err } + // The --url flag defaults to localhost:7880, so don't display it unless + // the user actually configured a URL. + projectURL := project.URL + if !c.IsSet("url") && projectURL == "http://localhost:7880" { + projectURL = "" + } + if err = printTokenCreateOutput(stdout, tokenOnly, jsonOutput, tokenCreateOutput{ AccessToken: token, - ProjectURL: project.URL, + ProjectURL: projectURL, Identity: participant, Name: name, Room: room,