Skip to content

feat(sdk): add environment and secret management - #63

Merged
justusschock merged 2 commits into
mainfrom
justus/env-secret-management
Jul 31, 2026
Merged

feat(sdk): add environment and secret management#63
justusschock merged 2 commits into
mainfrom
justus/env-secret-management

Conversation

@justusschock

@justusschock justusschock commented Jul 30, 2026

Copy link
Copy Markdown
Member

Summary

  • add generic user and teamspace secret list/set/delete support in Python and Go
  • add Studio environment variable management in Python and Go, plus Deployment environment variable management in Python
  • add resource-first CLI commands with redacted JSON listings and safe secret input
  • isolate Teamspace tests from persisted user configuration

Why

Configuration management should follow backend-supported resource scopes without exposing secret values or conflating generic and typed secrets.

Commands

User secrets

lightning user secret list [--json]
lightning user secret set KEY [--value-stdin] [--json]
lightning user secret delete KEY [--json]

Without --value-stdin, set reads the secret from a hidden interactive prompt.

Teamspace secrets

lightning teamspace secret list [--teamspace OWNER/TEAMSPACE] [--json]
lightning teamspace secret set KEY [--teamspace OWNER/TEAMSPACE] [--value-stdin] [--json]
lightning teamspace secret delete KEY [--teamspace OWNER/TEAMSPACE] [--json]

--teamspace defaults to the current Teamspace. Without --value-stdin, set reads the secret from a hidden interactive prompt.

Studio environment variables

lightning studio env list [--name STUDIO] [--teamspace OWNER/TEAMSPACE] [--json]
lightning studio env set KEY=VALUE [--name STUDIO] [--teamspace OWNER/TEAMSPACE] [--json]
lightning studio env delete KEY [--name STUDIO] [--teamspace OWNER/TEAMSPACE] [--json]

--name falls back to the current Studio or configured default. --teamspace defaults to the current Teamspace.

Deployment environment variables

lightning deployment env list --name DEPLOYMENT [--teamspace OWNER/TEAMSPACE] [--json]
lightning deployment env set KEY=VALUE --name DEPLOYMENT [--teamspace OWNER/TEAMSPACE] [--json]
lightning deployment env delete KEY --name DEPLOYMENT [--teamspace OWNER/TEAMSPACE] [--json]

--name is required. --teamspace defaults to the current Teamspace.

User impact

Users can manage supported secrets and direct environment variables through SDK resources and the lightning CLI. Studio and organization secret stores remain out of scope because those APIs do not exist.

@justusschock
justusschock marked this pull request as ready for review July 30, 2026 15:52
@justusschock
justusschock enabled auto-merge (squash) July 31, 2026 09:24
@justusschock
justusschock merged commit ee1255a into main Jul 31, 2026
24 checks passed
@justusschock
justusschock deleted the justus/env-secret-management branch July 31, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants