code: func run(c *cobra.Command, args []string) error {
  	dec := json.NewDecoder(input())
  
  	root.Project.Alias = alias
  
  	if err := root.Project.LoadFunctions(name); err != nil {
  		return err
  	}
  
  	fn := root.Project.Functions[0]
  
  	for {
  		var v map[string]interface{}
  		err := dec.Decode(&v)
  
  		if err == io.EOF {
  			break
  		}
  
  		if err != nil {
  			return fmt.Errorf("parsing response: %s", err)
  		}
  
  		var reply, logs io.Reader
  
  		if e, ok := v["event"].(map[string]interface{}); ok {
  			reply, logs, err = fn.Invoke(e, v["context"])
  		} else {
  			reply, logs, err = fn.Invoke(v, nil)
  		}
  
  		if includeLogs && logs != nil {
  			io.Copy(os.Stderr, logs)
  		}
  
  		if err != nil {
  			return fmt.Errorf("function response: %s", err)
  		}
  
  		io.Copy(os.Stdout, reply)
  		fmt.Fprintf(os.Stdout, "\n")
  	}
  
  	return nil
  }
docs: // Run command.