Quickstart
Install Rebase Toolkit, run a Rebase Function, and run a step-based Rebase Workflow.
Rebase Toolkit lets you define Python functions and Rebase Workflows locally, run them on your machine, and submit ephemeral cloud runs from the terminal.
This quickstart creates two minimal examples:
| Example | What it shows | Default execution |
|---|---|---|
| Rebase Function | One SDK-callable Python function. | mode="interactive", isolation="shared" |
| Rebase Workflow | One SDK-callable workflow with multiple observable steps. | mode="interactive", isolation="shared" |
1. Install
Install Rebase Toolkit from GitHub into a clean uv environment:
uv venv .venv
source .venv/bin/activate
uv pip install "rebase-toolkit @ git+https://github.com/rebase-energy/rebase-toolkit.git"pip install rebase-toolkit also works, but the PyPI release can lag behind GitHub.
2. Set Up
Authenticate this computer and select or create a workspace:
rebase setupThe setup wizard signs you in with Google or GitHub, creates or selects a workspace, and stores a local auth session and workspace profile. The hosted Rebase API URL is built into rebase-toolkit, so there is no API URL to configure for normal usage.
First-time users need an invite: a platform invite to create a workspace, or a workspace invite from an Owner to join one. Without one, setup stops at sign-in.
GitHub source backing is optional and not part of setup. Run rebase connect github later: it asks for an existing repository or opens GitHub to create a new one, then asks you to install the Rebase GitHub App on that repository.
3. Run a Function
Create hello_function.py:
import rebase
@rebase.function(name="hello-function")
def hello(name: str = "World") -> dict:
return {"message": f"Hello, {name}!"}
if __name__ == "__main__":
print(hello(name="Rebase"))Run it locally:
python hello_function.pyExpected output:
{'message': 'Hello, Rebase!'}Run the same file in the cloud without deploying it:
rebase run hello_function.py --param name=RebaseFunctions are private Python callables. By default, Rebase uses interactive/shared execution for the lowest cloud-loop latency. Use isolation="dedicated" for a private warm service or mode="job" for long-running work. Introduce deploys later, when you want a reusable, versioned target.
4. Run a Workflow
Create hello_workflow.py:
import rebase
@rebase.step()
def load_name(name: str = "World") -> dict:
return {"name": name}
@rebase.step()
def build_message(payload: dict) -> str:
return f"Hello, {payload['name']}!"
@rebase.step()
def package_result(message: str) -> dict:
return {"message": message}
@rebase.workflow(name="hello-workflow")
def hello_workflow(name: str = "World") -> dict:
payload = load_name(name)
message = build_message(payload)
return package_result(message)
if __name__ == "__main__":
print(hello_workflow(name="Rebase"))Run it locally:
python hello_workflow.pyExpected output:
{'message': 'Hello, Rebase!'}Run the same workflow in the cloud without deploying it:
rebase run hello_workflow.py --param name=RebaseWorkflows are Python entrypoints that Rebase can submit through Prefect orchestration. Step calls inside a workflow are compiled into a Prefect-backed DAG for cloud runs, giving you multiple observable steps, retries, and per-step status. Introduce deploys later, when you want a reusable, versioned workflow target or a scheduled workflow.
5. Next
| Page | Use it for |
|---|---|
| Execution Modes | Compare interactive shared, interactive dedicated, and job execution. |
| Function Execution | Configure function execution, dependencies, and Cloud Run isolation. |
| Workflow Execution | Choose between warm-service and Cloud Run Jobs workflow execution. |
| Endpoints | Expose deployed functions, models, and workflows as HTTP routes. |
| Reference | Look up SDK and CLI signatures. |

