Show HN: Envoy – Command Logger

(github.com)

11 points | by heyviv 164 days ago

4 comments

  • atmanactive 162 days ago

    I'm confused: doesn't bash already log all commands in it's history file?

    • 000ooo000 162 days ago

      The readme uses history so surely the author knows this?

          function preexec_go() {
            local command_line=$(history 1 | sed 's/^ *[0-9]* *//')
            if [[ -n "$command_line" && "$command_line" != "preexec_go" ]]; then
              # CHANGE THIS PATH to the location of your 'envoy' executable
              ( 
          ~/Desktop/projects/envoy/envoy "$command_line" >/dev/null 2>&1 & ) disown
            fi
          }
          trap 'preexec_go' DEBUG
      • jbstack 162 days ago

        I think the point isn't what the author knows or does not know but rather a question for the rest of us - what does this tool offer that bash history doesn't?

        The list of features on the Github page doesn't provide an answer:

        - Starts and stops on demand: Only logs commands when you explicitly turn it on.

        - Saves to a custom file: You can specify the log file name.

        - Cross-platform: Works on both Linux and macOS using bash or zsh.

        - Minimal overhead: Runs in the background and has no noticeable impact on shell performance.

        Bash largely covers all of those too.

        • trenchpilgrim 162 days ago

          ...is this program just copying lines from shell history inti a different file?

      • theshrike79 162 days ago

        How does this differ from Atuin? https://atuin.sh

        • 000ooo000 161 days ago

          Well this one looks like AI slop, so..

        • nvader 162 days ago

          In charity, I think there is actually a product opportunity for improvements to the standard shell histfile.

          I've often been frustrated by my history not being easily shared between concurrent terminals, difficulties in searching, and lack of other metadata such as timestamp, duration and exit code.

          Although I suspect this repo was vibe-coded so far, I think there's a promising problem to solve here.

          • PeterWhittaker 162 days ago

            Not at my computer so I cannot share the sauce, but each mahcine I use has a shared bash eternal history - shared between every interactive bash instance on that machine, using nothing but bashisms.

            If I think of it later, I'll add it....

            • jpitz 161 days ago

              Then you should look at https://atuin.sh/ although I am not certain about exit code.

              • jerrygenser 162 days ago

                Why do you suspect it was vibe coded? There are 2 substantive files that are each less than 100 lines...

                Also the readme doesn't have the usual emojis for every bullet point.

                • trenchpilgrim 162 days ago

                  The godoc on logging.go is in the "AI style" rather than in the style of a typical godoc.

                  • 000ooo000 161 days ago

                    Comments on every other line stating what the line does is very LLM

                • naolesh 162 days ago

                  [dead]