{"id":37156939,"url":"https://github.com/netbrain/mnu","last_synced_at":"2026-01-14T18:39:12.924Z","repository":{"id":313209229,"uuid":"1049954472","full_name":"netbrain/mnu","owner":"netbrain","description":"A TUI menu for applications and secrets (Bitwarden)","archived":false,"fork":false,"pushed_at":"2025-09-09T06:08:15.000Z","size":72,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-15T14:12:09.735Z","etag":null,"topics":["bitwarden","launcher","launcher-application","secret-management"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/netbrain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-03T18:29:06.000Z","updated_at":"2025-10-01T22:32:27.000Z","dependencies_parsed_at":"2025-09-04T16:06:16.708Z","dependency_job_id":"86bbeaf2-93b6-4ba1-a19f-aa88c11b0386","html_url":"https://github.com/netbrain/mnu","commit_stats":null,"previous_names":["netbrain/mnu"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/netbrain/mnu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netbrain%2Fmnu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netbrain%2Fmnu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netbrain%2Fmnu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netbrain%2Fmnu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netbrain","download_url":"https://codeload.github.com/netbrain/mnu/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netbrain%2Fmnu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28430880,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T16:38:47.836Z","status":"ssl_error","status_checked_at":"2026-01-14T16:34:59.695Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitwarden","launcher","launcher-application","secret-management"],"created_at":"2026-01-14T18:39:12.198Z","updated_at":"2026-01-14T18:39:12.918Z","avatar_url":"https://github.com/netbrain.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mnu\n\n\u003cimg width=\"440\" height=\"311\" alt=\"mnu\" src=\"https://github.com/user-attachments/assets/c85e7cbc-5021-47d7-a547-b3decc4fed51\" /\u003e\n\nmnu is a small family of terminal tools:\n\n- mnu-bw: Bitwarden TUI for searching, copying credentials, and OTP.\n- mnu-run: launcher for executables on PATH (detached).\n- mnu-drun: launcher for desktop-entry (.desktop) applications discovered via XDG (detached).\n\nAll three are small, fast, and work well together. mnu-bw focuses on secure clipboard handling for secrets.\n\n\n## Requirements\n\n- mnu-bw\n  - Bitwarden CLI (`bw`) available on PATH\n  - Clipboard helpers (atotto/clipboard requirements):\n    - Linux: typically `xclip` or `xsel`\n    - macOS: uses pbcopy/pbpaste (built in)\n    - Windows: win32 APIs\n- mnu-run: no special requirements beyond a sane PATH\n- mnu-drun: an XDG-compliant environment with .desktop files in XDG_DATA_HOME/DIRS\n\n\n## Install\n\n### With Nix (flakes)\n\nThis repository’s root flake builds three packages and apps:\n\n- Build:\n  - `nix build .#mnu-bw`\n  - `nix build .#mnu-run`\n  - `nix build .#mnu-drun`\n- Run:\n  - `nix run .#mnu-bw`\n  - `nix run .#mnu-run`\n  - `nix run .#mnu-drun`\n\nUse in another flake:\n\n- Add this repo as an input and reference packages `.#mnu-bw`, `.#mnu-run`, or `.#mnu-drun` from your configuration.\n\nInstall all via a single alias (optional):\n- The root flake also exposes a default package that symlink-joins all three binaries.\n- You can surface it as pkgs.mnu via an overlay and install that one alias, e.g.:\n\n```\n  # flake.nix\n  {\n    inputs = {\n      nixpkgs.url = \"github:NixOS/nixpkgs/nixos-unstable\";\n      mnu.url = \"github:netbrain/mnu\";\n    };\n\n    outputs = { self, nixpkgs, mnu, ... }:\n    let\n      system = \"x86_64-linux\";\n      overlay = (final: prev: {\n        # Default package of the mnu flake contains all three binaries\n        mnu = mnu.packages.${final.system}.default;\n      });\n    in {\n      nixosConfigurations.my-host = nixpkgs.lib.nixosSystem {\n        inherit system;\n        modules = [\n          ({ pkgs, ... }: {\n            nixpkgs.overlays = [ overlay ];\n            environment.systemPackages = [ pkgs.mnu ];\n          })\n        ];\n      };\n    };\n  }\n```\n\nA development shell is provided that includes Go, GitHub CLI, and Bitwarden CLI.\n\n### With Go\n\n- Go 1.21+ recommended\n- Install binaries:\n  - `go install github.com/netbrain/mnu/cmd/mnu-bw@latest`\n  - `go install github.com/netbrain/mnu/cmd/mnu-run@latest`\n  - `go install github.com/netbrain/mnu/cmd/mnu-drun@latest`\n- Or build locally:\n  - `go build -o mnu-bw ./cmd/mnu-bw`\n  - `go build -o mnu-run ./cmd/mnu-run`\n  - `go build -o mnu-drun ./cmd/mnu-drun`\n\n\n## Usage\n\n- Bitwarden TUI (single instance):\n  - `mnu-bw`\n  - Subcommands:\n    - `mnu-bw serve` (pre-warm and advertise `bw serve`)\n    - `mnu-bw clear-clipboard \u003cseconds\u003e \u003cunique_id\u003e \u003c content` (internal helper; not for direct use)\n- PATH launcher:\n  - `mnu-run`\n- Desktop-entry launcher:\n  - `mnu-drun`\n\nKeybindings (TUI):\n- Global: Ctrl-C to quit; Esc to clear search or back out\n- Search/List: type to filter; Up/Down (or Ctrl-J/Ctrl-K) to navigate; Enter to select\n- Action menu: Up/Down to navigate; Enter to execute action; Esc to go back\n\n\n## Configuration (mnu-bw)\n\nmnu-bw reads configuration from `~/.config/mnu/config.yaml`. If missing, a default is created.\n\nDefaults:\n\n```\nclipboard_timeout: 15s\napi_mode: true\n```\n\n- `clipboard_timeout`: how long clipboard content remains before being cleared (Go duration, e.g., 10s, 30s, 2m)\n- `api_mode`: when true, mnu-bw orchestrates `bw serve` and talks HTTP; when false, it uses the `bw` CLI directly\n\nEnvironment:\n- `BW_SESSION`: if set, mnu-bw will use it (no unlock prompt)\n- `--debug` flag: logs to `debug.log`\n\n\n## How it works (high level)\n\n- API vs CLI\n  - In `api_mode: true`, `bw serve` is started (or discovered if already advertised) and used for operations.\n  - In `api_mode: false`, mnu-bw shells out to the `bw` CLI for status, listing, and secret retrieval.\n- Secure clipboard\n  - Copy actions stream secret data to an internal helper via stdin (no secrets in argv) and schedule clipboard clearing.\n  - A named pipe (FIFO) cancels any previous clearer so the newest copy “wins.”\n  - The helper checks the clipboard content hash before clearing to avoid clobbering user changes.\n- Runners\n  - mnu-run lists executables on PATH (deduplicated) and launches selected entries in the background (detached session).\n  - mnu-drun discovers .desktop files via XDG_DATA_HOME and XDG_DATA_DIRS and launches via their `Exec` lines (`/bin/sh -c` to support quoting).\n\n\n## Contributing\n\nIssues and PRs are welcome.\n\nPotential enhancements:\n- Tests for clipboard logic and timers\n- Additional CLI flags and UX polish\n- OSC52 clipboard fallback for remote shells\n\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetbrain%2Fmnu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetbrain%2Fmnu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetbrain%2Fmnu/lists"}