Ask or search…

Building a Spacecore

Adding a new space core to the Vimana CLI

Estimated time to complete this guide: <30 minutes
  1. 1.
    Add the configuration to config.toml. e.g.
binary = "/tmp/vimana/dymension/dymd"
download = "/tmp/vimana/dymension/"
  1. 2.
    Implement the NodeCommander interface for that component and mode.
type DymensionFullCommander struct {
func NewDymensionFullCommander() *DymensionFullCommander {
return &DymensionFullCommander{
BaseCommander: BaseCommander{NodeType: "full"},
func (c *DymensionFullCommander) Init(cmd *cobra.Command, args []string, mode Mode) error {
utils.ExecBashCmd(exec.Command("bash", mode.Download), utils.WithOutputToStdout(), utils.WithErrorsToStderr())
return c.componentMgr.InitializeConfig()
func (c *DymensionFullCommander) Run(cmd *cobra.Command, args []string, mode Mode) {
c.Init(cmd, args, mode)
cmdexecute := c.componentMgr.GetStartCmd()
utils.ExecBashCmd(cmdexecute, utils.WithOutputToStdout(), utils.WithErrorsToStderr())
  1. 3.
    Update initComponentManager() and NewComponentManager() to support the new component.
func (c *BaseCommander) initComponentManager(binary string) {
if b.componentMgr == nil {
b.componentMgr = components.NewComponentManager("dymension", binary, b.NodeType)
// In NewComponentManager():
case config.Celestia:
component = NewDymensionComponent(root, ".vimana/dymension", nodeType)
  1. 4.
    Implement NewDymensionComponent and it's methods InitializeConfig() and GetStartCmd().
// implement how to initialize dymd
// implement the start command for dymd
  1. 5.
    Register their implementation in the commanderRegistry.
commanderRegistry.Register("dymension", "full", &DymensionFullCommander{})
"celestia-light": cli.NewCelestiaLightCommander(),
  1. 6.
    Add the component to the