applescript – osascript -e command for displaying a text in the status bar?

As far as I know, there is no way to use AppleScript to insert something in the menu bar, and I searched for a long time.

There are two applications that will put things in the menu bar, based on scripts of different types:

  1. BitBar
  2. Text bar

BitBar caused a sensation a few years ago, but it is almost dead now.

TextBar is less known, but it's a much better application, in my opinion, and the developer is very responsive. You can find examples on GitHub of the types of things you can do with.