Skip to content

feat: add title banner, CLI flags, and non-interactive mode to the port checker - #6

Merged
iamteedoh merged 1 commit into
mainfrom
CON-1-beautify-cli
Jul 16, 2026
Merged

iamteedoh merged 1 commit into
mainfrom
CON-1-beautify-cli

Conversation

@iamteedoh

Copy link
Copy Markdown
Owner

Jira: CON-1 — Make this program look more beautiful

What changed

  • Both chkports.py and connchk.py now print a big ASCII connchk title banner with a tagline (suppress with --no-banner).
  • Real argparse CLIs: pass --ports, hosts/--file, --timeout, --no-color to run fully non-interactively; omit them to get guided prompts for whatever's missing. --help documents each with examples.
  • Prettier output: aligned ✔ SUCCESS / ✘ FAILED lines plus a Summary: N passed M failed, and script-friendly exit codes (0 all connected, 1 any failed, 2 usage error).
  • connchk.py gains explicit --local/--remote, --host/--user/--identity, and now drives the remote checker non-interactively by passing flags to the copied chkports.py (this also fixes remote mode, which previously had no way to answer the remote script's prompts). Remote auth via SSH key (--identity) or CONNCHK_PASSWORD.
  • README usage rewritten for the new flags; added a hero screenshot under assets/.
  • chkports.py stays self-contained (it's the file copied to remote hosts).

Validation

  • python -m compileall -q . — clean (matches CI's compile step).
  • Drove chkports.py end-to-end against a live local listener: open vs closed ports, --file input (with blank/# lines), invalid-port and missing-input cases (clean errors, no hang on non-tty), and the interactive prompt path. Exit codes verified (0/1/2).
  • Drove connchk.py local mode; verified remote command construction (safe shell-quoting), --local/--remote resolution, and credential-missing handling.
  • SPDX GPL-3.0-or-later headers present on both .py files (CI community-files gate).

…ort checker

Give chkports.py and connchk.py a big ASCII "connchk" banner with a tagline,
argparse-based CLIs, prettier aligned pass/fail output with a summary, a
configurable per-connection timeout, and script-friendly exit codes. Both run
fully non-interactively via flags or fall back to guided prompts. connchk now
drives the remote checker non-interactively by passing flags, and gains SSH key
(--identity) and CONNCHK_PASSWORD auth. Update the README usage and add a hero
screenshot.

Claude-Session: https://claude.ai/code/session_01JeFxzs9zLRYBeqAL5ie4Ci
@iamteedoh
iamteedoh merged commit 1ad006c into main Jul 16, 2026
3 checks passed
@iamteedoh
iamteedoh deleted the CON-1-beautify-cli branch July 16, 2026 02:51
iamteedoh pushed a commit that referenced this pull request Jul 16, 2026
🤖 I have created a release *beep* *boop*
---


## [0.2.0](v0.1.0...v0.2.0)
(2026-07-16)


### Features

* add title banner, CLI flags, and non-interactive mode to the port
checker ([#6](#6))
([1ad006c](1ad006c))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant