bash2json - fully bash-written JSON parser
so, firstly it was created as a simple parser function for my another project, but i kinda wanted to make full JSON support in vanilla bash including arrays support, so it's fully written using bash substitution and builtins
i'd be happy to listen to any critics/suggestions
https://github.com/Tirito6626/bash2json
https://redd.it/1lkhk4i
@r_bash
so, firstly it was created as a simple parser function for my another project, but i kinda wanted to make full JSON support in vanilla bash including arrays support, so it's fully written using bash substitution and builtins
i'd be happy to listen to any critics/suggestions
https://github.com/Tirito6626/bash2json
https://redd.it/1lkhk4i
@r_bash
GitHub
GitHub - Tirito6626/bash2json: The most bash-based JSON parser
The most bash-based JSON parser. Contribute to Tirito6626/bash2json development by creating an account on GitHub.
fz - Pipe commands to FZF
Hello folks,
Last week, I was showing one of my functions sourced in
Before I share the repo with other colleagues, can you please review my code and give some comments? As a non-native English speaker, I will also appreciate if you double-check the documentation.
The purpose of the noscript is facilitating the usage of FZF with some common commands:
Last, but not least, pull requests are welcome!
Thanks a lot! Hope you like it!
https://redd.it/1llnqc4
@r_bash
Hello folks,
Last week, I was showing one of my functions sourced in
.bashrc and .zshrc to one of my colleagues at work. He liked, then I decided to make it a Bash noscript on a GitHub repo, so more people can use it. Thus, I present fz - Pipe commands to FZF!Before I share the repo with other colleagues, can you please review my code and give some comments? As a non-native English speaker, I will also appreciate if you double-check the documentation.
The purpose of the noscript is facilitating the usage of FZF with some common commands:
man, ssh and kill. If you have some useful functions or alias that could be added to the noscript, please, don't hesitate to share.Last, but not least, pull requests are welcome!
Thanks a lot! Hope you like it!
https://redd.it/1llnqc4
@r_bash
GitHub
GitHub - lfromanini/fz: Pipe commands to FZF
Pipe commands to FZF. Contribute to lfromanini/fz development by creating an account on GitHub.
"File Transfer over SHell filesystem"
Hi all
If you run Midnight Commander, and open the Right or Left menu,
then you will see this:
https://i.ibb.co/BKfgjr4Q/1menu.png
There is a MenuItem there called "Shell Link",
and If you click it and then press F1 for help,
it will show you this screen:
https://i.ibb.co/8nNRsTRN/2help.png
In short, it says that bash contains a Remote File System feature,
but when I go to bash's documentation, I don't see any mentioning of it..
So does bash really has this feature?
Thank you
https://redd.it/1lmrtcu
@r_bash
Hi all
If you run Midnight Commander, and open the Right or Left menu,
then you will see this:
https://i.ibb.co/BKfgjr4Q/1menu.png
There is a MenuItem there called "Shell Link",
and If you click it and then press F1 for help,
it will show you this screen:
https://i.ibb.co/8nNRsTRN/2help.png
In short, it says that bash contains a Remote File System feature,
but when I go to bash's documentation, I don't see any mentioning of it..
So does bash really has this feature?
Thank you
https://redd.it/1lmrtcu
@r_bash
bash2json v3 with speed tests
i just finished pretty stable bash2json v3 with huge perfomance improvents, thanks to everyone who suggested any of them
here are speed comparisons of v3, v2.3.0 and jq 1.6:
https://docs.tirito.de/bash2json/reference/results/
separate functions like query now can take as low as 3ms to finish, json validation and trim are around 1-2ms. removing forking gave a huge perfomance boost
https://redd.it/1lmx9ul
@r_bash
i just finished pretty stable bash2json v3 with huge perfomance improvents, thanks to everyone who suggested any of them
here are speed comparisons of v3, v2.3.0 and jq 1.6:
https://docs.tirito.de/bash2json/reference/results/
separate functions like query now can take as low as 3ms to finish, json validation and trim are around 1-2ms. removing forking gave a huge perfomance boost
https://redd.it/1lmx9ul
@r_bash
Ubuntu bash noscript to search for files containing certain words.
Hi all, I’m working on a Bash noscript that needs to:
Search the whole Linux filesystem (starting from /) for any files containing the text “secret” or “confidential”
For each word, count:
- How many files contain it
- The total number of occurrences across all files
- List the file names
I’m using grep -ril with --exclude-dir to avoid system folders like /proc, /sys, etc. The raw grep command works, but my loop and counting part don’t seem to produce output correctly. Any advice on how to structure this safely and correctly?
Ps:
Yes this is homework related but I've already spent a lot of time struggling so finally asking here.
The professor seems to think that throwing a unsolvable problem is some metric of "being tough". I'm totally lost as to what's the use case for such a noscript. This is what colleges are teaching these days under the banner of "cybersecurity" jfc.
https://redd.it/1lnnj5d
@r_bash
Hi all, I’m working on a Bash noscript that needs to:
Search the whole Linux filesystem (starting from /) for any files containing the text “secret” or “confidential”
For each word, count:
- How many files contain it
- The total number of occurrences across all files
- List the file names
I’m using grep -ril with --exclude-dir to avoid system folders like /proc, /sys, etc. The raw grep command works, but my loop and counting part don’t seem to produce output correctly. Any advice on how to structure this safely and correctly?
Ps:
Yes this is homework related but I've already spent a lot of time struggling so finally asking here.
The professor seems to think that throwing a unsolvable problem is some metric of "being tough". I'm totally lost as to what's the use case for such a noscript. This is what colleges are teaching these days under the banner of "cybersecurity" jfc.
https://redd.it/1lnnj5d
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Reading directories and printing file names
Hey all
Looking to make a noscript that can read all directory names in a given path and then print the directory followed by all the files in that directory matching 'log' or 'conf' in that directory.
Something like:
Yes this is for homework and ive spent hours on it, ai does it but i want to see how others approach it!
https://redd.it/1ln1tuc
@r_bash
Hey all
Looking to make a noscript that can read all directory names in a given path and then print the directory followed by all the files in that directory matching 'log' or 'conf' in that directory.
Something like:
This is a directory: /bootThese are the files in this directory: config-5.16.0-kali7-amd64, This is a directory: /boot/firmwareThese are the files in this directory: config.txt, This is a directory: /boot/grub/i386-pcThese are the files in this directory: configfile.mod, This is a directory: /devThese are the files in this directory: log, This is a directory: /etcThese are the files in this directory: adduser.conf, This is a directory: /etcThese are the files in this directory: adduser.conf.dpkg-save, This is a directory: /etcThese are the files in this directory: ca-certificates.conf, This is a directory: /etcThese are the files in this directory: dconf, This is a directory: /etcThese are the files in this directory: debconf.conf, This is a directory: /etcThese are the files in this directory: deluser.conf, This is a directory: /etcThese are the files in this directory: dns2tcpd.conf, Yes this is for homework and ive spent hours on it, ai does it but i want to see how others approach it!
https://redd.it/1ln1tuc
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Do you use process substitution in your Bash noscripts?
Discovered
https://redd.it/1low2m3
@r_bash
Discovered
<(cmd) recently, super handy. How do you use it in your noscripts and anyone else using it regularly?https://redd.it/1low2m3
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Tool Release Smart-Shell: AI-Powered Terminal Assistant with Safety, Zsh & Web Search
Hey everyone — I just released a tool I’ve been working on called Smart-Shell.
🧠 It's an AI terminal assistant that converts plain English into safe Bash/Zsh commands — and it’s not just a wrapper around an API — Well tested on Bash.
✨ Key Features:
AI-powered with Google Gemini (Pro/Flash)
Built-in 4-tier command risk analysis: ✅ Safe
🔵 Info Leak
🟡 Medium (sudo/system)
🔴 High (e.g. rm -rf)
REPL mode with smart shell detection
Supports special commands like !web, !update, !history, !creator, and more
Works with pipx, has tab completion, desktop entry, dry-run, etc.
Supports both Bash and Zsh!
📘 Docs: https://lusan-sapkota.github.io/smart-shell/
💻 GitHub: https://github.com/Lusan-sapkota/smart-shell
Happy to hear your feedback or ideas for improvement 🙌
https://redd.it/1lowr64
@r_bash
Hey everyone — I just released a tool I’ve been working on called Smart-Shell.
🧠 It's an AI terminal assistant that converts plain English into safe Bash/Zsh commands — and it’s not just a wrapper around an API — Well tested on Bash.
✨ Key Features:
AI-powered with Google Gemini (Pro/Flash)
Built-in 4-tier command risk analysis: ✅ Safe
🔵 Info Leak
🟡 Medium (sudo/system)
🔴 High (e.g. rm -rf)
REPL mode with smart shell detection
Supports special commands like !web, !update, !history, !creator, and more
Works with pipx, has tab completion, desktop entry, dry-run, etc.
Supports both Bash and Zsh!
📘 Docs: https://lusan-sapkota.github.io/smart-shell/
💻 GitHub: https://github.com/Lusan-sapkota/smart-shell
Happy to hear your feedback or ideas for improvement 🙌
https://redd.it/1lowr64
@r_bash
Generating help-options from source with sed
Here's a gist of a few snippets I've been using with larger shell noscripts and makefiles. Since source location is readily accessible in both mediums, it's just a matter of parsing to use existing comments in your help options.
Someone could probably do it more cleanly with awk, but this seemed uniquely suited to sed's concept of hold space vs pattern space. As it parses the file, sed formats each comment and pushes it to the hold space like a stack. Then, when either a target or a function declaration is matched, it prints the name along with the comments from before.
It currently relies on the function keyword in bash, so the pattern could be more generic. Otherwise, there's plenty of room to format to taste and/or add ansi colors.
https://redd.it/1lpj7tm
@r_bash
Here's a gist of a few snippets I've been using with larger shell noscripts and makefiles. Since source location is readily accessible in both mediums, it's just a matter of parsing to use existing comments in your help options.
Someone could probably do it more cleanly with awk, but this seemed uniquely suited to sed's concept of hold space vs pattern space. As it parses the file, sed formats each comment and pushes it to the hold space like a stack. Then, when either a target or a function declaration is matched, it prints the name along with the comments from before.
It currently relies on the function keyword in bash, so the pattern could be more generic. Otherwise, there's plenty of room to format to taste and/or add ansi colors.
https://redd.it/1lpj7tm
@r_bash
Gist
Self Help
Self Help. GitHub Gist: instantly share code, notes, and snippets.
Collecting Core/Thread/Storage Info from Many Linux Boxes
Got 100+ Linux machines. Need a quick inventory dump in CSV format. Just the basics per machine:
• CPU cores
• Threads per core
• Total storage
• Total memory
• Used memory
• Used storage
Not lookin’ for deep stats—just clean numbers I can toss in a dashboard.
https://redd.it/1lpwygj
@r_bash
Got 100+ Linux machines. Need a quick inventory dump in CSV format. Just the basics per machine:
• CPU cores
• Threads per core
• Total storage
• Total memory
• Used memory
• Used storage
Not lookin’ for deep stats—just clean numbers I can toss in a dashboard.
https://redd.it/1lpwygj
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Runs normal locally but invisibly in BG if run from iOS shortcuts
Disclaimer: I'm just learning how to noscript, and Claude wrote this code. I DO think I fully understand what it is doing, though.
I'm making a memory box for my grandmother with dementia for the family to upload pics and videos. I'm trying to make it as turnkey and ID10T-proof as possible, so I felt iOS shortcuts seemed like a perfect solution. When I run playvids.sh (below) locally in terminal, the behavior is exactly as expected, but run from iOS shortcuts, the videos play on the host, but in the background. I can't see any video (or alt-tab to mpv), but I can hear the audio playing. This is so frustrating, since the project is basically DONE. Thanks for any insight.
https://redd.it/1lqsrcj
@r_bash
Disclaimer: I'm just learning how to noscript, and Claude wrote this code. I DO think I fully understand what it is doing, though.
I'm making a memory box for my grandmother with dementia for the family to upload pics and videos. I'm trying to make it as turnkey and ID10T-proof as possible, so I felt iOS shortcuts seemed like a perfect solution. When I run playvids.sh (below) locally in terminal, the behavior is exactly as expected, but run from iOS shortcuts, the videos play on the host, but in the background. I can't see any video (or alt-tab to mpv), but I can hear the audio playing. This is so frustrating, since the project is basically DONE. Thanks for any insight.
#!/bin/bash# Script to create and play a shuffled video playlist from ~/videos # Usage: ./play_videos.shVIDEO_DIR="$HOME/Videos" PLAYLIST_FILE="/tmp/mpv_playlist.m3u"# Check if videos directory exists if [ ! -d "$VIDEO_DIR" ]; then echo "Error: Directory $VIDEO_DIR does not exist" exit 1 fi# Create playlist file echo "Creating playlist from $VIDEO_DIR..." > "$PLAYLIST_FILE" # Clear the playlist file# Common video file extensions VIDEO_EXTENSIONS=("mp4" "avi" "mkv" "mov" "wmv" "flv" "webm" "m4v" "3gp" "ogv" "ts" "mpg" "mpeg" "m2v" "vob")# Find all video files and add to playlist found_videos=0 for ext in "${VIDEO_EXTENSIONS[@]}"; do while IFS= read -r -d '' file; do echo "$file" >> "$PLAYLIST_FILE" ((found_videos++)) done < <(find "$VIDEO_DIR" -type f -iname "*.${ext}" -print0 2>/dev/null) done# Check if any videos were found if [ $found_videos -eq 0 ]; then echo "No video files found in $VIDEO_DIR" exit 1 fiecho "Found $found_videos video files" echo "Starting mpv with shuffled playlist..."# Play with mpv # --shuffle: shuffle playlist # --loop-playlist: repeat playlist infinitely # --fullscreen: start in fullscreen # --no-osc: disable on-screen controllermpv \ --shuffle \ --loop-playlist \ --fullscreen \ --no-osc \ --playlist="$PLAYLIST_FILE"# Clean up rm -f "$PLAYLIST_FILE"https://redd.it/1lqsrcj
@r_bash
Watch does not display colors.
Before you jump to conclusion - I'm aware of ANSI escape sequences and "-c" switch, but I've found the case where it simply does not work for me. It's probably something simple that I just don't see, and it drives me crazy.
So there's this service http://wttr.in that allows to display weather on your terminal with ASCII art.
It works fine standalone:
https://preview.redd.it/p97njrekcpaf1.png?width=536&format=png&auto=webp&s=793ad61272682cb1d9dc255ed7cc9c3bf3f47229
Now let's try it with watch:
https://preview.redd.it/3ukvstjocpaf1.png?width=760&format=png&auto=webp&s=aa56a1f32ac55095b6c38a315972344681a7f875
OK, that's fine. Curl returns some escape characters, so I just need to add "-c" switch:
https://preview.redd.it/m6jz0nzscpaf1.png?width=764&format=png&auto=webp&s=42dc81cb597502525fc34e37c07f20c7a0480ffd
Why is that suddenly monochromatic?
https://preview.redd.it/n36inm34dpaf1.png?width=761&format=png&auto=webp&s=63bd240b9df1c79c711cb1a1311fc0e9e976e7f1
Terminal is just xfce4-terminal, if that makes any difference, Initially I've tried that inside the tmux session (TERM=tmux-256color), but it works all the same on terminal directly (TERM=xterm-256color).
https://redd.it/1lqxbtb
@r_bash
Before you jump to conclusion - I'm aware of ANSI escape sequences and "-c" switch, but I've found the case where it simply does not work for me. It's probably something simple that I just don't see, and it drives me crazy.
So there's this service http://wttr.in that allows to display weather on your terminal with ASCII art.
It works fine standalone:
curl -s `https://wttr.in/?AQ2nF`https://preview.redd.it/p97njrekcpaf1.png?width=536&format=png&auto=webp&s=793ad61272682cb1d9dc255ed7cc9c3bf3f47229
Now let's try it with watch:
watch -n 3600 "curl -s https://wttr.in/?AQ2nF"https://preview.redd.it/3ukvstjocpaf1.png?width=760&format=png&auto=webp&s=aa56a1f32ac55095b6c38a315972344681a7f875
OK, that's fine. Curl returns some escape characters, so I just need to add "-c" switch:
watch -c -n 3600 "curl -s https://wttr.in/?AQ2nF"https://preview.redd.it/m6jz0nzscpaf1.png?width=764&format=png&auto=webp&s=42dc81cb597502525fc34e37c07f20c7a0480ffd
Why is that suddenly monochromatic?
watch -c "ls --color=always" works just fine, so it's rather not a terminal's fault.https://preview.redd.it/n36inm34dpaf1.png?width=761&format=png&auto=webp&s=63bd240b9df1c79c711cb1a1311fc0e9e976e7f1
Terminal is just xfce4-terminal, if that makes any difference, Initially I've tried that inside the tmux session (TERM=tmux-256color), but it works all the same on terminal directly (TERM=xterm-256color).
https://redd.it/1lqxbtb
@r_bash
wttr.in
Weather report: not found
bash background loops aren't restartable
Long time user. Today I encountered surprising behavior. This pertains to GNU bash, version 5.2.37(1)-release (x86_64-pc-linux-gnu) running on Debian testing.
I've reduced the issue to the following sequence of events.
1. At the bash prompt, type the following command and run it:
> while true; do echo hello; sleep 1; done
2. While it's running, type Ctrl-Z to stop the loop and get the command prompt back.
3. Then, type fg to re-start the command.
EXPECTED BEHAVIOR: the loop resumes printing out "hello" indefinitely.
ACTUAL BEHAVIOR: the loop resumes its final iteration, and then *ends*.
This is surprising to me. I would expect an infinite loop to remain infinite, even if it's paused and restarted. However, it seems that it is not the case. Can someone explain this? Thanks.
https://redd.it/1lrqbtg
@r_bash
Long time user. Today I encountered surprising behavior. This pertains to GNU bash, version 5.2.37(1)-release (x86_64-pc-linux-gnu) running on Debian testing.
I've reduced the issue to the following sequence of events.
1. At the bash prompt, type the following command and run it:
> while true; do echo hello; sleep 1; done
2. While it's running, type Ctrl-Z to stop the loop and get the command prompt back.
3. Then, type fg to re-start the command.
EXPECTED BEHAVIOR: the loop resumes printing out "hello" indefinitely.
ACTUAL BEHAVIOR: the loop resumes its final iteration, and then *ends*.
This is surprising to me. I would expect an infinite loop to remain infinite, even if it's paused and restarted. However, it seems that it is not the case. Can someone explain this? Thanks.
https://redd.it/1lrqbtg
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
I want to create a "PTY or something like that" for LLM software, but I want your opinion...
I’ll explain the idea a bit and I’d appreciate it if you could tell me whether you think this is useless for you or something you’d like to have.
Probably the best tool an LLM can have is access to a shell; basically it can do everything and might not need any other tool, because with a shell the LLM can use any CLI program (filesystem control, run noscripts, HTTP queries, etc.). In fact, giving it a shell is usually all I really need.
However, this has created several discomforts:
\- Feeling insecure about what is being executed (the LLM could break my system)
\- I don’t want to supervise every command for some tasks, so I’d like to be sure it’ll never run something I don’t want
\- If it helps me with code, I’d like it to make its own commits using its own author (`GIT_AUTHOR_NAME` and `GIT_AUTHOR_EMAIL`) so I can use `git blame` to know which code is generated by AI, by me, or by another team member
\- I’d like to intervene or help the LLM directly in its shell
\- I’d like to be able to “spoof certain binaries” to have detailed control over each command it runs
\- I’d like to control command output and buffer size to manage tokens (i.e., truncate output when it reaches a predefined limit)
I understand that many of these issues can be solved by putting the LLM inside a container, but sometimes that seems excessive, and not all LLM programs are easy or convenient to containerize.
The solution I thought of:
I’d like to have an LLM wrapper that opens a terminal and a shell, and everything the AI executes can be seen in real time in that terminal (something like `screen`/`tmux`). That is, if the LLM runs any command, I want to see it like in any normal terminal, as if the LLM were another user typing keystrokes, and be able to intervene if necessary—for example, when a command requires user input.
In other words, connect any LLM program to a pseudo-terminal. The key is it shouldn’t be limited to console tools: the wrapper should also work with GUI apps or any binary that just makes syscalls or launches a `bash -c`.
To achieve this, we’d need a wrapper that captures all the program’s syscalls. I managed to build a small prototype using `strace`, the `noscript` command, and some environment-variable tweaks; it does the basics, and programs run as expected. I thought I could make something more serious using a library like `node-pty` in JavaScript.
Advantages of a pseudo-terminal for LLM programs:
\- Fine-grained wrapper and control on your system
\- Ability to set environment variables (e.g., change `GIT_AUTHOR_NAME` and `GIT_AUTHOR_EMAIL` so commits in that session are attributed to the LLM)
\- Ability to “spoof binaries” or “limit binaries”: a serious wrapper would go beyond PATH tricks (intercept `execve`, apply `seccomp`, etc.)
\- See in real time what the AI is doing, and intervene or collaborate in the console
\- Automatically make local commits whenever the LLM produces a significant change in a temporary branch (specific for the LLM); then run `git merge --squash` to keep the main branch clean (without dozens of LLM commits) while preserving traceability (`diff`, `blame`, etc.) of the AI’s work
\- Compatible with any container strategy you choose to add, but not strictly necessary
\- Enables more robust and efficient isolation if desired; simple PATH spoofing isn’t enough for all cases, so a flag like `--isolation` could be added
\- Should work with any program, simply running something like `wrapper_llm_pty cursor` or `wrapper_llm_pty gemini`
Brief denoscription of the experience:
Assuming you use the Cursor IDE, you could run something like `wrapper_llm_pty --term=kitty cursor ./`. Cursor would open with your usual config plus whatever overrides you set for the LLM, and a Kitty terminal would appear with a blank pseudo-terminal. It’d be your usual Cursor except that anything you or the AI does runs with the binaries you
I’ll explain the idea a bit and I’d appreciate it if you could tell me whether you think this is useless for you or something you’d like to have.
Probably the best tool an LLM can have is access to a shell; basically it can do everything and might not need any other tool, because with a shell the LLM can use any CLI program (filesystem control, run noscripts, HTTP queries, etc.). In fact, giving it a shell is usually all I really need.
However, this has created several discomforts:
\- Feeling insecure about what is being executed (the LLM could break my system)
\- I don’t want to supervise every command for some tasks, so I’d like to be sure it’ll never run something I don’t want
\- If it helps me with code, I’d like it to make its own commits using its own author (`GIT_AUTHOR_NAME` and `GIT_AUTHOR_EMAIL`) so I can use `git blame` to know which code is generated by AI, by me, or by another team member
\- I’d like to intervene or help the LLM directly in its shell
\- I’d like to be able to “spoof certain binaries” to have detailed control over each command it runs
\- I’d like to control command output and buffer size to manage tokens (i.e., truncate output when it reaches a predefined limit)
I understand that many of these issues can be solved by putting the LLM inside a container, but sometimes that seems excessive, and not all LLM programs are easy or convenient to containerize.
The solution I thought of:
I’d like to have an LLM wrapper that opens a terminal and a shell, and everything the AI executes can be seen in real time in that terminal (something like `screen`/`tmux`). That is, if the LLM runs any command, I want to see it like in any normal terminal, as if the LLM were another user typing keystrokes, and be able to intervene if necessary—for example, when a command requires user input.
In other words, connect any LLM program to a pseudo-terminal. The key is it shouldn’t be limited to console tools: the wrapper should also work with GUI apps or any binary that just makes syscalls or launches a `bash -c`.
To achieve this, we’d need a wrapper that captures all the program’s syscalls. I managed to build a small prototype using `strace`, the `noscript` command, and some environment-variable tweaks; it does the basics, and programs run as expected. I thought I could make something more serious using a library like `node-pty` in JavaScript.
Advantages of a pseudo-terminal for LLM programs:
\- Fine-grained wrapper and control on your system
\- Ability to set environment variables (e.g., change `GIT_AUTHOR_NAME` and `GIT_AUTHOR_EMAIL` so commits in that session are attributed to the LLM)
\- Ability to “spoof binaries” or “limit binaries”: a serious wrapper would go beyond PATH tricks (intercept `execve`, apply `seccomp`, etc.)
\- See in real time what the AI is doing, and intervene or collaborate in the console
\- Automatically make local commits whenever the LLM produces a significant change in a temporary branch (specific for the LLM); then run `git merge --squash` to keep the main branch clean (without dozens of LLM commits) while preserving traceability (`diff`, `blame`, etc.) of the AI’s work
\- Compatible with any container strategy you choose to add, but not strictly necessary
\- Enables more robust and efficient isolation if desired; simple PATH spoofing isn’t enough for all cases, so a flag like `--isolation` could be added
\- Should work with any program, simply running something like `wrapper_llm_pty cursor` or `wrapper_llm_pty gemini`
Brief denoscription of the experience:
Assuming you use the Cursor IDE, you could run something like `wrapper_llm_pty --term=kitty cursor ./`. Cursor would open with your usual config plus whatever overrides you set for the LLM, and a Kitty terminal would appear with a blank pseudo-terminal. It’d be your usual Cursor except that anything you or the AI does runs with the binaries you
configured and with the AI’s authorship. The typical workflow is to have another IDE open: one IDE where the AI works and another where you work, plus a real-time console you can always intervene in.
Maybe all this isn’t necessary
For now I’m using two simple noscripts: `llm_env_git_author.sh` and `wrapper_fake_bins.sh`. The first exports `GIT_AUTHOR_NAME="AI"` and `GIT_AUTHOR_EMAIL="ai@example.com"`. The second tweaks `PATH` to add a `fake_bins` directory first (plus other tricks to log all syscalls, command executions, and outputs).
So I just `source llm_env_git_author.sh` and `source wrapper_fake_bins.sh`, then run the program containing the LLM. It does most of what I want; I tried it with `gemini_cli` and it works fine. Of course, there’s no PTY (though I can log commands), and I think it’d be more human to see what the LLM does, although maybe it isn’t strictly necessary.
Note on VibeCoding:
I have strong opinions on VibeCoding. I try to limit AI use on critical parts, but I use it a lot for other tasks, especially ones I dislike. Still, I think it must be used ethically, which is why I stress that AI-generated code authorship should be explicit—for cleanliness and quality control—and because my dev team inevitably uses AI. That’s fine; I don’t forbid it, but I want to know when code was written or at least reviewed by a human, or just generated by AI with no human eye on it.
Your opinion would help me:
\- Maybe I’m discovering something very obvious—what do you think?
\- Would a program that does all this and can be configured be useful to you?
\- If you feel the same as I do, have you solved this in a better, perhaps simpler way?
\- Do you think developing a project like this is unrealistic or would require too much development effort to be worth it?
// This post was written by a human and translated from Spanish to English by an LLM
https://redd.it/1ls5q9j
@r_bash
Maybe all this isn’t necessary
For now I’m using two simple noscripts: `llm_env_git_author.sh` and `wrapper_fake_bins.sh`. The first exports `GIT_AUTHOR_NAME="AI"` and `GIT_AUTHOR_EMAIL="ai@example.com"`. The second tweaks `PATH` to add a `fake_bins` directory first (plus other tricks to log all syscalls, command executions, and outputs).
So I just `source llm_env_git_author.sh` and `source wrapper_fake_bins.sh`, then run the program containing the LLM. It does most of what I want; I tried it with `gemini_cli` and it works fine. Of course, there’s no PTY (though I can log commands), and I think it’d be more human to see what the LLM does, although maybe it isn’t strictly necessary.
Note on VibeCoding:
I have strong opinions on VibeCoding. I try to limit AI use on critical parts, but I use it a lot for other tasks, especially ones I dislike. Still, I think it must be used ethically, which is why I stress that AI-generated code authorship should be explicit—for cleanliness and quality control—and because my dev team inevitably uses AI. That’s fine; I don’t forbid it, but I want to know when code was written or at least reviewed by a human, or just generated by AI with no human eye on it.
Your opinion would help me:
\- Maybe I’m discovering something very obvious—what do you think?
\- Would a program that does all this and can be configured be useful to you?
\- If you feel the same as I do, have you solved this in a better, perhaps simpler way?
\- Do you think developing a project like this is unrealistic or would require too much development effort to be worth it?
// This post was written by a human and translated from Spanish to English by an LLM
https://redd.it/1ls5q9j
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Bash project ideas
For context i have some python knowledge and bash.
Thinking of ideas/projects that i can work on to further knowledge
https://redd.it/1ltah5b
@r_bash
For context i have some python knowledge and bash.
Thinking of ideas/projects that i can work on to further knowledge
https://redd.it/1ltah5b
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
In What File $LSColors is Defined?
Hi all
Can you please tell me in what file the $LSColors variable is defined?
Thank you
https://redd.it/1lt2yh5
@r_bash
Hi all
Can you please tell me in what file the $LSColors variable is defined?
Thank you
https://redd.it/1lt2yh5
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community