it watches... naenae
naenae wraps a command, watches its live output, matches regex rules and sends Discord webhook notifications.
It is useful when you want:
- start / finish / fail notifications
- progress notifications from CLI tools
- live local output and Discord updates at the same time
- PTY behavior by default for terminal-sensitive tools
naenae is intentionally minimal. It does not try to understand every tool or auto-infer the right regex rules for every project.
That part can be assisted by an agent: give the agent the downloaded repository or the tool you want to monitor and let it help you write a naenae config for that specific tool.
Install
Requirements
- Rust toolchain
- a Discord webhook URL
Install From Source
Clone the repo and install:
Build without installing:
Quick Start
Create a config (toml file):
[]
= "https://discord.com/api/webhooks/your/webhook"
= "NaeNae"
[]
= "demo"
[]
= "bash"
= ["-lc", "for i in 1 2 3 4; do echo \"$i\"; sleep 5; done"]
[[]]
= "numbers"
= "^[1-4]$"
= 1
Then run:
A practical workflow if you are too bored to understand naenae:
- clone/install NaeNae
- download or clone the repo for the tool you want to monitor or a live output
- give both repos (our output of your tool of choice) to an agent
- ask the agent to inspect the tool's output patterns and write a
naenaetoml config - run
naenaewith that config
Minimal Config
For a normal run, this is enough:
[]
= "https://discord.com/api/webhooks/your/webhook"
= "NaeNae"
[]
= "my-job"
[]
= "python"
= ["my_script.py"]
[[]]
= "progress"
= ["Best=\\d+", "gain\\s*\\+?\\d+"]
= 1
Defaults:
- PTY is enabled by default
- start / finish / fail notifications are enabled by default
stream = "both"is the default- local output is shown by default
CLI
Run using the config command:
Override the config command with a single string:
Disable PTY:
Hide local tool output:
List your processes:
Attach to a running PID with a known log file:
Examples
Detailed examples live in examples/README.md.
# edit /tmp/slow_counter.toml and add your Discord webhook
Streams
Rules can target:
stdoutstderrboth
If you omit stream, the default is both.
In PTY mode, output is merged into a single terminal stream, so notifications will report stream: combined.
Attach Mode
attach is for an already-running process.
In that mode, naenae usually needs a readable output source, such as a log file:
[]
= "/tmp/job.log"
= true
attach is best-effort. It is useful for tailing output and regex matches from
an existing process, but it does not have a reliable exit-status source, so its
final notification means the process disappeared, not that it definitely exited
successfully.
You do not need log_file for normal run mode.
Notes
--commandaccepts a full shell-style command string- if the executable is already on
PATH, use it directly - if not, use something like
python test.py test ... - PTY mode is the default because many terminal test tools behave differently without it