Files
plainleaf/cmd/cli/main.go
T
Zef Hemel 338c78f806 Iterating on the CLI
* Renamed 'lua' to 'eval'
* Renamed 'luascript' to 'script'
* Added 'describe' to describe LIQ and lists tags that have defined
  schemas

Tests for all of this
2026-04-16 10:58:20 +02:00

39 lines
865 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: "silverbullet-cli",
Short: "SilverBullet CLI",
Long: "SilverBullet CLI — interact with your spaces from the command line.\n\nRun 'silverbullet-cli 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()
}