From b5fca0af1f8b6bcb19890c1d2504cf5db968b820 Mon Sep 17 00:00:00 2001 From: rektdeckard Date: Tue, 21 Jul 2026 12:14:53 -0600 Subject: [PATCH 1/2] feat(agents): allow omitting default git attributes --- cmd/lk/agent.go | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/cmd/lk/agent.go b/cmd/lk/agent.go index 5d6b8590..b543e406 100644 --- a/cmd/lk/agent.go +++ b/cmd/lk/agent.go @@ -76,6 +76,11 @@ var ( Required: false, } + noDefaultAttributesFlag = &cli.BoolFlag{ + Name: "no-default-attributes", + Usage: `Omit default git attributes from deployment.`, + } + secretsFileFlag = &cli.StringFlag{ Name: "secrets-file", Usage: "`FILE` containing secret KEY=VALUE pairs, one per line. These will be injected as environment variables into the agent.", @@ -91,20 +96,20 @@ var ( secretsMountFlag = &cli.StringSliceFlag{ Name: "secret-mount", - Usage: "Local path to a secret file to be mounted on agent environment", + Usage: "Local path to a secret file to be mounted on agent environment.", Required: false, } ignoreEmptySecretsFlag = &cli.BoolFlag{ Name: "ignore-empty-secrets", - Usage: "If set, will skip environment variables with empty values from secrets files instead of failing", + Usage: "If set, will skip environment variables with empty values from secrets files instead of failing.", Required: false, Value: false, } logTypeFlag = &cli.StringFlag{ Name: "log-type", - Usage: "Type of logs to retrieve. Valid values are 'deploy' and 'build'", + Usage: "Type of logs to retrieve. Valid values are 'deploy' and 'build'.", Value: "deploy", Required: false, } @@ -155,7 +160,7 @@ var ( Flags: [][]cli.Flag{{ &cli.StringFlag{ Name: "lang", - Usage: "`LANGUAGE` of the project, one of \"node\", \"python\"", + Usage: "`LANGUAGE` of the project, one of \"node\", \"python\".", Action: func(ctx context.Context, cmd *cli.Command, l string) error { if l == "" { return nil @@ -178,7 +183,7 @@ var ( sandboxFlag, &cli.BoolFlag{ Name: "no-sandbox", - Usage: "If set, will not create a sandbox for the project. ", + Usage: "If set, will not create a sandbox for the project.", Value: true, Hidden: true, }, @@ -208,6 +213,7 @@ var ( agentPrebuiltImageTarFlag, attributeFlag, attributesFlag, + noDefaultAttributesFlag, }, // NOTE: since secrets may contain commas, or indeed any special character we might want to treat as a flag separator, // we disable it entirely here and require multiple --secrets flags to be used. @@ -222,7 +228,7 @@ var ( Flags: []cli.Flag{ &cli.BoolFlag{ Name: "overwrite", - Usage: "Overwrite existing Dockerfile and/or .dockerignore if they exist", + Usage: "Overwrite existing Dockerfile and/or .dockerignore if they exist.", Required: false, Value: false, }, @@ -247,6 +253,7 @@ var ( Flags: []cli.Flag{ attributesFlag, attributeFlag, + noDefaultAttributesFlag, secretsFlag, secretsFileFlag, secretsMountFlag, @@ -398,7 +405,7 @@ var ( idFlag(false), &cli.BoolFlag{ Name: "overwrite", - Usage: "If set, will overwrite existing secrets", + Usage: "If set, will overwrite existing secrets.", Required: false, Value: false, }, @@ -1257,7 +1264,7 @@ func resolveDeployAttributes(ctx context.Context, cmd *cli.Command) (map[string] return nil, err } - if !util.IsGitRepository(ctx, workingDir) { + if cmd.Bool("no-default-attributes") || !util.IsGitRepository(ctx, workingDir) { return attrs, nil } From 7d4ee51aa3e6dd3e58ba24a6ef0e02ba1a6e2b45 Mon Sep 17 00:00:00 2001 From: rektdeckard Date: Tue, 21 Jul 2026 16:58:17 -0600 Subject: [PATCH 2/2] chore(gen): regenerate fish completions --- autocomplete/fish_autocomplete | 24 +++++++++++++----------- version.go | 2 +- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/autocomplete/fish_autocomplete b/autocomplete/fish_autocomplete index ac08db1a..07b698ea 100644 --- a/autocomplete/fish_autocomplete +++ b/autocomplete/fish_autocomplete @@ -64,18 +64,19 @@ complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subco complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy promote status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console daemon simulate help h' -a 'create' -d 'Create a new LiveKit Cloud Agent' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l secrets -r -d 'KEY=VALUE comma separated secrets. These will be injected as environment variables into the agent. These take precedence over secrets-file.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -l secrets-file -r -d '`FILE` containing secret KEY=VALUE pairs, one per line. These will be injected as environment variables into the agent.' -complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l secret-mount -r -d 'Local path to a secret file to be mounted on agent environment' -complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l ignore-empty-secrets -d 'If set, will skip environment variables with empty values from secrets files instead of failing' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l secret-mount -r -d 'Local path to a secret file to be mounted on agent environment.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l ignore-empty-secrets -d 'If set, will skip environment variables with empty values from secrets files instead of failing.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l region -r -d 'Region to deploy the agent to. If unset, will deploy to the nearest region.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l deployment -s d -r -d 'Agent deployment' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l image -r -d 'Pre-built image from the local Docker daemon (e.g. myimage:latest). Requires Docker.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l image-tar -r -d 'Pre-built image from an OCI tar file (e.g. ./image.tar). No Docker daemon required.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l attribute -r -d '`KEY=VALUE` attribute pair, may be repeated. Merged with --attributes, taking precedence on conflicting keys.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l attributes -r -d '`JSON` literal or file path containing an object of string key-value pairs. Use "-" to read from stdin.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l no-default-attributes -d 'Omit default git attributes from deployment.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy promote status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console daemon simulate help h' -a 'dockerfile' -d 'Generate Dockerfile and .dockerignore for your project' -complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from dockerfile' -f -l overwrite -d 'Overwrite existing Dockerfile and/or .dockerignore if they exist' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from dockerfile' -f -l overwrite -d 'Overwrite existing Dockerfile and/or .dockerignore if they exist.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from dockerfile' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from dockerfile; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy promote status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console daemon simulate help h' -a 'config' -d 'Creates a livekit.toml in the working directory for an existing agent.' @@ -85,12 +86,13 @@ complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subco complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy promote status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console daemon simulate help h' -a 'deploy' -d 'Deploy a new version of the agent' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -f -l attributes -r -d '`JSON` literal or file path containing an object of string key-value pairs. Use "-" to read from stdin.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -f -l attribute -r -d '`KEY=VALUE` attribute pair, may be repeated. Merged with --attributes, taking precedence on conflicting keys.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -f -l no-default-attributes -d 'Omit default git attributes from deployment.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -f -l secrets -r -d 'KEY=VALUE comma separated secrets. These will be injected as environment variables into the agent. These take precedence over secrets-file.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -l secrets-file -r -d '`FILE` containing secret KEY=VALUE pairs, one per line. These will be injected as environment variables into the agent.' -complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -f -l secret-mount -r -d 'Local path to a secret file to be mounted on agent environment' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -f -l secret-mount -r -d 'Local path to a secret file to be mounted on agent environment.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -f -l region -r -d 'Region to deploy the agent to. If unset, will deploy to the nearest region.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -f -l deployment -s d -r -d 'Agent deployment' -complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -f -l ignore-empty-secrets -d 'If set, will skip environment variables with empty values from secrets files instead of failing' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -f -l ignore-empty-secrets -d 'If set, will skip environment variables with empty values from secrets files instead of failing.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -f -l image -r -d 'Pre-built image from the local Docker daemon (e.g. myimage:latest). Requires Docker.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -f -l image-tar -r -d 'Pre-built image from an OCI tar file (e.g. ./image.tar). No Docker daemon required.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -f -l help -s h -d 'show help' @@ -108,8 +110,8 @@ complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subco complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy promote status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console daemon simulate help h' -a 'update' -d 'Update an agent metadata and secrets. This will restart the agent.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update' -f -l secrets -r -d 'KEY=VALUE comma separated secrets. These will be injected as environment variables into the agent. These take precedence over secrets-file.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update' -l secrets-file -r -d '`FILE` containing secret KEY=VALUE pairs, one per line. These will be injected as environment variables into the agent.' -complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update' -f -l secret-mount -r -d 'Local path to a secret file to be mounted on agent environment' -complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update' -f -l ignore-empty-secrets -d 'If set, will skip environment variables with empty values from secrets files instead of failing' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update' -f -l secret-mount -r -d 'Local path to a secret file to be mounted on agent environment.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update' -f -l ignore-empty-secrets -d 'If set, will skip environment variables with empty values from secrets files instead of failing.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy promote status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console daemon simulate help h' -a 'restart' -d 'Restart an agent' @@ -123,7 +125,7 @@ complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcomma complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from rollback; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy promote status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console daemon simulate help h' -a 'logs' -d 'Tail logs from agent' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from logs tail' -f -l id -r -d '`ID` of the agent. If unset, and the livekit.toml file is present, will use the id found there.' -complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from logs tail' -f -l log-type -r -d 'Type of logs to retrieve. Valid values are \'deploy\' and \'build\'' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from logs tail' -f -l log-type -r -d 'Type of logs to retrieve. Valid values are \'deploy\' and \'build\'.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from logs tail' -f -l deployment -s d -r -d 'Agent deployment' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from logs tail' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from logs tail; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' @@ -152,10 +154,10 @@ complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subco complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy promote status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console daemon simulate help h' -a 'update-secrets' -d 'Update secrets for an agent, will cause a re-start of the agent.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update-secrets' -f -l secrets -r -d 'KEY=VALUE comma separated secrets. These will be injected as environment variables into the agent. These take precedence over secrets-file.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update-secrets' -l secrets-file -r -d '`FILE` containing secret KEY=VALUE pairs, one per line. These will be injected as environment variables into the agent.' -complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update-secrets' -f -l secret-mount -r -d 'Local path to a secret file to be mounted on agent environment' -complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update-secrets' -f -l ignore-empty-secrets -d 'If set, will skip environment variables with empty values from secrets files instead of failing' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update-secrets' -f -l secret-mount -r -d 'Local path to a secret file to be mounted on agent environment.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update-secrets' -f -l ignore-empty-secrets -d 'If set, will skip environment variables with empty values from secrets files instead of failing.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update-secrets' -f -l id -r -d '`ID` of the agent. If unset, and the livekit.toml file is present, will use the id found there.' -complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update-secrets' -f -l overwrite -d 'If set, will overwrite existing secrets' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update-secrets' -f -l overwrite -d 'If set, will overwrite existing secrets.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update-secrets' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update-secrets; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy promote status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console daemon simulate help h' -a 'private-link' -d 'Manage private links for agents' diff --git a/version.go b/version.go index e82529ea..4ebba416 100644 --- a/version.go +++ b/version.go @@ -15,5 +15,5 @@ package livekitcli const ( - Version = "2.18.0" + Version = "2.18.1" )