-
Notifications
You must be signed in to change notification settings - Fork 87
[v2] Add OpenEnv CLI for managing environments (incl. push to Hugging Face Env Hub) #144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+2,488
−3
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…nd utilities for environment setup
…environment modules
… Face Spaces - Introduced `openenv push` command to validate and upload OpenEnv environments. - Updated `README.md` and template files to include deployment instructions. - Enhanced `pyproject.toml` with new dependencies: `pyyaml` and `huggingface_hub`. - Modified import statements to support the new command structure. - Added tests for the `push` command to ensure functionality and validation.
…tion - Introduced `_get_random_hf_space_config` function to generate random emoji and color values for Hugging Face Spaces. - Updated `_create_template_replacements` to include placeholders for the new configuration values. - Modified `README.md` template to use dynamic placeholders for emoji and color settings.
- Added coverage configuration to `pyproject.toml` to exclude specific files and lines from coverage reports. - Introduced new tests in `test_init.py` to validate environment name requirements and handle file path collisions. - Created `test_main.py` to ensure the main application handles exceptions and can be invoked as an entry point. - Expanded `test_push.py` with additional tests for authentication handling, error scenarios, and validation of input formats.
- Removed dependency on `HF_TOKEN` environment variable for Hugging Face authentication. - Updated `_ensure_hf_authenticated` function to handle login without requiring a token. - Modified README.md to reflect changes in authentication process. - Adjusted tests to verify initialization of `HfApi` without token parameter.
- Added details about the OpenEnv CLI, including commands for initializing and deploying environments. - Updated environment structure to include `openenv.yaml` for better organization. - Provided quick start instructions for using the CLI to scaffold new environments and deploy to Hugging Face Spaces.
burtenshaw
approved these changes
Nov 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
tl;dr
venv ❯ openenv --help Usage: openenv [OPTIONS] COMMAND [ARGS]... OpenEnv - HTTP-based agentic environments CLI ╭─ Options ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ --install-completion Install completion for the current shell. │ │ --show-completion Show completion for the current shell, to copy it or customize the installation. │ │ --help Show this message and exit. │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─ Commands ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ init Initialize a new OpenEnv environment │ │ push Push an OpenEnv environment to Hugging Face Spaces │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯Praxis
Test Plan
TODO
openenv convertto convert an existing environment to an OpenEnv valid environment to push