Skip to content

Procedures: CLI call interface #3529

Open

Description

@gefjon

Design and implement a way to call procedures and await their results from the SpacetimeDB CLI. Note that procedures live at a different HTTP route than reducers (/database/:name/procedure/:name vs /database/:name/call/:name), at least for now. As such, we'll have to decide between:

  • spacetime call does some extra work internally to determine whether it's calling a reducer or a procedure, but hides the difference from the user.
  • There's a separate subcommand, possibly spacetime procedure, which calls procedures. Attempting to spacetime call a procedure is an error.

Activity

  1. gefjon commented on Nov 13, 2025

    @gefjon
    ContributorAuthor

    We like the former version, where the same call CLI command can do either. We intend to modify the /v1/database/:name/call/:func route to call either reducers or procedures, at which point this should require only very minimal modifications to the CLI.

  2. kistz commented on Nov 28, 2025

    @kistz
    Contributor

    another proposal i thought of is adding the commands:

    spacetime reducer db name
    spacetime procedure db name

    Then the call is gone and its not ambigous (call would get marked deprecated and removed in 2.0 in that version) :)

    Idk lemme know what you think :>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions