π UnboundCLI

π A powerful CLI tool for managing Unbound DNS on OPNSense routers with a beautiful interactive interface
UnboundCLI provides seamless DNS override management through the OPNSense API, featuring both command-line operations and an intuitive Text User Interface (TUI).
β¨ Features
- π¨ Modern CLI interface with color output using Cobra and Viper
- π₯οΈ Interactive TUI powered by Bubble Tea and Lipgloss
- π Complete CRUD operations for DNS overrides
- π Secure configuration management
- π Cross-platform support (macOS, Linux, Windows)
- π Caddy integration for automatic DNS synchronization
- π‘οΈ SLSA Level 3 security compliance
π¦ Installation
Using Homebrew (Recommended for macOS and Linux)
brew tap jeeftor/tap
brew install unboundcli
Manual Installation
- Download the latest binary from the Releases page
- Extract and move to your
$PATH
Building from Source
# Clone the repository
git clone https://github.com/jeeftor/unboundCLI.git
cd unboundCLI
# Build the application
make build
# Install to your GOPATH/bin
make install
π Quick Start
Initial Setup
Configure UnboundCLI with your OPNSense API credentials:
unboundCLI config
Follow the interactive prompts to enter:
- π API Key
- π API Secret
- π OPNSense URL
Launch the TUI
Experience the beautiful interactive interface:
unboundCLI tui
π Usage
Usage:
unboundCLI [command]
Available Commands:
add β Add a DNS override
apply β
Apply pending DNS changes
caddy-sync π Synchronize DNS entries with Caddy server
completion π Generate shell autocompletion script
config βοΈ Configure API connection settings
delete ποΈ Delete a DNS override
edit βοΈ Edit a DNS override
find π Find DNS overrides by host, domain, or both
help β Help about any command
list π List DNS overrides
tui π» Launch the Text User Interface
Flags:
--config string config file (default: $HOME/.unboundCLI.yaml)
-h, --help help for unboundCLI
--log-level string set logging level (debug, info, warn, error) (default: "info")
-v, --verbose enable verbose output
--version version for unboundCLI
Use "unboundCLI [command] --help" for more information about a command.
Examples
# List all DNS overrides
unboundCLI list
# Add a new DNS override
unboundCLI add --host myserver --domain local.lan --ip 192.168.1.100
# Find specific overrides
unboundCLI find --host myserver
# Launch interactive mode
unboundCLI tui
π οΈ Development
Prerequisites
- Go 1.18 or higher
- Make
- GoReleaser (optional, for releases)
Available Make Commands
make build # π¨ Build the application
make test # π§ͺ Run tests
make check # π Format code and run linters
make cross-build # π Cross-compile for multiple platforms
make release-dry-run # π Test GoReleaser configuration
make help # π Show all available commands
π’ Release Process
This project uses GoReleaser with SLSA Level 3 provenance for secure, automated releases.
Creating a New Release
-
Tag the commit:
git tag -a v0.1.0 -m "Release v0.1.0"
git push origin v0.1.0
-
Automated build: GitHub Actions automatically builds and publishes the release with SLSA provenance
π‘οΈ Security & SLSA Provenance
This project follows SLSA Level 3 security practices, providing:
- β
Source verification
- π Build integrity guarantees
- π Provenance generation
- π‘οΈ Tamper resistance
π€ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature)
- Commit your changes (
git commit -m 'Add some amazing feature')
- Push to the branch (
git push origin feature/amazing-feature)
- Open a Pull Request
π License
This project is licensed under the MIT License - see the LICENSE file for details.
Made with β€οΈ by jeeftor
β If you find this project helpful, please give it a star!