[PR #1398] [MERGED] feat: add CLI interface with subcommands #401

Closed
opened 2026-11-11 16:41:37 +01:00 by Alvin-Zilverstand · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/angristan/openvpn-install/pull/1398
Author: @angristan
Created: 12/14/2025
Status: ✅ Merged
Merged: 12/14/2025
Merged by: @angristan

Base: master ← Head: feat/cli-interface


📝 Commits (10+)

  • 75db665 feat: add CLI interface with subcommands
  • e2d5f9e test: update tests to use new CLI interface
  • 905761a fix: use array for install command to fix shellcheck SC2086
  • f3ba3ba style: fix shfmt formatting and markdown lint errors
  • 5bedfd4 fix: address PR review comments - JSON escaping, validation
  • 99b5ca7 fix: address PR review comments
  • 1111a94 docs: document all default values in README
  • 99f7b87 fix: hide interactive prompts when values provided via CLI
  • 9b8bf00 chore: reduce noise by making OS detection a debug message
  • 34d39f2 docs: reorganize README to lead with interactive mode

📊 Changes

7 files changed (+1650 additions, -298 deletions)

View changed files

📝 .github/workflows/do-test.yml (+1 -1)
📝 .github/workflows/docker-test.yml (+5 -5)
📝 FAQ.md (+27 -25)
📝 README.md (+250 -115)
📝 openvpn-install.sh (+1259 -107)
📝 test/Dockerfile.server (+5 -5)
📝 test/server-entrypoint.sh (+103 -40)

📄 Description

Replace environment variable-based configuration with a proper CLI interface using subcommands and flags.

Commands

openvpn-install <command> [options]

Commands:
  install       Install and configure OpenVPN server
  uninstall     Remove OpenVPN server
  client        Manage client certificates (add/list/revoke/renew)
  server        Server management (status/renew)
  interactive   Launch interactive menu

Highlights

  • No args → help: Running without arguments shows help instead of interactive menu
  • JSON output: client list and server status support --format json
  • 25+ install flags: Network, DNS, security, and client options
  • Interactive mode preserved: install --interactive or interactive command

Breaking Changes

Environment variables (AUTO_INSTALL, MENU_OPTION, CLIENT, etc.) are no longer supported. Use CLI flags instead.

# Before
MENU_OPTION=1 CLIENT=foo PASS=1 ./openvpn-install.sh

# After
./openvpn-install.sh client add foo

Closes https://github.com/angristan/openvpn-install/issues/1202


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/angristan/openvpn-install/pull/1398 **Author:** [@angristan](https://github.com/angristan) **Created:** 12/14/2025 **Status:** ✅ Merged **Merged:** 12/14/2025 **Merged by:** [@angristan](https://github.com/angristan) **Base:** `master` ← **Head:** `feat/cli-interface` --- ### 📝 Commits (10+) - [`75db665`](https://github.com/angristan/openvpn-install/commit/75db6659c7d54e150d81bca75b7fbdad328e011a) feat: add CLI interface with subcommands - [`e2d5f9e`](https://github.com/angristan/openvpn-install/commit/e2d5f9e392cc814a79d158ce5f77d13e4849be96) test: update tests to use new CLI interface - [`905761a`](https://github.com/angristan/openvpn-install/commit/905761a09bdd359c2f4713b941eb12e7c2e15f8c) fix: use array for install command to fix shellcheck SC2086 - [`f3ba3ba`](https://github.com/angristan/openvpn-install/commit/f3ba3bad7a693cfbc4c9c0a8949512f28e8f78e9) style: fix shfmt formatting and markdown lint errors - [`5bedfd4`](https://github.com/angristan/openvpn-install/commit/5bedfd4f5a5cee5d76a1fbff8d9b928a90f2a118) fix: address PR review comments - JSON escaping, validation - [`99b5ca7`](https://github.com/angristan/openvpn-install/commit/99b5ca78298d0980acf87f858063e34cf484a6d6) fix: address PR review comments - [`1111a94`](https://github.com/angristan/openvpn-install/commit/1111a9426cca3c594d9bf1d6ec2a57e3ad925049) docs: document all default values in README - [`99f7b87`](https://github.com/angristan/openvpn-install/commit/99f7b874df950b268fdfe3ceb2e23bc300a5989d) fix: hide interactive prompts when values provided via CLI - [`9b8bf00`](https://github.com/angristan/openvpn-install/commit/9b8bf0007da79f395d496072a8e852c1f862bbaa) chore: reduce noise by making OS detection a debug message - [`34d39f2`](https://github.com/angristan/openvpn-install/commit/34d39f2da751895b1914e03dbdac6ec70910bc45) docs: reorganize README to lead with interactive mode ### 📊 Changes **7 files changed** (+1650 additions, -298 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/do-test.yml` (+1 -1) 📝 `.github/workflows/docker-test.yml` (+5 -5) 📝 `FAQ.md` (+27 -25) 📝 `README.md` (+250 -115) 📝 `openvpn-install.sh` (+1259 -107) 📝 `test/Dockerfile.server` (+5 -5) 📝 `test/server-entrypoint.sh` (+103 -40) </details> ### 📄 Description Replace environment variable-based configuration with a proper CLI interface using subcommands and flags. ### Commands ``` openvpn-install <command> [options] Commands: install Install and configure OpenVPN server uninstall Remove OpenVPN server client Manage client certificates (add/list/revoke/renew) server Server management (status/renew) interactive Launch interactive menu ``` ### Highlights - **No args → help**: Running without arguments shows help instead of interactive menu - **JSON output**: `client list` and `server status` support `--format json` - **25+ install flags**: Network, DNS, security, and client options - **Interactive mode preserved**: `install --interactive` or `interactive` command ### Breaking Changes Environment variables (`AUTO_INSTALL`, `MENU_OPTION`, `CLIENT`, etc.) are no longer supported. Use CLI flags instead. ```bash # Before MENU_OPTION=1 CLIENT=foo PASS=1 ./openvpn-install.sh # After ./openvpn-install.sh client add foo ``` Closes https://github.com/angristan/openvpn-install/issues/1202 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Alvin-Zilverstand added the pull-request label 2026-11-11 16:41:37 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/openvpn-install#401