nx-dash
v0.1.6
Published
Terminal UI for browsing and running NX targets, like NX Console for the CLI.
Maintainers
Readme
nx-dash
A terminal UI for browsing and running NX targets — like NX Console, for the CLI.
nx-dash
terminal nx console · v0.1.3
↑↓ navigate ⇧↑↓ skip ←→ expand Enter run Tab/⇧Tab switch tab ⇧→ favourite type filter Esc clear ^C quit
26 projects · via nx show · ~/projects/my-monorepo
tree flat ★ favourite ● modified ↻ recent
› █ type to filter…
▾ apps
▾ landing-page ●
▸ build ★
• dev
• lint
• test
▸ web-app
▸ libsWhy
NX Console is wonderful inside VS Code and JetBrains, but if you live in the terminal you're stuck with nx run …, shell completions, and remembering every target name. nx-dash gives you the same project tree, fuzzy filter, and one-keystroke run — right in the shell, no editor required.
Features
- 🌳 Tree of projects → targets → configurations, just like NX Console.
- 🔍 Fuzzy filter — start typing; matches are ranked and highlighted.
- ⭐ Favourites — star the targets you run all day; persists per workspace.
- ● Modified — projects affected by your local changes (via
nx show projects --affected) get a dot indicator and a dedicated tab. - ↻ Recent — the last 5 targets you ran are kept in a dedicated tab so re-running is one tab away.
- ⚡ Instant restart — first launch caches the project list; subsequent launches render in milliseconds while a fresh scan runs in the background.
- 🎯 Clean handoff — the TUI fully vanishes on
Enter; the selected target runs in the original terminal with full stdio and signal forwarding. - 🧠 Remembers the last view mode (tree / flat / ★ favourites / ● modified / ↻ recent) per workspace.
- 🪶 Zero config — walks up to find
nx.json, prefers the localnxbinary, falls back to scanningproject.jsonfiles.
Quick start
# Run without installing
npx nx-dash
# Or install globally
npm install -g nx-dashThat's it — run nx-dash anywhere inside an NX monorepo. Navigate with arrows, type to filter, hit Enter to run.
Keybindings
| Key | Action |
| --------------- | ----------------------------------------------------------- |
| ↑ ↓ | Move selection |
| Shift + ↑/↓ | Skip 5 items at a time |
| ← → | Collapse / expand |
| Enter | Run selected target (or expand a project) |
| Tab | Next tab: tree → flat → ★ favourite → ● modified → ↻ recent |
| Shift + Tab | Previous tab |
| Shift + → | Toggle ★ favourite on the selected target |
| type | Fuzzy filter (auto-switches to ranked list) |
| Esc | Clear filter, then quit |
| Ctrl + C | Quit |
Flags
| Flag | Description |
| ----------------- | ---------------------------------------------------------- |
| --cwd <path> | Pretend the CLI was launched from <path> |
| --dry-run | Print the resolved nx run … command instead of executing |
| -h, --help | Show help |
| -v, --version | Print version |
How it works
nx-dash walks up from the current directory looking for nx.json, then:
- Runs
nx show projects --json(using the workspace's localnode_modules/.bin/nxwhen present) followed bynx show project <name> --jsonper project. This picks up inferred targets from plugins like@nx/viteor@nx/jest. - Falls back to globbing
project.jsonfiles ifnxisn't installed or the daemon doesn't respond.
On every successful scan the result is cached. The next launch reads the cache synchronously and renders instantly, while a fresh scan runs in the background and silently swaps in the new data when ready (a small ⠋ refreshing… indicator shows while it's in flight).
Workspace state
All per-workspace state lives under a .nx-dash/ directory at the workspace root. The directory ships its own .gitignore so nothing leaks into your commits:
<workspace>/.nx-dash/
├── .gitignore # contains: *
├── favourites.json # your starred targets
├── preferences.json # last-used view mode
├── recent.json # last 5 targets you ran
└── projects-cache.json # cached project listRequirements
- Node.js ≥ 18
- A workspace containing an
nx.jsonfile
License
MIT © Rokas Anisas
Contributing
Bug reports, feature ideas, and pull requests welcome. See CONTRIBUTING.md for the dev setup and project layout.
