Files
abrown38andClaude Opus 5.5 54beb0bba3 Start Housecarl: the logo, the wordmark and the skeleton
Housecarl will be a firewall manager for nftables, built the way Jarl and
Steward are: housecarld (a daemon with a REST API and web UI), hc (the
CLI) and SQLite.

- The logo: a carved Nordic doorway in Jarl's blue (artwork/logo.svg),
  with a small version without the carvings, lighter on dark
  backgrounds. scripts/logo.py builds the web UI's copies and
  scripts/banner.py the README banner.
- The HOUSECARL wordmark in Jarl's and Steward's angular letters, with
  new H, O, U and C (assets/brand.js), and the UI's color tokens.
- housecarld and hc print their version; the Makefile, version package,
  AGENTS.md, CHANGELOG and the design sketch (docs/design.md).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 21:20:05 +01:00

43 lines
1.0 KiB
Go

// Command hc is Housecarl's command line client: it will manage the
// firewall through housecarld's API, as jarl and steward do for theirs.
// For now it only knows its version.
package main
import (
"fmt"
"os"
"github.com/spf13/cobra"
"housecarl/internal/version"
)
func main() {
if err := rootCmd().Execute(); err != nil {
fmt.Fprintln(os.Stderr, "error:", err)
os.Exit(1)
}
}
func rootCmd() *cobra.Command {
root := &cobra.Command{
Use: "hc",
Short: "Manage a Housecarl firewall",
Long: `hc will manage a Housecarl firewall through housecarld's API: its zones,
address sets, rules and port forwards. It doesn't yet: Housecarl is at its
start (docs/design.md).`,
SilenceUsage: true,
SilenceErrors: true,
Version: version.String(),
}
root.AddCommand(versionCmd())
return root
}
func versionCmd() *cobra.Command {
return &cobra.Command{
Use: "version", Short: "Print the version", Args: cobra.NoArgs,
Run: func(cmd *cobra.Command, args []string) { fmt.Println("hc", version.String()) },
}
}