Files
plainleaf/cmd/cli/main.go
T
2026-04-27 16:56:21 +02:00

39 lines
837 B
Go

package main
import (
"github.com/silverbulletmd/silverbullet/cli"
"github.com/spf13/cobra"
)
// Set via -ldflags "-X main.version=..."
var version string
func main() {
root := &cobra.Command{
Use: "sb",
Short: "SilverBullet CLI",
Long: "SilverBullet CLI — interact with your spaces from the command line.\n\nRun 'sb describe' to see available data types and query syntax.",
}
cli.AddSpaceFlags(root)
cli.AddOutputFlags(root)
root.AddCommand(
cli.SpaceCommand(),
cli.EvalCommand(),
cli.LuaCommand(), // hidden alias
cli.ScriptCommand(),
cli.LuaScriptCommand(), // hidden alias
cli.QueryCommand(),
cli.DescribeCommand(),
cli.LogsCommand(),
cli.ScreenshotCommand(),
cli.ReplCommand(),
cli.VersionCommand(version),
cli.UpgradeCommand(),
cli.UpgradeEdgeCommand(),
)
root.Execute()
}