Files
onyx-prebootstrap/cmd/onx/main.go
Tanishq Dubey 8b1339d0cf
Some checks failed
CI / Test (pull_request) Failing after 6s
CI / Build (pull_request) Failing after 6s
CI / Lint (pull_request) Failing after 12s
Milestone 3
2025-10-14 22:10:45 -04:00

39 lines
968 B
Go

package main
import (
"fmt"
"os"
"git.dws.rip/DWS/onyx/internal/commands"
"github.com/spf13/cobra"
)
var version = "0.1.0"
func main() {
rootCmd := &cobra.Command{
Use: "onx",
Short: "Onyx - The iPhone of Version Control",
Long: `Onyx is a next-generation version control system that provides
a superior user experience layer on top of Git. It offers transparent
versioning, workstreams for stacked-diff management, and an action
log for universal undo functionality.`,
Version: version,
}
// Add commands
rootCmd.AddCommand(commands.NewInitCmd())
rootCmd.AddCommand(commands.NewUndoCmd())
rootCmd.AddCommand(commands.NewDaemonCmd())
rootCmd.AddCommand(commands.NewSaveCmd())
rootCmd.AddCommand(commands.NewNewCmd())
rootCmd.AddCommand(commands.NewListCmd())
rootCmd.AddCommand(commands.NewSwitchCmd())
// Execute the root command
if err := rootCmd.Execute(); err != nil {
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
os.Exit(1)
}
}