remote_cli

assert not is_pickleable(lambda x: x)
def foo(): pass
assert is_pickleable(foo)

create_remote_controller_cli

create_remote_controller_cli(
   base_controller_cls: Type[Controller],
   url: Optional[str],
   api_key: Optional[str],
   local_mode: bool,
   start_local_server_automatically: bool,
   lockfile_path: Optional[str],
   controller: Controller|Callable[[], Controller],
   local_server_start_timeout: float
) -> typer.Typer

from ctrlstack import ctrl_cmd_method, ctrl_query_method, ctrl_method

class FooController(Controller):
    @ctrl_cmd_method
    def bar(self):
        pass
    
    @ctrl_query_method
    def baz(self, x: int) -> str:
        pass
    
    @ctrl_method(ControllerMethodType.QUERY, "q")
    def qux(self):
        pass
    
remote_controller = create_remote_controller(FooController, "local")
    
remote_cli_app = create_remote_controller_cli(
    FooController,
    local_mode=True,
    lockfile_path="/tmp/ctrlstack.lock",
)