Skip to content

feat: satori run script.sh --stdout#7

Open
satoridev01 wants to merge 4 commits intomainfrom
feat/run-script-stdout
Open

feat: satori run script.sh --stdout#7
satoridev01 wants to merge 4 commits intomainfrom
feat/run-script-stdout

Conversation

@satoridev01
Copy link
Copy Markdown
Collaborator

Summary

  • Non-YAML files passed to satori run are auto-wrapped in a playbook and executed directly (shebang is respected)
  • New --stdout flag waits for completion and prints only raw stdout (report IDs go to stderr)
  • Script is bundled in the zip with executable permissions (755) set via Python's ZipInfo, no chmod needed
  • Image defaults to debian, overrideable with --image

Usage

satori run script.sh --stdout 2>/dev/null
hola mundo

Files changed

  • src/satoricli/bundler.py — new make_script_bundle() function
  • src/satoricli/cli/commands/run.py — script detection by extension, --stdout flag

Test plan

  • satori run script.sh --stdout prints only stdout
  • satori run script.sh --stdout 2>/dev/null hides report IDs
  • satori run playbook.yml still works as before (no regression)
  • satori run script.sh --image ubuntu:22.04 --stdout uses custom image
  • Script with shebang (#!/usr/bin/python3) uses correct interpreter

🤖 Generated with Claude Code

satoridev01 and others added 3 commits March 9, 2026 10:23
satori run script.sh --stdout auto-wraps non-YAML files in a playbook
and prints only raw stdout. Interpreter is chosen by file extension
(.sh, .py, .rb, .pl, .js, .ps1, .bat, .cmd). Defaults to bash/debian.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@satoridev01 satoridev01 requested a review from gusalecar March 9, 2026 13:29
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.

1 participant