r/bash • • 8d ago

I vibe-coded a bash script to run detached jobs over SSH (for n8n). Please tear it apart.

I got AI write a small bash script called runit (complete AI slop). It runs a command fully detached over SSH, so n8n can start a long job and check back on it later. Each job keeps its state in its own folder, and you can check status, read logs, send input, or kill it by PID.

I've tested it and it works for my use case, but I've hit the limit of what I know, and I'd like experienced people to look at it before I rely on it.

Things I'd love suggestions on:

Bash pitfalls or edge cases I missed

Features that are missing

Repo: https://github.com/Bipul-Bimali/Toolz

Thanks for any feedback, even harsh!

0 Upvotes

8 comments sorted by

15

u/BenZed 8d ago

vibe code scripts for humans to review? lol, get your model to review it

-6

u/Quirky-Wolf9799 8d ago edited 8d ago

No worries Even the post is (Made with AI) as long as I can think a little about the solution for the issue and look for solutions (without AI)

5

u/ladder_filter 8d ago

So you're not getting a lot of help here, so I'll chime in:

Install 2 things:

  • shellcheck
  • shfmt

The first will look for errors, the 2nd will correct formatting.

This is better than nothing.

Make sure that you write logging into your script (I haven't looked at it, too much going on this morning) and review those logs.

1

u/Quirky-Wolf9799 7d ago

Thanks I'll give a look at it,
and think about adding logs for the wrapper, It doesn't log anything on wrapper yet
Again, Thank you very very much

1

u/kai_ekael 8d ago

Guess we need a name for an "AI reviewer", imagine this will become a valuable thing (please, oh please). "Trainer", no flippin' way.

0

u/Quirky-Wolf9799 7d ago

I hope It doesn't do anything more than solve my problem,
Thanks for the response

4

u/[deleted] 8d ago

[removed] — view removed comment

-4

u/Quirky-Wolf9799 8d ago

Sure No worries,
Thanks for the response