---
title: Commands
---

# Commands

## Quick reference

```sh
$ sysg start                     # Launch services
$ sysg stop                      # Stop the current project
$ sysg restart                   # Restart services
$ sysg status                    # Check supervisor health
$ sysg logs                      # View output
$ sysg inspect -s api             # View metrics
$ sysg start --parent-pid 123 --name w1 -- cmd   # Create child
$ sysg purge                     # Clear all state
```

:::warning Deprecated
`sysg spawn` is deprecated. Use `sysg start --parent-pid ...` for child-process workflows.
:::

## Global flags

Every command accepts:

| Flag | Description |
|------|-------------|
| `--log-level` | Set verbosity for this invocation (`debug`, `info`, `warn`, `error`) |
| `--plain` | Agent-friendly output: disable color, banners, paging, and log following |
| `--sys` | Opt into privileged system mode (requires root) |

`--plain` is equivalent to setting `SYSTEMG_AGENT=1`, and is also implied when
`SYSTEMG_AGENT` or `NO_COLOR` is set in the environment. Use it for scripts,
pipes, SSH commands, and coding agents so `status`, `inspect`, and `logs` emit
plain, un-truncated, non-blocking output.

```sh
$ sysg --plain status              # no color, full unit names
$ SYSTEMG_AGENT=1 sysg logs -s api  # one-shot, stripped, no banners
```

## Supervisor status

`sysg status` talks to the running supervisor and shows all registered
projects. Use filters to narrow the view:

```sh
$ sysg start --config app.yaml
$ sysg status                 # Shows all supervisor-known projects
$ sysg status --config app.yaml
$ sysg status --project app
```

## Daemon mode

Run supervisor in background:

```sh
$ sysg start --daemonize
$ sysg status                 # Communicates with daemon
$ sysg stop                   # Stops the current project
$ sysg stop --supervisor      # Stops all projects and exits the supervisor
```

## Service-specific operations

Most commands accept a service name:

```sh
$ sysg restart --service api
$ sysg logs --service worker
$ sysg stop --service redis
```

## See also

- [Configuration](../configuration) - Define services
- [Quickstart](../../quickstart) - First steps
