neuron-explorer
Qwen3.5‑4B 전용 조향형 뉴런 탐색기, 모든 MLP 뉴런을 밀어 결과를 보관·탐색
Node·Deno·Bun·Python·Ruby·Go 충돌을 파일·라인별로 그룹화해 로컬 이슈로 표시 SDK·계정 필요 없음
Crashes from Node, Deno, Bun, Python, Ruby and Go become grouped local issues with a culprit file:line. No SDK, no account.
개발 도구Go · TypeScriptGitHub @abdul-hamid-achik온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
A beautiful terminal-based system monitor for macOS built with Go and Bubble Tea
저장소 README에서 가져옴
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
A terminal-based, agent-harnessable system monitor for macOS and Linux,
built in Go with the Charm ecosystem (Bubble Tea v2) and the docs site's
own palette — with local, SDK-free error tracking built in.
Monitor exposes the same system data three ways: an interactive TUI
(monitor studio), JSON CLI commands, and an MCP stdio server — for humans,
scripts, and agents alike. Running bare monitor prints help.README 전문 보기 ↗A terminal-based, agent-harnessable system monitor for macOS and Linux, built in Go with the Charm ecosystem (Bubble Tea v2) and the docs site's own palette — with local, SDK-free error tracking built in.
Monitor exposes the same system data three ways: an interactive TUI
(monitor studio), JSON CLI commands, and an MCP stdio server — for humans,
scripts, and agents alike. Running bare monitor prints help.
monitor run -- <cmd> turns crashes
and printed errors from Node, Deno, Bun, Python, Ruby and Go into grouped
issues, each with a culprit file:line, a source snippet, chained causes,
codemap blast radius and the last commit that touched the line;
monitor stacktrace parse --record replays existing logs idempotentlymonitor hot names the line inside a function that
burns CPU, heap or goroutines (from a saved profile, a live pid, or a
monitor run --name service), with source-map resolution and honest
inlining/idle warningsopen / resolved / ignored lifecycle statepowermetrics on macOS, with a
transparent CPU-load estimate fallback when sudo isn't availablego build -o bin/monitor ./cmd/monitor
WORKLOAD_SECONDS=3 ./bin/monitor run -- node examples/polyglot/js/workload.js # crash -> grouped issue
./bin/monitor issues # list issues, newest first
./bin/monitor issue latest # culprit file:line, snippet, causes, impact, next steps
./bin/monitor issue latest --md | pbcopy # paste-ready context for your agent
See the docs guides: Your First Issue, Runtimes Matrix, Hot Lines.
./bin/monitor studio # launches the TUI (9 tabs); `monitor tui` also works
./bin/monitor # prints help (the TUI is no longer the bare default)
Inspection, diagnosis, and settings commands provide --json output for
machine-readable workflows:
./bin/monitor snapshot --json | jq '.cpu' # one-shot system snapshot
./bin/monitor snapshot --compact # bounded v1 payload for agent context
./bin/monitor watch --json # stream NDJSON metric events
./bin/monitor telemetry # privacy-safe 30s metric rollups
./bin/monitor analyze --window 10s --json # bounded cross-signal diagnosis
./bin/monitor process 1234 --json # detailed process info
./bin/monitor ps --sort memory --limit 10 --json # bounded/filterable process inventory
./bin/monitor resolve --runtime node --codebase-root "$PWD" --main-script-suffix dist/server.js --json
./bin/monitor tree 1234 # process hierarchy (parent/child)
./bin/monitor kill 1234 # safety-checked (refuses protected/system PIDs)
./bin/monitor profile 1234 --type cpu --duration 10s --output run.cpuprofile --json
./bin/monitor logs capture -- mycommand --verbose # ingest exact argv into the durable log store
./bin/monitor logs search "error" --level error --since 1h --json # filtered log search
./bin/monitor stash --json # capture an incident bundle to fcheap
./bin/monitor investigate 1234 --codebase "$PWD" --json # diagnose + evidence + grouped issue
./bin/monitor run -- node server.js # SDK-free crash capture -> grouped issue
./bin/monitor run --name api --inspect -- yarn start # register a service for live hot lines
./bin/monitor stacktrace parse --record --file app.log # replay a log into issues, idempotently
./bin/monitor issues --all --json # recurring local issues (every project)
./bin/monitor issues show ISS-... --json # occurrences + evidence refs
./bin/monitor issue latest --md # explained context: culprit, causes, impact, next
./bin/monitor hot --file out.cpuprofile # which line burns CPU (also <pid> or <service>)
./bin/monitor history record # persist metric samples over time
./bin/monitor history query cpu.usage --since 1h --json # time-series + trend stats
./bin/monitor baseline save pre-deploy # capture a labeled snapshot
./bin/monitor diff pre-deploy # what changed since the baseline
./bin/monitor watch --webhook https://… --notify # cooldown-bounded alert delivery
./bin/monitor doctor --json # ecosystem tool availability
./bin/monitor doctor --require fcheap,codemap # CI gate for required integrations
./bin/monitor config set update-interval 500ms # validated, atomic settings update
./bin/monitor config show --json # effective Studio/CLI settings
./bin/monitor vault --project myapp -- mycommand # run with tinyvault secrets injected
When Monitor launches a glyphrun spec (monitor run <spec.yml>), it sets
MONITOR=1 so the child can detect it is being observed;
monitor run -- <cmd> instead exports only MONITOR_LAUNCH_ID,
MONITOR_LAUNCH_SERVICE and MONITOR_LAUNCH_ROOT.
./bin/monitor mcp serve # speaks MCP over stdio
Exposes 10 tools — 6 read-only (monitor_snapshot, monitor_processes,
monitor_doctor, monitor_analyze, monitor_issues, monitor_issue) and 4 mutating (monitor_kill,
monitor_profile_capture, monitor_investigate, monitor_record). For small
model contexts, call monitor_snapshot with {"compact":true}; the response
omits histories and bounds process/filesystem lists. Every mutating tool requires
confirm: true in its typed input; the handlers re-check it so hand-built
requests still get a structured refusal rather than acting. Standard MCP tool
annotations also identify read-only, destructive, idempotent, and closed-world
behavior for compatible client approval UX.
monitor_issue returns the bounded monitor.issue_context.v1 brief
(culprit, causes, impact, next steps) by default; pass occurrence_limit
to also get the full issue record with its occurrences. Issue payloads
carry privacy: {text_is_untrusted: true, scrubbed: N} — issue text comes
from monitored processes' own output and is scrubbed before persisting and
again at read time.
Release history is in the Changelog.
Install Monitor from the project tap:
brew install --cask abdul-hamid-achik/tap/monitor
The tap is added automatically. You do not need to run brew tap first.
Confirm that the binary is available, then open the interactive Studio:
monitor --version
monitor studio
EXPERIMENTAL: monitor studio --tuimark renders the same 9 tabs through
Tuimark instead of Bubble Tea,
over the same data. --fixture swaps in deterministic offline data (no real
process, config file, or history store touched); --dump COLSxROWS prints one
frame as JSON and exits.
go mod tidy
# Build (or use `task build`)
go build -o bin/monitor ./cmd/monitor
# Optionally install
sudo cp bin/monitor /usr/local/bin/
| Key | Action |
|---|---|
q / Ctrl+C | Quit |
→ / Tab / l | Next tab |
← / Shift+Tab / h | Previous tab |
1–9 | Jump to a tab (Overview, CPU, Memory, Temperature, Disk, Network, Processes, Settings, Trends) |
? | Open context-aware keyboard help |
p / r | Pause or resume live updates / refresh now |
Enter | Open diagnostics for the highlighted process |
/ | Search processes |
Space | Toggle process selection |
Ctrl+A / Ctrl+D | Select all / clear selection |
c / m | Sort processes by CPU / memory |
k / x | Terminate / force-kill selected (with confirmation) |
Studio (the TUI) is keyboard-driven; navigate tabs and the process table with the
keys above. Process diagnostics show identity, status, parent, CPU, RSS, memory
share, I/O, threads, and protection policy. Unsupported or unavailable metrics
include the collector's reason, and a PID that exits while inspected gets an
explicit exited state. The panel is modal: Enter, Esc, or q closes it,
r refreshes the pinned PID, ? opens help, and Ctrl+C quits Studio.
Overview, CPU, Memory, Temperature, Disk, Network, Processes, Settings, and
Trends (longer-range sparklines from monitor history record).
Settings are read from ~/.config/monitor/config.json (written atomically).
The CPU tab fits per-core gauges into a responsive one-to-four-column grid. If
the current terminal cannot show every core, Studio reports +N cores hidden
and suggests enlarging the terminal rather than silently truncating the list.
Process termination is gated on a shared safety check used by the TUI, CLI, and MCP server alike:
launchd (PID 1), kernel_task, WindowServer,
Finder, Dock, etc. cannot be terminated._mbsetupuser-owned processes are refused too.confirm: true; --yes never bypasses protection.Diagnostic evidence has a separate privacy boundary. Process argv is inspected in memory for runtime binding but is never serialized into process JSON, issue records, incident bundles, or telemetry. The default issue/log directories and incident registry are private to the current user. Incident bundles accept only regular files, verify their integrity hash before archival, and cap copied raw profiles at 128 MiB.
monitor/
├── cmd/monitor/main.go # entry point; dispatches CLI vs TUI
├── internal/
│ ├── collector/ # pub/sub metric collector (canonical pattern)
│ ├── telemetry/ # bounded, identity-free NDJSON metric windows
│ ├── cli/ # cobra subcommands (run, issues, hot, investigate, ...)
│ ├── mcp/ # MCP stdio server (10 tools; mutations confirm-gated)
│ ├── devrun/ # `monitor run -- <cmd>`: launch, copy, detect, record
│ ├── stacktrace/ # SDK-free stack-trace parsers (V8, Python, Ruby, Go, ...)
│ ├── scrub/ # secret/PII redaction for recorded error text
│ ├── project/ # project/service resolver (flag > env > git root > marker)
│ ├── explain/ # monitor.issue_context.v1 builder (culprit, causes, impact)
│ ├── sourcemap/ # dependency-free Source Map v3 decoder/resolver
│ ├── analyzer/ # anomaly rules (CPU spike, RSS growth)
│ ├── capture/ # process stdout/stderr → veclite log store
│ ├── logger/ # bounded veclite log store + keyword search
│ ├── profiler/ # CDP inspector, pprof proto, macOS `sample`, heatmaps
│ ├── procbind/ # process → runtime/codebase binding
│ ├── contextids/ # Monitor/Chalupa run correlation
│ ├── issues/ # Run/Event/Issue/Evidence persistence
│ ├── incidents/ # integrity-hashed file.cheap evidence bundles
│ ├── reload/ # localhost HTTP /reload endpoint
│ ├── temperature/ # real SMC temperature via powermetrics (+fallback)
│ ├── ecosystem/ # CLI wrappers for codemap/fcheap/tvault/glyphrun
│ ├── kill/ # safe process termination
│ ├── config/ # JSON settings (~/.config/monitor/config.json)
│ ├── ui/studio/ # the TUI (Bubble Tea v2 / charm.land)
│ └── widgets/ # sparklines, gauges, CodeFrame (lipgloss v2)
├── specs/ # glyphrun behavioral specs
├── Taskfile.yml
└── README.md
charm.land/bubbletea/v2) — TUI runtimemonitor profile/monitor hot use
the V8 inspector (CDP) for Node/Deno processes started with --inspect,
ownership-verified net/http/pprof for Go (default localhost:6060,
overridable per command), and macOS sample as a function-level-only
fallback. Bun gets exit-time .cpuprofile output (monitor run --profile)
rather than live lines; Python and Ruby get error tracking only (hot lines
need launch-time probes, a later epic). See the
Runtimes Matrix.powermetrics (macOS) with cached
sudo credentials; otherwise Monitor falls back to a CPU-load estimate and
badges each reading real or est. On Linux, temperature is always the
estimate.100% means one fully used core and multithreaded processes may exceed it;
first observations and reused PIDs are marked unavailable instead of
fabricating a zero.monitor telemetry reports host-level metrics. The
closed telemetry profile skips Monitor's own cgroup and all identity,
process, filesystem, topology, temperature, and history collectors. Linux
network and disk rates use anonymous system-wide counters; other platforms
report those rates unavailable.task check runs tidy + lint + test + a release build. Add a test alongside
every change, and a glyphrun spec in specs/ for observable behavior. See
AGENTS.md for the full contributor and agent guide.
MIT — see LICENSE.