Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,17 @@ lk token create --join \
--room "room-%x"
```

# Release

This project shares the same **Major** and **minor** version as [`server-sdk-go`](https://github.com/livekit/server-sdk-go) for compatibility. The `livekit-cli` must always import `server-sdk-go` with matching **major** and **minor** versions. When introducing breaking changes to `server-sdk-go`, increment its **minor** version and update `livekit-cli` to use the new version, releasing a matching CLI version accordingly.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


valid | livekit-cli | server-sdk-go | server constraint | explanation
--- | --- | --- | --- | ---
✅ | 2.2.2 | 2.2.0 | >= 2.2.0 | minor/major version match
❌ | 2.3.2 | 2.2.2 | >= 2.2.0 | minor version ahead
❌ | 3.2.2 | 2.2.2 | >= 2.2.0 | major version ahead
❌ | 2.2.2 | 2.3.2 | >= 2.3.0 | minor version behind

<!--BEGIN_REPO_NAV-->
<br/><table>
<thead><tr><th colspan="2">LiveKit Ecosystem</th></tr></thead>
Expand Down
26 changes: 23 additions & 3 deletions cmd/lk/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import (
"github.com/livekit/livekit-cli/v2/pkg/util"
lkproto "github.com/livekit/protocol/livekit"
"github.com/livekit/protocol/logger"
"github.com/livekit/server-sdk-go/v2/pkg/cloudagents"
)

const (
Expand Down Expand Up @@ -333,7 +334,7 @@ var (
},
}
subdomainPattern = regexp.MustCompile(`^(?:https?|wss?)://([^.]+)\.`)
agentsClient *agentfs.Client
agentsClient *cloudagents.Client
ignoredSecrets = []string{
"LIVEKIT_API_KEY",
"LIVEKIT_API_SECRET",
Expand Down Expand Up @@ -373,7 +374,7 @@ func createAgentClientWithOpts(ctx context.Context, cmd *cli.Command, opts ...lo
}
}

agentsClient, err = agentfs.New(agentfs.WithProject(project.URL, project.APIKey, project.APISecret))
agentsClient, err = cloudagents.New(cloudagents.WithProject(project.URL, project.APIKey, project.APISecret))
if err != nil {
return ctx, err
}
Expand Down Expand Up @@ -493,7 +494,7 @@ func createAgent(ctx context.Context, cmd *cli.Command) error {
}
var err error
// Recreate the client with the new project
agentsClient, err = agentfs.New(agentfs.WithProject(project.URL, project.APIKey, project.APISecret))
agentsClient, err = cloudagents.New(cloudagents.WithProject(project.URL, project.APIKey, project.APISecret))
if err != nil {
return err
}
Expand Down Expand Up @@ -1285,6 +1286,11 @@ func requireDockerfile(ctx context.Context, cmd *cli.Command, workingDir string,
return err
}

dockerIgnoreExists, err := agentfs.HasDockerIgnore(workingDir)
if err != nil {
return err
}

