Skip to content

alto offer

Offer a method of this program's to its session, served by HANDLER: each call's arguments (JSON) on its standard input, its reply (JSON) on its standard output. Runs in a session, and stays running to serve calls until the process that started it ends (or with --keep, the session does). `alto describe` lists it; `alto call` calls it

Usage

Offer a method of this program's to its session, served by HANDLER: each call's arguments (JSON) on its standard input, its reply (JSON) on its standard output. Runs in a session, and stays running to serve calls until the process that started it ends (or with --keep, the session does). `alto describe` lists it; `alto call` calls it

Usage: alto offer [OPTIONS] <NAME> [-- <HANDLER>...]

Arguments:
  <NAME>        The method's name: letters, digits, - and _
  [HANDLER]...  The handler, as a command

Options:
      --about <ABOUT>   What it's for, in a few words
      --on <DEVICE>     Work with the sessions on another device, paired with before (`alto devices`), or one of your own on Tailscale by its name there: for the session commands (ls, new, attach, send, run, wait, capture, kill, pause, resume, fetch, work). A session named `studio:3`, as `ls --all` prints it, needs no --on
      --takes <SCHEMA>  What it takes, as JSON Schema (the subset `describe` uses): default, nothing
      --gives <SCHEMA>  What it gives, likewise
      --needs <NEEDS>   The right a caller needs (12.11): `read` for a method that only tells, `send` (the default) for one that changes something, `approve` for one that answers for the person [default: send] [possible values: read, send, approve]
      --keep            Stay after the process that started it ends, until the session does
      --limit <LIMIT>   How long a handler may take before it's stopped (`20`, `500ms`) [default: 20]
  -h, --help            Print help

Generated from alto 0.0.1 by tools/export-reference.py.