neuron-explorer
Steering-first neuron explorer for Qwen3.5-4B: push every MLP neuron, keep every rollout, browse the results
翻译准备中
正在加载完整 README。 以下为已保存的摘录。
Silvery — React for modern terminal apps
Powerful apps. Polished UIs. Proudly terminal.
React 18 + 19 with concurrent mode, Suspense, and flexbox layout. Drop-in Ink compatible (@silvery/ink) — same Box, Text, useInput API with 918/931 Ink 7.0 tests passing.查看完整 README ↗Powerful apps. Polished UIs. Proudly terminal.
$ npm install silvery react
import { useState } from "react"
import { render, Box, Text, useInput, createTerm } from "silvery"
function Counter() {
const [count, setCount] = useState(0)
useInput((input) => {
if (input === "j") setCount((c) => c + 1)
})
return (
<Box borderStyle="round" padding={1}>
<Text>Count: {count}</Text>
</Box>
)
}
using term = createTerm()
term.modes.altScreen(true)
term.modes.rawMode(true)
await render(<Counter />, term).run()
React 18 + 19 with concurrent mode, Suspense, and flexbox layout. Drop-in Ink compatible (@silvery/ink) — same Box, Text, useInput API with 918/931 Ink 7.0 tests passing.
useBoxRect() returns actual dimensions during render. No post-render measurement, no two-pass layout cycle. Enables:
overflow="scroll" with virtualizationposition="sticky" for headers and footersuserSelect boundaries, Alt+drag overrideCtrl+F with match highlighting and n/N navigationEsc, v for vim-style keyboard selection and yanking$primary, $error) and auto-detected terminal colors.createRenderer — fast unit tests with auto-refreshing CSS locators, cell-level color assertions, frame-by-frame inspectionSILVERY_STRICT — multi-level verification: buffer (incremental vs fresh), ANSI (internal parser), terminal (cross-backend), and accumulated replaypipe() providers:
Silvery grew out of building a complex terminal app — a multi-pane workspace with thousands of nodes. Components needed to know their size during render. Updates needed to be fast. Scroll containers, mouse events, focus scopes, and Playwright-style testing needed to just work. What started as a renderer grew into a layout engine, then 45+ components, theming, testing infrastructure, and eventually a framework.
Along the way, three principles emerged. Take the best from the web, stay true to the terminal, and raise the bar for developer ergonomics, architecture composability, and performance.
The Silvery Way · Silvery vs Ink · About
npx @silvery/examples to try them locallyInstall from npm; a git install resolves the TypeScript source and runs only under Bun.
| Package | Description |
|---|---|
silvery | Components, hooks, renderer — the one package you need |
@silvery/ink / @silvery/chalk | Ink compatibility — 918/931 Ink 7.0 tests, 32/32 Chalk tests |
@silvery/test | Playwright-style testing — locators, press(), buffer assertions |
@silvery/create | Composable app builder — pipe() providers (coming soon) |
@silvery/theme | 84 color schemes, semantic tokens, auto-detect |
@silvery/commander | Beautiful CLIs for free — help renders through Silvery itself |
@silvery/headless | Pure state machines — portable, no React |
@silvery/ansi | Terminal primitives — styling, SGR, detection |
Standalone projects Silvery builds on — each stands on its own:
| Project | What |
|---|---|
| Flexily | Pure JS flexbox layout engine (Yoga-compatible, 1.5-5.5× faster, zero WASM) |
| Termless | Headless terminal testing — like Playwright for terminal apps |
| terminfo.dev | Terminal feature compatibility database (161 features, 19 terminals) |
| Loggily | Structured logging + tracing + metrics |
@silvery/create)Runtimes: Bun >= 1.0 and Node.js >= 23.6. CLI (silvery command) requires Bun.
Silvery builds on ideas from Ink (React for terminals), Ratatui (cell-level buffer model), shadcn/ui (polished defaults, semantic theming), SlateJS (plugin composition, operations-as-data), The Elm Architecture / BubbleTea (TEA state machines), the CSS/Web platform (flexbox, container queries, DOM events, focus scopes), VS Code (command palette, keybindings), Playwright (locator-based testing), ProseMirror (selection model), Blessed (rich terminal UIs in JS), and Textual (CSS-like terminal theming).
MIT