if !dockerfileExists {
if !cmd.Bool("silent") {
err := util.Await(
Expand All @@ -1309,6 +1315,20 @@ func requireDockerfile(ctx context.Context, cmd *cli.Command, workingDir string,
}
}

if !dockerIgnoreExists {
if !cmd.Bool("silent") {
fmt.Println("Creating .dockerignore...")
}
if err := agentfs.CreateDockerIgnoreFile(workingDir, projectType); err != nil {
return err
}
fmt.Println("Created [" + util.Accented(".dockerignore") + "]")
} else {
if !cmd.Bool("silent") {
fmt.Println("Using existing .dockerignore")
}
}

return nil
}

Expand Down
54 changes: 24 additions & 30 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,28 @@ require (
github.com/go-logr/logr v1.4.3
github.com/go-task/task/v3 v3.44.1
github.com/joho/godotenv v1.5.1
github.com/livekit/protocol v1.42.1-0.20251014173106-16ec4db9f66a
github.com/livekit/server-sdk-go/v2 v2.11.4-0.20251009161714-f90dc6f3d8bb
github.com/moby/buildkit v0.23.2
github.com/livekit/protocol v1.42.2-0.20251016024155-8cf58ff15ac6
github.com/livekit/server-sdk-go/v2 v2.12.1
github.com/moby/patternmatcher v0.6.0
github.com/pelletier/go-toml v1.9.5
github.com/pion/rtcp v1.2.15
github.com/pion/rtp v1.8.22
github.com/pion/webrtc/v4 v4.1.5-0.20250828044558-c376d0edf977
github.com/pion/rtp v1.8.23
github.com/pion/webrtc/v4 v4.1.6
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c
github.com/pkg/errors v0.9.1
github.com/schollz/progressbar/v3 v3.18.0
github.com/stretchr/testify v1.11.1
github.com/twitchtv/twirp v8.1.3+incompatible
github.com/urfave/cli/v3 v3.4.1
go.uber.org/atomic v1.11.0
golang.org/x/sync v0.17.0
golang.org/x/time v0.12.0
google.golang.org/protobuf v1.36.9
google.golang.org/protobuf v1.36.10
gopkg.in/yaml.v3 v3.0.1
k8s.io/apimachinery v0.33.4
)

require (
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.9-20250912141014-52f32327d4b0.1 // indirect
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.10-20250912141014-52f32327d4b0.1 // indirect
buf.build/go/protovalidate v1.0.0 // indirect
buf.build/go/protoyaml v0.6.0 // indirect
cel.dev/expr v0.24.0 // indirect
Expand All @@ -43,7 +42,6 @@ require (
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/ProtonMail/go-crypto v1.3.0 // indirect
github.com/alecthomas/chroma/v2 v2.19.0 // indirect
github.com/anchore/go-struct-converter v0.0.0-20230627203149-c72ef8859ca9 // indirect
github.com/antlr4-go/antlr/v4 v4.13.1 // indirect
github.com/atotto/clipboard v0.1.4 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
Expand All @@ -63,7 +61,7 @@ require (
github.com/cloudflare/circl v1.6.1 // indirect
github.com/containerd/console v1.0.5 // indirect
github.com/containerd/containerd/api v1.9.0 // indirect
github.com/containerd/containerd/v2 v2.1.3 // indirect
github.com/containerd/containerd/v2 v2.1.4 // indirect
github.com/containerd/continuity v0.4.5 // indirect
github.com/containerd/errdefs v1.0.0 // indirect
github.com/containerd/errdefs/pkg v0.3.0 // indirect
Expand Down Expand Up @@ -94,7 +92,6 @@ require (
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/go-task/template v0.2.0 // indirect
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
github.com/gofrs/flock v0.12.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
Expand All @@ -105,9 +102,7 @@ require (
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/websocket v1.5.3 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.1 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
github.com/in-toto/in-toto-golang v0.9.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
Expand All @@ -125,33 +120,32 @@ require (
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-localereader v0.0.1 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect
github.com/moby/buildkit v0.25.1 // indirect
github.com/moby/locker v1.0.1 // indirect
github.com/moby/sys/signal v0.7.1 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
github.com/muesli/cancelreader v0.2.2 // indirect
github.com/muesli/termenv v0.16.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/nats-io/nats.go v1.46.0 // indirect
github.com/nats-io/nats.go v1.47.0 // indirect
github.com/nats-io/nkeys v0.4.11 // indirect
github.com/nats-io/nuid v1.0.1 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.1 // indirect
github.com/opencontainers/runc v1.2.3 // indirect
github.com/pion/datachannel v1.5.10 // indirect
github.com/pion/dtls/v3 v3.0.7 // indirect
github.com/pion/ice/v4 v4.0.10 // indirect
github.com/pion/interceptor v0.1.41 // indirect
github.com/pion/logging v0.2.4 // indirect
github.com/pion/mdns/v2 v2.0.7 // indirect
github.com/pion/randutil v0.1.0 // indirect
github.com/pion/sctp v1.8.39 // indirect
github.com/pion/sctp v1.8.40 // indirect
github.com/pion/sdp/v3 v3.0.16 // indirect
github.com/pion/srtp/v3 v3.0.7 // indirect
github.com/pion/srtp/v3 v3.0.8 // indirect
github.com/pion/stun/v3 v3.0.0 // indirect
github.com/pion/transport/v3 v3.0.7 // indirect
github.com/pion/transport/v3 v3.0.8 // indirect
github.com/pion/turn/v4 v4.1.1 // indirect
github.com/pjbgf/sha1cd v0.4.0 // indirect
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
Expand Down Expand Up @@ -182,7 +176,7 @@ require (
github.com/zeebo/xxh3 v1.0.2 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.56.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.60.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect
go.opentelemetry.io/otel v1.37.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0 // indirect
Expand All @@ -193,16 +187,16 @@ require (
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
go.uber.org/zap/exp v0.3.0 // indirect
golang.org/x/crypto v0.42.0 // indirect
golang.org/x/exp v0.0.0-20250911091902-df9299821621 // indirect
golang.org/x/mod v0.28.0 // indirect
golang.org/x/net v0.44.0 // indirect
golang.org/x/sys v0.36.0 // indirect
golang.org/x/term v0.35.0 // indirect
golang.org/x/text v0.29.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250922171735-9219d122eba9 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250922171735-9219d122eba9 // indirect
google.golang.org/grpc v1.75.1 // indirect
golang.org/x/crypto v0.43.0 // indirect
golang.org/x/exp v0.0.0-20251009144603-d2f985daa21b // indirect
golang.org/x/mod v0.29.0 // indirect
golang.org/x/net v0.46.0 // indirect
golang.org/x/sys v0.37.0 // indirect
golang.org/x/term v0.36.0 // indirect
golang.org/x/text v0.30.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20251014184007-4626949a642f // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20251014184007-4626949a642f // indirect
google.golang.org/grpc v1.76.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
mvdan.cc/sh/v3 v3.12.0 // indirect
Expand Down
Loading