chore: bootstrap agent-notify Go project

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-26 11:17:03 +08:00
commit f13dcd6cae
3 changed files with 46 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
.PHONY: build test install
BINARY := agent-notify
build:
go build -o bin/$(BINARY) ./cmd/agent-notify
test:
go test ./...
install: build
install -m 755 bin/$(BINARY) $(HOME)/.local/bin/$(BINARY)
+32
View File
@@ -0,0 +1,32 @@
package main
import (
"fmt"
"os"
)
func main() {
if len(os.Args) < 2 {
printUsage()
os.Exit(1)
}
switch os.Args[1] {
case "send", "hook", "install", "test", "doctor", "help", "-h", "--help":
fmt.Fprintf(os.Stderr, "agent-notify: %s not implemented yet\n", os.Args[1])
os.Exit(1)
default:
printUsage()
os.Exit(1)
}
}
func printUsage() {
fmt.Fprint(os.Stderr, `Usage: agent-notify <command>
Commands:
send Send a notification
hook Agent hook entrypoint
install Install hook configs
test Send test notification
doctor Check environment
`)
}
+3
View File
@@ -0,0 +1,3 @@
module github.com/longbin/agent-notify
go 1.22.2