{"id":27413,"library":"sphinxcontrib-runcmd","title":"sphinxcontrib-runcmd","description":"A Sphinx extension that allows running shell commands and including their output in documentation. Version 0.2.0 (latest), stable release. No breaking changes reported.","status":"active","version":"0.2.0","language":"python","source_language":"en","source_url":"https://github.com/invenia/sphinxcontrib-runcmd","tags":["sphinx","extension","shell-command","documentation"],"install":[{"cmd":"pip install sphinxcontrib-runcmd","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Required for extension loading","package":"sphinx","optional":false}],"imports":[{"note":"Correct import path","symbol":"runcmd","correct":"from sphinxcontrib.runcmd import runcmd"}],"quickstart":{"code":"import sphinxcontrib.runcmd\n\n# In conf.py:\nextensions = ['sphinxcontrib.runcmd']\n\n# Then in your .rst files:\n# .. runcmd:: echo 'Hello World'\n#    :shell:\n#    :workdir: /tmp","lang":"python","description":"Add the extension to your Sphinx project and use the runcmd directive."},"warnings":[{"fix":"Use :stderr: flag to include stderr output.","message":"The runcmd directive does not capture stderr by default; only stdout is included in the output.","severity":"gotcha","affected_versions":"all"},{"fix":"Use absolute paths or set environment via :env: option.","message":"Commands are executed within the Sphinx build environment; path and environment variables may differ from your shell.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Ensure 'sphinxcontrib.runcmd' is in extensions list in conf.py and use '.. runcmd::' directive.","cause":"Extension not loaded or misspelled directive name.","error":"WARNING: unknown directive type 'runcmd'"},{"fix":"Add :shell: option or ensure command is a valid executable.","cause":"Command string not found or no shebang without :shell: option.","error":"OSError: [Errno 8] Exec format error"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}