Skip to content

jwhna1/jtcli

Repository files navigation

JTcli

Native C++20 SSH / SFTP desktop client, built on the in-house jtUI framework.

license: MIT release C++20 CMake Platform

中文版: README.zh-CN.md
Website: https://jtai.cc

JTcli is a lightweight SSH / SFTP workstation for the Windows desktop. It is written in native C++20, with no browser runtime or managed UI layer, so startup is fast and memory usage stays very low even with multiple windows, tabs and worker threads active. Connection management, terminal, file browser, remote monitor and one-click deploy all live in the same window, and the entire UI is rendered by the in-house jtUI framework (vendored under jtUI-v1.0-rc/): modern minimal styling, dark / light themes, English / Chinese locales, and a single portable .exe.


Highlights

Terminal

  • Full VT / ANSI terminal - 8 colours / 256 colours / truecolour, compatible with vim, htop, tmux, claude, npm, and other TUIs.
  • Pixel-accurate rendering of block-element and dingbat glyphs - no 1px seams between cells.
  • Reflow + horizontal scroll + history search (Ctrl+Shift+F) + 5,000-line scrollback.
  • Mouse selection, Ctrl+Shift+C / Ctrl+Shift+V copy-paste, OSC 52 clipboard passthrough.
  • Ctrl++ / Ctrl+- / Ctrl+0 font zoom; PTY resize automatically syncs remote cols x rows.

Connection management with multi-tab

  • Truly concurrent sessions to N hosts - one session per tab, switching tabs never reconnects.
  • Browser-style tabs - an accent bar marks the active tab, + appends, x closes.
  • Connection entries are persisted to <exe>/config/connections.json. Hover to edit, double-click to launch.
  • Authentication: password and public-key (with a native file picker).

SFTP file browser

  • Two-pane tree + list layout with a draggable splitter.
  • Click column headers to sort by name / size / mtime; the path bar is editable, press Enter to jump.
  • Async loading - sftp_list runs on a worker thread; the UI never blocks.
  • Full context menu - refresh, open, open with (system default vs. jtcli editor), copy path, download, upload, archive transfer, new folder, rename, delete, fast delete, permissions.
  • A secondary SSH channel carries transfers, so uploads / downloads do not block the terminal, monitor or main file browser.

Remote host monitor

  • The sidebar streams remote CPU, memory, network, process list, and disks in real time.
  • Sparkline charts - CPU / memory / network as three rolling 60-frame lines.
  • Instant per-process CPU - sampled by diffing /proc/<pid>/stat, matching the whole-machine reading.

One-click deploy

  • 7 built-in recipes - SQLite / Node.js 24 LTS / Python 3.11 / MySQL 8 / PostgreSQL 17 / openclaw / hermes-agent.
  • A 5-step wizard - system check -> configure -> review commands -> execute -> done.
  • Automatic detection of already-installed targets; uninstall is supported.

Engineering

  • Native C++20 desktop stack - no embedded browser runtime, no Electron, no managed UI VM.
  • Extremely low memory footprint - designed to stay light with multiple SSH tabs, transfer workers and monitoring threads running at the same time.
  • Single portable executable - configuration, logs and crash dumps all live next to jtcli.exe in config/, ready to be carried on a USB stick.
  • Crash capture - SEH, abort, terminate, CRT invalid-parameter - on trigger, writes a .dmp and a symbolised stack into config/logs/.
  • Dark / light theme + Chinese / English locale toggled at runtime; settings are persisted.

Screenshots

JTcli - dark theme
Dark theme

JTcli - light theme
Light theme


Tech stack

Layer Choice
Language C++20
Build CMake >= 3.25 + Visual Studio 2022 (MSVC v143)
Package manager vcpkg (manifest mode)
SSH libssh2 (pulled via vcpkg)
Rendering Direct2D + DirectWrite
Platform Windows 10 / 11 (x64)
UI framework in-house jtUI (vendored at jtUI-v1.0-rc/)

Build

Primary path: Windows MSVC + vcpkg

Requirements:

Tool Version
Visual Studio 2022 17.x, with MSVC v143 + Windows SDK
CMake >= 3.25
vcpkg Default C:\vcpkg (see below if elsewhere)

Steps:

git clone <repo-url> jtcli
cd jtcli

# Debug build
cmake --preset windows-msvc-debug
cmake --build --preset build-msvc-debug

# Release build
cmake --preset windows-msvc-release
cmake --build --preset build-msvc-release

On first configure, vcpkg automatically downloads and compiles libssh2 according to vcpkg.json - this takes a few minutes. After the build:

build/windows-msvc-debug/Debug/jtcli.exe
build/windows-msvc-release/Release/jtcli.exe

vcpkg installed elsewhere - CMakePresets.json defaults to CMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake. If your vcpkg is not at C:\vcpkg, create a CMakeUserPresets.json at the repo root to override:

{
  "version": 3,
  "configurePresets": [
    {
      "name": "windows-msvc-debug",
      "inherits": "windows-msvc-debug",
      "cacheVariables": {
        "CMAKE_TOOLCHAIN_FILE": "D:/your-path/vcpkg/scripts/buildsystems/vcpkg.cmake"
      }
    }
  ]
}

Stub mode - if the configure log says jtcli: libssh2 NOT found - SshSession will use stub, vcpkg failed to fetch libssh2 and SSH falls back to a stub (UI flow works, real connections do not).

Secondary path: Linux mingw cross compile (UI sanity only, no libssh2)

This path exists purely as a cross-platform compile check. The resulting binary is a stub build and cannot connect to a real server.

Requirements (Ubuntu / Debian):

sudo apt install g++-mingw-w64-x86-64 ninja-build cmake

Steps:

cmake --preset mingw-cross
cmake --build --preset build-mingw-cross

Usage

First launch:

  1. The sidebar on the left shows an empty connection list and a + New connection button.
  2. Click + New connection, fill in name / host / port / user / auth method / password (or private key).
  3. Double-click an entry to log in - the terminal opens.
  4. The top tab bar lets you append (+), switch and close sessions; sessions never reconnect on tab switching.

Common shortcuts:

Shortcut Action
Ctrl+Shift+C / Ctrl+Shift+V Copy / paste (terminal selection or focused input)
Ctrl+Shift+F Terminal history search (FindBar)
Ctrl++ / Ctrl+- / Ctrl+0 Increase / decrease / reset terminal font size
PgUp / PgDn Scroll the scrollback buffer
Home / End (while scrolling) Jump to oldest / latest (live)
Esc Close popups (FindBar, context menu, modal)

Configuration layout:

jtcli.exe
config/
|- settings.json       # theme + language + default open mode
|- connections.json    # connection list (ndjson, one per line)
\- logs/               # application logs + crash dumps

Copy the whole folder to a USB stick or another machine - state travels with it.


Project layout

jtcli/
|- CMakeLists.txt           # top-level build script
|- CMakePresets.json        # build presets
|- vcpkg.json               # dependency manifest (libssh2)
|- LICENSE                  # MIT + third-party attributions
|- README.md                # English (this file)
|- README.zh-CN.md          # Chinese
|- SECURITY.md              # security policy
|- CODE_OF_CONDUCT.md       # code of conduct
|- CONTRIBUTING.md          # contributing guide
|- src/
|  |- main.cpp              # entry point, signal wiring, global shortcuts
|  \- app/
|     |- main_window.cpp    # main layout (title bar / sidebar / workspace)
|     |- ssh/               # libssh2 integration, real channel + SFTP wrapper
|     |- terminal/          # cell grid + VT/ANSI parser + reflow
|     |- widgets/           # in-house widgets (TerminalView / FileBrowser / ContextMenu ...)
|     |- deploy/            # one-click deploy - recipe engine + orchestrator
|     |- dialogs/           # new connection and other modals
|     \- native/            # Win32 glue (clipboard / file picker / cursor)
|- docs/                    # screenshots
\- jtUI-v1.0-rc/            # in-house UI framework, layout + Direct2D backend

Governance


Licence

MIT License - (c) 2026 Zeng Nenghun <jwhna1@gmail.com>


Acknowledgements

  • jtUI - in-house UI framework, MIT
  • libssh2 - BSD-3-Clause
  • vcpkg - MIT
  • Microsoft DirectX (Direct2D / DirectWrite)
  • Cascadia Mono and other terminal fonts

Author

Role Name Contact
Author / maintainer Zeng Nenghun <jwhna1@gmail.com>

Website: https://jtai.cc

Issues, pull requests and direct email about usage are welcome.

About

JTcli is a lightweight native C++20 SSH/SFTP desktop client with multi-tab terminals, file management, remote monitoring, and one-click deployment. JTcli 是一款原生 C++20 构建的轻量级 SSH/SFTP 桌面客户端,支持多标签终端、文件管理、远程监控和一键部署。

Resources

License

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages