fix(cli): declare pyyaml and json5 as base dependencies for skyvern setup/mcp by li12345678990 · Pull Request #8879 · Skyvern-AI/skyvern · GitHub
Skip to content

fix(cli): declare pyyaml and json5 as base dependencies for skyvern setup/mcp - #8879

Open
li12345678990 wants to merge 1 commit into
Skyvern-AI:mainfrom
li12345678990:fix-base-install-mcp-setup-deps
Open

li12345678990 wants to merge 1 commit into
Skyvern-AI:mainfrom
li12345678990:fix-base-install-mcp-setup-deps

Conversation

@li12345678990

Copy link
Copy Markdown

Description

The MCP docs (docs/snippets/mcp-content.mdx) tell users to run pip install skyvern and then skyvern setup hermes / openclaw / mcporter or skyvern mcp switch. Both CLI modules import third-party packages at module level that are only installed through the server extra:

  • skyvern/cli/setup_commands.py: yaml, json5
  • skyvern/cli/mcp_commands.py: yaml

So on a base install (reproduced with the current PyPI release, skyvern==1.0.55, in a fresh venv) both documented commands stop at:

╭───────────────────────────── Missing Dependency ─────────────────────────────╮
│ This command requires a dependency that is not installed.                    │
│ Missing: yaml                                                                │
│ Run: pip install "skyvern[server]"                                           │
╰──────────────────────────────────────────────────────────────────────────────╯

(skyvern setup hermes reports Missing: json5.)

This PR adds pyyaml and json5 (same range as the existing server/local pin) to project.dependencies. Both are small, pure-Python packages, so the base install stays lightweight. uv.lock is regenerated with uv lock; the diff only adds the two entries.

It also adds tests/unit/test_base_install_cli_dependencies.py, in the style of test_dependency_python_version_markers.py. The test statically follows the module-level imports of skyvern.cli.setup_commands and skyvern.cli.mcp_commands (including the skyvern.* modules they import) and asserts that every third-party package they reach is a base dependency. That way a new top-level import can't silently break the base install again.

How Has This Been Tested?

  • The new test fails on main (skyvern.cli.setup_commands imports ['json5', 'yaml'], which are not in project.dependencies, and the same for mcp_commands with ['yaml']) and passes with this change.
  • pytest tests/unit/test_base_install_cli_dependencies.py tests/unit/test_mcp_commands.py tests/unit/test_setup_commands.py tests/unit/test_dependency_python_version_markers.py: 40 passed (env: uv pip install -e .[server] + dev group, Python 3.12).
  • Fresh venv with a plain (non-editable) install of this branch, no extras, and an empty HOME: skyvern mcp switch --dry-run now opens the switcher ("No supported MCP client config files were found…"), and skyvern setup hermes gets to the "No API key found. Run skyvern login…" prompt instead of the Missing Dependency error.
  • ruff format --check / ruff check clean on the new file.

This PR was prepared with AI assistance (Claude Code); I reviewed the change and ran the checks above.

🤖 Generated with Claude Code

The MCP docs tell users to `pip install skyvern` and then run
`skyvern setup <client>` / `skyvern mcp switch`, but those commands import
`yaml` and `json5` at module level, which are only available through the
`server` extra. On a base install they fail with a "Missing Dependency"
error that asks for `skyvern[server]`.

Add both to `project.dependencies` and add a test that checks that the
module-level third-party imports reachable from these two CLI modules
are base dependencies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 12, 2026 18:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

This branch has not been deployed

No deployments
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.

2 participants