step 1: skeleton - go module, CLI stub with --version, structure

This commit is contained in:
2026-05-30 18:42:19 +08:00
commit 982f3064ac
17 changed files with 3531 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
package main
import (
"fmt"
"os"
)
const version = "0.1.0-dev"
func main() {
if len(os.Args) < 2 {
fmt.Println("Verstak", version)
os.Exit(0)
}
switch os.Args[1] {
case "--version", "-v":
fmt.Println("Verstak", version)
case "--help", "-h":
fmt.Println("Verstak — local-first working vault")
fmt.Println()
fmt.Println("Usage: verstak <command> [flags]")
fmt.Println()
fmt.Println("Commands:")
fmt.Println(" init Initialize a new vault")
fmt.Println(" --version Show version")
fmt.Println(" --help Show this help")
case "init":
fmt.Println("TODO: init command (step 2)")
default:
fmt.Fprintf(os.Stderr, "Unknown command: %s\n", os.Args[1])
os.Exit(1)
}
}