nox_run_session
Run one or more nox sessions using filters like name, tags, keywords, or Python version. The tool executes session automation tasks such as testing and linting.
Instructions
Run nox sessions.
Use this tool to execute one or more nox sessions in the current project. You can filter sessions by name, tags, or keywords. Use nox_list_sessions first to discover available sessions.
Args: sessions: List of session names to run (e.g., ["tests", "lint"]). Session names must contain only alphanumeric characters, hyphens, or underscores. tags: List of tags to filter sessions (e.g., ["ci", "quick"]). Only sessions matching these tags will run. keywords: A keyword expression to filter sessions (e.g., "test and not slow"). Uses Python expression syntax for matching session names. python: Python version to run sessions with (e.g., "3.11", "3.12"). Overrides the session's default Python version. timeout: Maximum seconds to wait for nox to complete. Defaults to 300.
Returns: A dictionary with 'exit_code' (0 = success), 'stdout', and 'stderr' from the nox command execution.
Example: Run tests with Python 3.11: nox_run_session(sessions=["tests"], python="3.11")
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessions | No | ||
| tags | No | ||
| keywords | No | ||
| python | No | ||
| timeout | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||