NVIDIA / NVIDIA/OpenShell

Add from_env() configuration helper for OpenShell Python SDK

Open
#1,817 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

state:triage-needed
Dominant language
Rust
Stars
8.7k
Forks
1.3k
Avg merge
2d 11h
Merged PRs (30d)
253

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the Python SDK's existing XDG and OPENSHELL_GATEWAY discovery and configuration entry points first. Define the supported environment variables and precedence, then add from_env() tests covering defaults, overrides, and invalid values. Done means existing discovery remains compatible and a short local-development and CI example is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
developer-experience, documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.