陈大猫 74ec6678bb fix(system): increase process list limit and improve Docker detection for openEuler (#1453) (#1455)
* fix(system): increase process list limit and improve Docker detection for openEuler

Root cause analysis for issue #1453:

1. Process list limit too low: The `head -n 200` pipeline capped the process
   list at 200 entries, causing the displayed count to mismatch `ps aux | wc -l`
   on systems with many processes (common on openEuler servers with Docker,
   databases, etc.). Increased limit from 200 to 2000 for both Linux/SSH
   (ps) and Windows (PowerShell) backends.

2. Docker detection failure on openEuler 24.03: The capability probe only
   relied on `docker info >/dev/null 2>&1`, which can fail even when Docker
   is running due to:
   - SSH exec channel environment differences vs interactive shell
   - Docker socket permission variations in non-interactive sessions
   - Different socket path configurations on openEuler

   Added a fallback: if `docker info` fails but the Docker socket exists at
   `/var/run/docker.sock`, Docker is still detected as available. This
   matches the behavior of other SSH terminal clients.

* fix(system): also add Docker socket fallback to fallback probe script for consistency

* fix(system): remove hardcoded process list limit, add capability probe TTL, auto-reprobe on tab switch

Three remaining issues from PR #1455:

1. Remove hardcoded `head -n 2000` / `Select-Object -First 2000`
   process list limits — virtual list handles rendering efficiently.

2. Add 60-second TTL to sessionCapabilitiesStore cache. `get()` returns
   undefined for expired entries, forcing re-probe on next access.
   `set()` always refreshes `probedAt`. Export CAPABILITIES_TTL_MS
   constant for future tuning.

3. Auto-trigger capability re-probe when switching to Docker/Tmux tab
   whose tool was previously reported unavailable — handles the case
   where Docker/Tmux was installed after the last probe.

* fix: replace Docker socket -S check with -r for permission accuracy; sync capabilities TTL with process refresh interval

- Change [ -S /var/run/docker.sock ] to [ -r /var/run/docker.sock ] in
  both the main capability probe script and the POSIX fallback (electron bridge).
  -r verifies the socket exists AND the current user has read permission,
  preventing false-positive Docker detection that leads to failed Docker ops.
- Remove hardcoded CAPABILITIES_TTL_MS (60s) from sessionCapabilitiesStore.
  Store now computes expiresAt internally in set(ttlMs) and checks it in get()
  without requiring a parameter at call sites.
- useSessionCapabilities and useSystemCapabilitiesWarmup accept a
  capabilitiesTtlMs parameter derived from
  terminalSettings.systemManagerProcessRefreshInterval (default 3s → 3 000ms).
- SystemManagerSidePanel passes the TTL from terminalSettings to the hook.
- TerminalLayerTabBridge passes TTL from stableRef settings to warmup hook.
- Fix missing refreshCapabilities destructuring in SystemManagerSidePanel.

* fix: restore process list safety cap (head -n 2000 / -First 2000)

Codex review flagged that removing the process list cap entirely could cause
timeout/maxBuffer issues on process-dense hosts. Restore head -n 2000 (POSIX)
and -First 2000 (Windows) as a safety guard with comments clarifying this is
NOT a functional limit — monitored processes still show accurate metrics.

* fix: hoist useRef/useEffect before early returns to fix React hook order violation

The useRef and useEffect for tab-switch re-probe were placed after early returns
for missing/disconnected sessions. When a session later connects, React discovers
new hooks that weren't registered before, causing hook order violation crashes.

Moved both hooks immediately after the resolvedTab computation, before any early
return path, satisfying React's Rules of Hooks.

* fix: change Docker detection from OR to AND (CLI + socket)

Both capability detection and fallback probe now require:
- docker CLI is on PATH (command -v docker)
- docker.sock is readable ([ -r /var/run/docker.sock ])

Previously used OR logic (docker info || socket readable),
which could report hasDocker=true even when docker CLI
was unavailable (e.g., non-login SSH shell).

Fixes #1453

* fix(system-monitor): prefer docker info, fallback to CLI+socket

Co-authored-by: Codex <codex@anthropic.com>

Changes:
- Line 12: Replace strict CLI+socket check with docker info first,
          falling back to CLI+socket check only if docker info fails.
- Line 139: Same fix in the fallback probe script.

This handles DOCKER_HOST, Docker contexts, and rootless Docker.

* fix: notify subscribers when TTL expires in sessionCapabilitiesStore.get()

When capabilitiesBySessionId.get() finds an expired entry, it deletes the
entry but did not notify session subscribers. This caused components to
stale capabilities until the next successful set() call.

Now get() calls notifySession() on expiry, matching the notification
behavior already present in delete().
2026-06-13 08:58:04 +08:00
2026-06-12 16:38:45 +08:00
2025-12-07 03:25:07 +08:00
2026-06-12 11:48:59 +08:00
2026-06-12 11:48:59 +08:00

Netcatty

Netcatty

🔥 AI-Powered SSH Client, SFTP Browser & Terminal Manager 🚀
netcatty.app

A beautiful, feature-rich SSH workspace built with Electron, React, and xterm.js.
🔥 Built-in AI Agent · Split terminals · Vault views · SFTP workflows · Custom themes — all in one.

GitHub Release   Platform   License

Download Latest Release

Support on Ko-fi

English · 简体中文 · 日本語


netcatty SSH (Window) 2026-04-23 11:19 PM

🔥 Catty Agent — Your IT Ops AI Partner

🚀 Boost your IT ops daily work with AI power. Catty Agent is the built-in AI assistant that understands your servers, executes commands, and handles complex multi-host operations — all through natural conversation.

🔥 What can Catty Agent do?

  • 🚀 Natural language server management — just tell it what you need, no more memorizing commands
  • 🔥 Real-time server diagnostics — check status, inspect logs, monitor resources through conversation
  • 🚀 Multi-host orchestration — coordinate tasks across multiple servers simultaneously
  • 🔥 Intelligent context awareness — understands your server environment and provides tailored responses
  • 🚀 One-click complex operations — set up clusters, deploy services, and more with simple instructions

🎬 AI in Action

🔥 Single Host — Intelligent Server Diagnostics

Ask Catty Agent to check a server's health, and it runs the right commands, analyzes the output, and gives you a clear summary — all in seconds.

https://github.com/user-attachments/assets/f819a1b6-8cba-4910-8017-97dfc080b477

🚀 Multi-Host — Docker Swarm Cluster Setup

Watch Catty Agent orchestrate a Docker Swarm cluster across two servers in one conversation. It handles the init, token exchange, and node joining — you just tell it what you want.

https://github.com/user-attachments/assets/52fd30b8-9f02-43d4-a3b2-142691e8e3ec


Contents


What is Netcatty

Netcatty is a modern SSH client and terminal manager for macOS, Windows, and Linux, designed for developers, sysadmins, and DevOps engineers who need to manage multiple remote servers efficiently.

  • Netcatty is an alternative to PuTTY, Termius, SecureCRT, and macOS Terminal.app for SSH connections
  • Netcatty is a powerful SFTP client with dual-pane file browser
  • Netcatty is a terminal workspace with split panes, tabs, and session management
  • Netcatty supports SSH, local terminal, Telnet, Mosh, and Serial connections (when available)
  • Netcatty is not a shell replacement — it connects to shells via SSH/Telnet/Mosh or local/serial sessions

Why Netcatty

If you regularly work with a fleet of servers, Netcatty is built for speed and flow:

  • Workspace-first — split panes + tabs + session restore for “always-on” workflows
  • Vault organization — grid/list/tree views with fast search and drag-friendly workflows
  • Serious SFTP — built-in editor + drag & drop + smooth file operations

Features

🗂️ Vault

  • Multiple views — grid / list / tree
  • Fast search — locate hosts and groups quickly

🖥️ Terminal Workspaces

  • Split panes — horizontal and vertical splits for multi-tasking
  • Session management — run multiple connections side-by-side

📁 SFTP + Built-in Editor

  • File workflows — drag & drop uploads/downloads
  • Edit in place — built-in editor for quick changes

🎨 Personalization

  • Custom themes — tune the app appearance to your taste
  • Keyword highlighting — customize highlight rules for terminal output

Demos

Video previews (stored in screenshots/gifs/), rendered inline on GitHub:

Vault views: grid / list / tree

Switch between different Vault views to match your workflow: overview in grid, dense scanning in list, and hierarchical navigation in tree.

https://github.com/user-attachments/assets/1ff1f3f1-e5ae-40ea-b35a-0e5148c3afeb

Split terminals + session management

Work in multiple sessions at once with split panes. Keep related tasks side-by-side and reduce context switching.

https://github.com/user-attachments/assets/9c24b519-4b4b-4910-a22a-590d04c9af31

SFTP: drag & drop + built-in editor

Move files with drag & drop, then edit quickly using the built-in editor without leaving the app.

https://github.com/user-attachments/assets/f3afdb36-399d-4330-b9f3-4678f178f6db

Drag file upload

Drop files into the app to kick off uploads without hunting through dialogs.

https://github.com/user-attachments/assets/e1e26f7a-3489-41cc-975e-8dccba56ea85

Custom themes

Make Netcatty yours: customize themes and UI appearance.

https://github.com/user-attachments/assets/1a6049aa-9a4c-4d52-a13d-0b007a791b00

Keyword highlighting

Highlight important terminal output so errors, warnings, and key events stand out at a glance.

https://github.com/user-attachments/assets/1a1db7bd-948b-4f3c-97cd-8fd0cbe7cce7


Screenshots

Main Window

The main window is designed for long-running SSH workflows: quick access to sessions, navigation, and core tools in one place.

Main Window (Dark)

Main Window (Light)

Vault Views

Organize and navigate your hosts using the view that best fits the moment: grid for overview, list for scanning, tree for structure.

Vault Grid View

Vault List View

Vault Tree View (Dark)

Vault Tree View (Light)

Split Terminals

Split panes help you monitor multiple servers/services at the same time (deploy + logs + metrics) without juggling windows.

Split Windows


Supported Distros

Netcatty automatically detects and displays OS icons for connected hosts:

Ubuntu Debian CentOS Fedora Arch Linux Alpine Amazon Linux Red Hat Rocky Linux openSUSE Oracle Linux Kali Linux AlmaLinux

Getting Started

Download

Download the latest release for your platform from GitHub Releases.

OS Support
macOS Universal (x64 / arm64)
Windows x64 / arm64
Linux x64 / arm64

Or browse all releases at GitHub Releases.

macOS Users: Current releases are expected to be code-signed and notarized. If Gatekeeper still warns, make sure you downloaded the latest official build from GitHub Releases.

Prerequisites

  • Node.js 18+ and npm
  • macOS, Windows 10+, or Linux

Development

# Clone the repository
git clone https://github.com/binaricat/Netcatty.git
cd Netcatty

# Install dependencies
npm install

# Start development mode (Vite + Electron)
npm run dev

Project Structure

├── App.tsx                 # Main React application
├── components/             # React components
│   ├── Terminal.tsx        # Terminal component
│   ├── SftpView.tsx        # SFTP browser
│   ├── VaultView.tsx       # Host management
│   ├── KeyManager.tsx      # SSH key management
│   └── ...
├── application/            # State management & i18n
├── domain/                 # Domain models & logic
├── infrastructure/         # Services & adapters
├── electron/               # Electron main process
│   ├── main.cjs            # Main entry
│   └── bridges/            # IPC bridges
└── public/                 # Static assets & icons

Build & Package

# Build for production
npm run build

# Package for current platform
npm run pack

# Package for specific platforms
npm run pack:mac     # macOS (DMG + ZIP)
npm run pack:win     # Windows (NSIS installer)
npm run pack:linux   # Linux (AppImage + DEB + RPM)

Tech Stack

Category Technology
Framework Electron 40
Frontend React 19, TypeScript
Build Tool Vite 7
Terminal xterm.js 5
Styling Tailwind CSS 4
SSH/SFTP ssh2, ssh2-sftp-client
PTY node-pty
Icons Lucide React

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

See agents.md for architecture overview and coding conventions.


Contributors

Thanks to all the people who contribute!


License

This project is licensed under the GPL-3.0 License - see the LICENSE file for details.


Star History

Star History Chart

Made with ❤️ by binaricat

Description
No description provided
Readme 127 MiB
Languages
TypeScript 74.5%
JavaScript 24.7%
Shell 0.4%
CSS 0.2%