code: func (cli *NetworkCli) CmdServicePublish(chain string, args ...string) error {
  	cmd := cli.Subcmd(chain, "publish", "SERVICE[.NETWORK]", "Publish a new service on a network", false)
  	flAlias := opts.NewListOpts(netutils.ValidateAlias)
  	cmd.Var(&flAlias, []string{"-alias"}, "Add alias to self")
  	cmd.Require(flag.Exact, 1)
  	err := cmd.ParseFlags(args, true)
  	if err != nil {
  		return err
  	}
  
  	sn, nn := parseServiceName(cmd.Arg(0))
  	sc := serviceCreate{Name: sn, Network: nn, MyAliases: flAlias.GetAll()}
  	obj, _, err := readBody(cli.call("POST", "/services", sc, nil))
  	if err != nil {
  		return err
  	}
  
  	var replyID string
  	err = json.Unmarshal(obj, &replyID)
  	if err != nil {
  		return err
  	}
  
  	fmt.Fprintf(cli.out, "%s\n", replyID)
  	return nil
  }
docs: // CmdServicePublish handles service create UI