MCPcopy Index your code
hub / github.com/hughsk/browser-menu

github.com/hughsk/browser-menu @v1.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.1 ↗ · + Follow
15 symbols 24 edges 3 files 0 documented · 0% 1 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

browser-menu Flattr this!experimental

A browser-friendly implementation of substack's terminal-menu module:

browser-menu

Usage

browser-menu

The API is more or less equivalent to terminal-menu:

menu = createMenu(opts)

Create a menu with opts:

  • opts.width - menu width in em
  • opts.x - top-left corner x offset, default: 1
  • opts.y - top-left corner y offset, default: 1
  • opts.fg - foreground color, default: 'white'
  • opts.bg - background color, default: 'blue'
  • opts.padding.left - left padding in em
  • opts.padding.right - right padding in em
  • opts.padding.top - top padding in em
  • opts.padding.bottom - bottom padding in em

The menu can be driven around with the arrow keys and j/k, vi-style. To quit out of the menu, hit ^C or q.

menu.add(label)

Create a new selectable menu item with the string label.

menu.write(msg)

Write a message to the menu.

menu.reset()

Adds the menu to the document. You can also do this yourself, as menu.element points to the DOM node for the menu.

menu.close()

Unregister all listeners and bring everything back to its original state.

License

MIT. See LICENSE.md for details.

Core symbols most depended-on inside this repo

enable
called by 3
browser.js
disable
called by 3
browser.js
select
called by 1
browser.js
close
called by 1
browser.js
createMenu
called by 1
example.js
createMenu
called by 0
browser.js
add
called by 0
browser.js
mouseover
called by 0
browser.js

Shape

Function 15

Languages

TypeScript100%

Modules by API surface

browser.js14 symbols
example.js1 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add browser-menu \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page