41 lines
1.0 KiB
Go
41 lines
1.0 KiB
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())
|
|
rootCmd.AddCommand(commands.NewSyncCmd())
|
|
rootCmd.AddCommand(commands.NewPushCmd())
|
|
|
|
// Execute the root command
|
|
if err := rootCmd.Execute(); err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
|
|
os.Exit(1)
|
|
}
|
|
}
|