GithubHelp home page GithubHelp logo

remixer-dec / navboat Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 19 KB

macos statusbar widget to run cli services, stored in a tiny YAML config

Python 100.00%
devops generative-ai macos rumps widget

navboat's Introduction


NavBoat

A quick service control widget for mac os navbar.
Transform your cli services into a YAML config file and run them in 2 clicks!

Features

  • Supports background services
  • Shows open ports for running services, click on a host opens a browser tab
  • Can show status and physical memory, of a process, including its spawned subprocesses.
  • Supports virtual environments
  • Supports environment variables
  • Supports service auto-run
  • Supports nested categories
  • Fully shuts down all processes on exit
  • Supports additional actions (like updating or building)

Setup

pip install rumps psutil PyYAML
python src/app.py

Project status

Proof-of-concept, needs refactoring. Config syntax may change. Errors in third-party services are not reported. Framework limitations allow to update the widget only when it is not open. It is partially updated every 5 seconds with a full refresh every minute.

Syntax

# required
    - name: action name
      type: subprocess # only subprocess is supported right now
      background: bool # is this a service or a single-run script
      dir: /path/to/working/directory/of/the/service # where is the target dir located
      command: ./server # what to run
      arguments: -ngl 1 # cli arguments
# optional
      env: # a list of enviromnet variables, add _clean to clear existing env.variables
      venv: # path to python venv activation file.
      wait_for: word # change service status to running only when a word is found in stdout (or on timeout). Stderr and sub-process stdout is not supported.
      shell: bool # use this to run cli commands if regular mode does not work, in this case all commands should be passed in "command" and "arguments" should be empty (TODO: fix).
      window: bool # open terminal window.
      autorun: bool # run the service when this app is started.
      subactions: # a list of extra actions to run
        - name: Update # subaction name
          when: stopped # when to show the action (update & rebuild only whe the service is running, make api calls when it is running)
          window: true # open terminal window
          command: | # list of commands to run, will be concatinated with `&&`
            git pull
            make clean
            env -i make
            exit

Improvement ideas

  • cron-like services
  • profiles for various arguments
  • auto-file-dir argument, selecting a file from directory and passing it as an argument (useful for LLM files)
  • sub-action status

Special thanks

This project is heavily based on RUMPS widget framework.

License

CC BY-NC-SA 4.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.