Skip to content

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

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    state:triage-neededOpened without agent diagnostics and needs triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions