> ## Documentation Index
> Fetch the complete documentation index at: https://sysg.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# systemg

> A general-purpose program composer.

<p align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" />

    <source media="(prefers-color-scheme: light)" />

    <img src="https://mintcdn.com/stonehedgelabs/DOIqyUmRN8qmEyh5/static/img/full-logo-colored-cropped.webp?fit=max&auto=format&n=DOIqyUmRN8qmEyh5&q=85&s=a9ec4b908161b42d761d0461d2c36e1b" alt="systemg" width="420" data-path="static/img/full-logo-colored-cropped.webp" />
  </picture>
</p>

systemg runs your service graph from a single YAML file.

<CodeGroup>
  ```bash Install theme={null}
  curl --proto '=https' --tlsv1.2 -fsSL https://sh.sysg.dev/ | sh
  ```

  ```bash Verify theme={null}
  sysg --version
  ```
</CodeGroup>

<CardGroup cols={2}>
  <Card title="Quickstart" href="/quickstart">
    Launch your first service graph in minutes.
  </Card>

  <Card title="Examples" href="/examples">
    Start from working examples for real-world service layouts.
  </Card>
</CardGroup>

## What systemg does

Suppose you're building an API that needs PostgreSQL, Redis, and a background
worker. Instead of starting each service manually in different terminals, you
define them once in a YAML file. systemg starts everything in the right order,
restarts crashed services, and provides unified logging.

```yaml theme={null}
version: "1"
services:
  postgres:
    command: "postgres -D /var/lib/postgresql/data"
  redis:
    command: "redis-cli ping"
  api:
    command: "python app.py"
    depends_on: ["postgres", "redis"]
  worker:
    command: "celery worker -A tasks"
    depends_on: ["redis"]
  backup:
    command: "pg_dump mydb > /backups/db-$(date +%Y%m%d).sql"
    cron:
      expression: "0 0 2 * * *"
      timezone: "America/New_York"
    hooks:
      on_stop:
        success:
          command: "curl -X POST https://hooks.slack.com/services/T00/B00/XXX -H 'Content-Type: application/json' -d '{\"text\":\"Backup completed successfully\"}'"
        error:
          command: "curl -X POST https://hooks.slack.com/services/T00/B00/XXX -H 'Content-Type: application/json' -d '{\"text\":\"Backup failed!\"}'"
```

## Built for production

* Start services in dependency order.
* Restart failed processes with configurable backoff.
* Keep service logs isolated and predictable.
* Run everything from a single binary.
