From f417d1b5c4f48bda9d7343088fbb571e88958965 Mon Sep 17 00:00:00 2001 From: Nikolay Govorov Date: Sat, 11 Apr 2026 22:24:51 +0100 Subject: Sceleton for mirum cmd --- Taskfile.yml | 2 ++ cmd/mirum/main.go | 33 +++++++++++++++++++++++++++++++++ nfpm.yaml | 5 +++++ 3 files changed, 40 insertions(+) create mode 100644 cmd/mirum/main.go diff --git a/Taskfile.yml b/Taskfile.yml index 8178989..199fb31 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -231,8 +231,10 @@ tasks: - mkdir -p {{.BUILD_DIR}} - go build -o {{.BUILD_DIR}}/mirum-server-{{.GOOS}}-{{.GOARCH}} ./cmd/mirum-server - go build -o {{.BUILD_DIR}}/mirum-worker-{{.GOOS}}-{{.GOARCH}} ./cmd/mirum-worker + - go build -o {{.BUILD_DIR}}/mirum-{{.GOOS}}-{{.GOARCH}} ./cmd/mirum - cp {{.BUILD_DIR}}/mirum-server-{{.GOOS}}-{{.GOARCH}} {{.BUILD_DIR}}/mirum-server - cp {{.BUILD_DIR}}/mirum-worker-{{.GOOS}}-{{.GOARCH}} {{.BUILD_DIR}}/mirum-worker + - cp {{.BUILD_DIR}}/mirum-{{.GOOS}}-{{.GOARCH}} {{.BUILD_DIR}}/mirum run: desc: Build and run mirum-server against the dev environment diff --git a/cmd/mirum/main.go b/cmd/mirum/main.go new file mode 100644 index 0000000..35b53ca --- /dev/null +++ b/cmd/mirum/main.go @@ -0,0 +1,33 @@ +// Copyright (c) 2026 Nikolay Govorov +// SPDX-License-Identifier: AGPL-3.0-or-later + +// Command mirum is the developer-facing CLI for the Mirum CI system. +// +// In a future iteration it will host the full set of commands described in +// docs/whitepaper.md (`mirum task`, `mirum run`, `mirum list`, `mirum try`, +// `mirum ssh`, `mirum eval`). The current revision is a scaffold that +// compiles and ships through the existing build pipeline so that subsequent +// changes only have to add subcommand implementations. +package main + +import ( + "os" + + "dimidiumlabs/mirum/internal/protocol" + + "github.com/spf13/cobra" +) + +func main() { + root := &cobra.Command{ + Use: "mirum", + Short: "Mirum CI client", + Long: "Mirum CI client. Reads Mirumfile from the repository root.", + Version: protocol.VersionString(), + } + root.SetVersionTemplate("mirum {{.Version}}\n") + + if err := root.Execute(); err != nil { + os.Exit(1) + } +} diff --git a/nfpm.yaml b/nfpm.yaml index 62181e7..0b070cb 100644 --- a/nfpm.yaml +++ b/nfpm.yaml @@ -28,6 +28,11 @@ contents: file_info: mode: 0755 + - src: build/mirum + dst: /usr/local/bin/mirum + file_info: + mode: 0755 + - src: pkg/server/config.yaml dst: /etc/mirum/server/config.yaml type: config|noreplace -- Gilti