Skip to content

Commit 51204db

Browse files
committed
Add a flag for using dev credentials.
1 parent 817558d commit 51204db

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.nanpa/dev-flag.kdl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
minor type="added" "flag for using dev credentials"

cmd/lk/utils.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ import (
2323
"github.com/twitchtv/twirp"
2424
"github.com/urfave/cli/v3"
2525

26+
"github.com/livekit/protocol/utils/interceptors"
27+
2628
"github.com/livekit/livekit-cli/v2/pkg/config"
2729
"github.com/livekit/livekit-cli/v2/pkg/util"
28-
"github.com/livekit/protocol/utils/interceptors"
2930
)
3031

3132
var (
@@ -62,6 +63,10 @@ var (
6263
Usage: "Your `SECRET`",
6364
Sources: cli.EnvVars("LIVEKIT_API_SECRET"),
6465
},
66+
&cli.BoolFlag{
67+
Name: "dev",
68+
Usage: "Use developer credentials for local LiveKit server",
69+
},
6570
&cli.StringFlag{
6671
Name: "project",
6772
Usage: "`NAME` of a configured project",
@@ -214,6 +219,11 @@ func loadProjectDetails(c *cli.Command, opts ...loadOption) (*config.ProjectConf
214219
}
215220
return pc, nil
216221
}
222+
if c.Bool("dev") {
223+
pc.APIKey = "devkey"
224+
pc.APISecret = "secret"
225+
return pc, nil
226+
}
217227

218228
// load default project
219229
dp, err := config.LoadDefaultProject()

0 commit comments

Comments
 (0)