Skip to content

Add from_env() configuration helper for OpenShell Python SDK #1817

Closed as not planned

Description

@dhirajsb

Motivation

The Python SDK should be easy to configure in CI, containers, and developer shells. A from_env() helper would make OpenShell configuration explicit and repeatable while complementing existing XDG / OPENSHELL_GATEWAY discovery.

Proposed change

Add a config constructor or client factory that loads OpenShell settings from environment variables, for example gateway address, auth/material paths, and timeout defaults.

Example shape:

client = openshell.Client.from_env()

or:

config = openshell.Config.from_env()
client = openshell.Client(config)

Acceptance criteria

  • Define and document the supported environment variables and precedence rules.
  • Add from_env() tests for defaults, explicit overrides, and invalid values.
  • Keep existing configuration/discovery behavior backward compatible.
  • Include a short docs example for local development and CI usage.

Notes

This should be SDK-only and should not require gateway/proto changes.

Activity

  1. dhirajsb commented on Aug 4, 2026

    @dhirajsb
    ContributorAuthor

    @NVIDIA/openshell-codeowners, could you please help with triage on this SDK request?

    Would an explicit from_env() configuration helper be useful for CI, container, and developer-shell integrations? If so, may I update my existing implementation and submit it as a PR after the environment-variable names and precedence are agreed?

    If RFC-0008 (#1764), #2565, or another SDK/configuration effort already owns this behavior, please point me to it so I can avoid introducing a competing public API.

  2. removed
    state:triage-neededOpened without agent diagnostics and needs triage
    on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions