xieguigang/console
51.1
Adequate · 1 October 2026
7.5k
lines of production code
VB.NET
with JavaScript
2
measurements over time
What this system is
This system is a .NET-based terminal emulation and SSH client framework that provides a reusable console control for Windows Forms applications. It supports both RichTextBox and WebView2 backends to render ANSI escape sequences, manage local shells with line editing, and handle remote SSH sessions. The codebase also includes utility tools for directory listing and JSON processing, all targeting the .NET 10 framework.
How it got here
2020 — Initial release and framework upgrade
4 changes.
This period marks the initial release of the VB.NET WinForms Console Simulator Control, introducing the core component and its usage documentation. The work also involved configuring the application's entry point and visual styles, while simultaneously upgrading the project to .NET 10 and updating key dependencies like SSH.NET.
2025 — Win32 and WinForms console ANSI support
3 changes.
The console subsystem was refactored to introduce full ANSI escape sequence rendering and line editing capabilities across Win32 and WinForms backends. This involved replacing the previous text-appending rendering engine with a character-grid terminal and implementing new process interfaces to support local shell features like tab completion and cursor control.
2026 — WebView2 terminal and shell enhancements
5 changes.
The project overhauled the terminal interface by replacing the RichTextBox control with a WebView2-based renderer, moving ANSI parsing and input handling to JavaScript for improved interactivity and visual fidelity. This update introduced a built-in local shell backend with bash-like features and added new command-line utilities, including an enhanced \lsd\ directory listing tool and a \jq\ JSON processor.
Features
ANSI escape sequence rendering and console control interface
The console now supports rendering ANSI escape sequences (including SGR colors, styles, carriage returns, and erasure commands) within the RichTextBox-based terminal via a new AnsiEscapeRenderer class. This renderer maintains formatting state across calls to ensure consistent styling. Additionally, a new IConsoleControl interface has been introduced to standardize the contract for console controls, allowing for interchangeable backends (such as RichTextBox or WebView2) while exposing properties for read-only mode, input handling, and process management.
console · high confidence
Add ls command
The tools directory now includes a new \lsd\ tool that provides an \ls\-style directory listing with enhanced features. This tool supports long format (\-l\), tree mode (\-t\), recursive listing (\-R\), and various sorting options (by time, size, reverse). It also includes color theming for file types and permissions, icon support for directories and files, and handles hidden files (\-a\, \-A\). The implementation is built on .NET 10.0 and includes necessary runtime configuration and dependency files.
tools · high confidence
Initial release of VB.NET WinForms Console Simulator Control
This change introduces a new VB.NET console simulator control for Windows Forms applications. The diff adds the solution file (\console.sln\) defining the project structure, including the \console.NET5\ project and a reference to the \Microsoft.VisualBasic.Core\ source, along with updated \.gitignore\ rules and a \README.md\ providing usage instructions. Users can now add the \ConsoleControl1\ component to their forms and interact with it programmatically using standard console methods like \Write\, \WriteLine\, \ReadKey\, and \ReadLine\, as well as configuring colors.
(repo-wide) · high confidence
New WebView2-based terminal console with ANSI support and line editing
The console view now uses a WebView2 renderer instead of the previous RichTextBox control, providing a full-featured terminal experience in the browser. This includes accurate ANSI escape sequence parsing (standard 16-color and xterm 256-color palettes), a dirty-row DOM renderer for efficient screen updates, and a local input handler that supports line editing, history navigation, and tab completion. The terminal also features proper focus management, IME composition support, and a dark grey default palette for better legibility.
console/WebView2/wwwroot · high confidence
New lsd and jq command-line utilities
Added two new console tools to the bash workspace. The \lsd\ utility provides a colorful, icon-enhanced replacement for the standard \ls\ command, featuring file-type coloring, Unicode icons, long-format listing, recursive directory traversal, and a dedicated tree-view mode (\-T\) with depth control. The \jq\ utility offers a basic JSON processing tool that reads JSON from standard input or a file (via \-i\) and outputs a pretty-printed document.
bash · high confidence
WebView2-based terminal emulator control
The console now uses a new WebView2-based terminal emulator control (WebViewConsole) that renders the terminal interface in a browser view instead of a RichTextBox. This change moves terminal semantics (ANSI parsing, character grid, cursor handling, and painting) to JavaScript, with the .NET control acting as a thin transport for process output and keystrokes. The control implements the existing IConsoleControl interface, allowing it to be used as a drop-in replacement for the previous console implementation. It includes a dark grey default background for better ANSI legibility, supports line editing and tab completion via a message channel, and embeds the renderer assets (HTML/CSS/JS) directly in the assembly.
console/WebView2 · high confidence
Behavioural changes
Configures custom application entry point and visual styles
The console application now uses a custom entry point (MySubMain) instead of a standard main form, enabling programmatic startup logic. Visual styles are explicitly enabled for the application, and the application is configured to allow multiple instances and save settings on exit.
console/My Project · high confidence
New Win32 console backend with ANSI support and line editing
The Win32 console subsystem has been refactored to support a new process interface that enables line editing and tab completion for local shells, while also introducing full ANSI escape code rendering. This change introduces a new \AbstractProcessInterface\ and \ProcessInterface\ that manage process lifecycle, input/output streams, and events, along with \ProcessEventArgs\ that carry an \Ansi\ flag to indicate whether output contains ANSI codes. The backend now supports both \LineEdit\ mode (for local shells with local history/editing) and \Raw\ mode (for PTY-backed sessions like SSH), allowing the console front-end to adapt its input handling accordingly. Additionally, a new \Imports.vb\ module exposes \GenerateConsoleCtrlEvent\ for sending Ctrl+C/Break signals to process groups.
console/Win32 · high confidence
SSH client now includes a built-in local shell and uses a WebView2 terminal
The SShClient application now features a built-in local shell backend that simulates a bash-like environment directly in .NET, supporting session state, aliases, and command history. Typing 'ssh' in this local shell triggers a connection to a remote host via the SSH.NET library, which is now driven by a ShellStream. The terminal interface has been upgraded to use a WebView2-backed renderer, enabling proper ANSI escape sequence parsing, renderer-driven terminal resizing, and improved signal handling for interactive programs.
SShClient · high confidence
WinForms console now uses a character-grid terminal with full ANSI support
The WinForms console control has been refactored to render output using a fixed character grid (TerminalBuffer) instead of appending text to a RichTextBox. This change enables correct rendering of full-screen terminal applications (like htop) that rely on cursor positioning and screen clearing, and adds comprehensive support for ANSI escape sequences (colors, styles, and cursor control). The new TerminalControl inherits from the base ConsoleControl, preserving existing input handling and keyboard mappings while replacing the rendering engine to support renderer-driven resize and proper terminal semantics.
console/WinForm · high confidence
Test coverage
19 commits adding/updating tests in test
Test coverage in test — 19 commits (3 fixs), 18 files.
test · high confidence · unverified
Dependencies
Upgrade to .NET 10 and update SSH.NET dependency
The project manifests have been updated to target the .NET 10 framework (net10.0 and net10.0-windows) across the SSH client, console, and test projects, replacing previous framework versions. Additionally, the SSH.NET NuGet package reference in the SShClient library has been bumped to version 2026.0.0, and the WebView2 package version has been standardized to 1.0.4258.31 in the main libraries.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 52 → 51 (-0.7)
- Rubric changed (rubric-2026.09.11 → rubric-2026.09.18) — scores are not directly comparable.
Lenses
- Code Health 65 → 65 (-0.0)
- Architecture 90 → 93 (+3.0)
- Maturity 54 → 50 (-3.7)
- Readiness 36 → 36 (+0.0)
- Security 100 → 100 (+0.0)
Resolved (10)
- Documentation: no project overview (README.md)
- Hotspot: console/WebView2/TerminalMessage.vb (console/WebView2/TerminalMessage.vb)
- Hotspot: console/WebView2/WebViewConsole.vb (console/WebView2/WebViewConsole.vb)
- Hotspot: console/WebView2/wwwroot/ansi-parser.js (console/WebView2/wwwroot/ansi-parser.js)
- Hotspot: console/WebView2/wwwroot/terminal-app.js (console/WebView2/wwwroot/terminal-app.js)
- Hotspot: console/WebView2/wwwroot/terminal-input.js (console/WebView2/wwwroot/terminal-input.js)
- Hotspot: console/WebView2/wwwroot/terminal-renderer.js (console/WebView2/wwwroot/terminal-renderer.js)
- Hotspot: console/WinForm/TerminalBuffer.vb (console/WinForm/TerminalBuffer.vb)
- Hotspot: console/WinForm/TerminalControl.vb (console/WinForm/TerminalControl.vb)
- Members sharing a duplicated core (4 members, 50+ identical tokens) (console/WebView2/WebViewConsole.vb)
New (14)
- EmptyCatchBlock (bash/lsd/FileSystemScanner.vb)
- EmptyCatchBlock (bash/lsd/LsRenderer.vb)
- Members sharing a duplicated core (4 members, 50+ identical tokens) (console/WebView2/WebViewConsole.vb)
- Solution references 2 projects that do not exist (bash/bash.slnx)
- ansi-parser.AnsiParser.applySgr (cognitive 30) (console/WebView2/wwwroot/ansi-parser.js)
- ansi-parser.AnsiParser.applySgr (cyclomatic 30) (console/WebView2/wwwroot/ansi-parser.js)
- ansi-parser.AnsiParser.dispatchCsi (cyclomatic 33) (console/WebView2/wwwroot/ansi-parser.js)
- ansi-parser.AnsiParser.handleEscape (cognitive 17) (console/WebView2/wwwroot/ansi-parser.js)
- ansi-parser.AnsiParser.handleEscape (cyclomatic 23) (console/WebView2/wwwroot/ansi-parser.js)
- ansi-parser.findIncompleteTail (cognitive 18) (console/WebView2/wwwroot/ansi-parser.js)
- terminal-input.TerminalInput.handleKeyDown (cognitive 62) (console/WebView2/wwwroot/terminal-input.js)
- terminal-input.TerminalInput.handleKeyDown (cyclomatic 46) (console/WebView2/wwwroot/terminal-input.js)
- terminal-renderer.TerminalRenderer.wrapRun (cognitive 25) (console/WebView2/wwwroot/terminal-renderer.js)
- terminal-renderer.TerminalRenderer.wrapRun (cyclomatic 17) (console/WebView2/wwwroot/terminal-renderer.js)
Changes since last survey
- 3 commits — 1 feature/other, 2 fixes
By area
- SShClient/SShClient.vbproj — 1 commit
- console/WebView2 — 1 commit
- console/WinForm — 1 commit
Notable commits
- fix: fix of the namespace reference error
- fix: fix of the package reference error
- change: update nuget package version
Architecture
- Containers 2 added · 0 removed · contexts 0 added · 0 removed · edges 0 added · 0 removed
Added containers (2)
- cli:jq
- cli:lsd
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
xieguigang/console was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 1 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 00b46523e5826fab461981035e3493d16b8e47e4 — the exact code this score is about.
- Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-e569280dd5e2.