Run a long-running HTTP server exposing the orchestrator as a JSON API

Binds to 127.0.0.1 by default (local only); --host changes the address. There is no authentication. POST /run and /get trigger async runs; poll GET /status/<run_id> for results.

Usage: barca serve [OPTIONS] [FILES]...

Arguments:
  [FILES]...
          Python files or directories to read (default: every .py file under the project root that imports barca; see `barca docs discovery`). With --watch, files added later are not picked up until restart

Options:
  -p, --port <PORT>
          Port to bind on

          [default: 8274]

      --host <HOST>
          IP address to bind on; 0.0.0.0 (or ::) listens on every interface. The API has no authentication

          [default: 127.0.0.1]

      --watch
          Dev mode: re-parse the DAG when source files change

      --no-schedule
          Disable the cron scheduler (Schedule(...) assets will not auto-fire)

      --timezone <TIMEZONE>
          Timezone for cron evaluation: local (this machine's zone) or utc, in any letter case, or an IANA name such as America/New_York, which is case-sensitive. Any other value is a usage error

          [default: local]

      --read-only
          Inspect only: refuse runs, never schedule, read the metadata DB from snapshots

      --env <ENV>
          Environment name (separates cache/state per environment)

  -h, --help
          Print help (see a summary with '-h')

Examples:
  BARCA_STATE=off barca serve pipeline.py    # local history; keep configured artifact sharing
  BARCA_REMOTE=off barca serve pipeline.py   # local artifacts and history
  barca serve                                # every file in the project; files added later need a restart
  barca serve pipeline.py                    # HTTP API on 127.0.0.1:8274 plus the scheduler
  barca serve pipeline.py --port 8400        # custom port
  barca serve pipeline.py --host 0.0.0.0     # all interfaces (containers, VMs); the API has no auth
  barca serve pipeline.py --watch            # dev: re-parse the DAG when files change
  barca serve pipeline.py --no-schedule      # API only; Schedule(...) nodes do not fire
  barca serve pipeline.py --timezone utc     # evaluate cron in UTC (default: local)
  barca serve pipeline.py --timezone America/New_York   # an IANA zone name
  barca serve pipeline.py --read-only        # inspect only: no runs, no scheduler, DB never written

Binds to 127.0.0.1 by default. There is no authentication: with --host 0.0.0.0, anyone who
can reach the port can trigger runs, so keep it on a private network or behind a proxy.
Invalid sources and their graph dependents are excluded; healthy definitions and schedules
continue. Startup logs, /health load_errors and the UI show unloaded files and affected nodes.
--watch restores repaired configured sources; one-shot commands remain strict.
Trigger deployed runs through HTTP or barca.Client. Ordinary get/run commands execute locally;
CLI --server, server URL configuration and the shared-ledger design are not implemented yet.
With a remote artifact store, set BARCA_STATE=off to retain local metadata.
More: barca docs scheduling
