# runtime/entrypoints/system.entrypoint.ts

> 17 lines of code and 1 definition.

Tree: GovLab Docs
Language: typescript
Layer: runtime
Canonical: https://banes-lab.com/anatomy/docs#file-docs-runtime-entrypoints-system-entrypoint-ts
Source text: https://banes-lab.com/source/docs/runtime/entrypoints/system.entrypoint.ts.txt

Listed in [runtime/entrypoints](https://banes-lab.com/api/source/docs/runtime/entrypoints.md), after [runtime/entrypoints/readme.entrypoint.ts](https://banes-lab.com/source/docs/runtime/entrypoints/readme.entrypoint.ts.md).

## Definitions

- `argv` (lexical_declaration, line 9)

## Contained in

- [runtime/entrypoints](https://banes-lab.com/anatomy/docs/folder-docs-runtime-entrypoints.md)

## Source

```typescript
import { FAILURE_EXIT, FLAG_NAMES } from "#configuration/constants/invocation.constants";
import { absolutePath, relativePath } from "@ssot/paths";
import { hasFlag, resolveArgv } from "@govlab/argv";
import { SYSTEM_ARGV } from "#configuration/configs/invocation.config";
import { printErr } from "#core/reporters/base.reporter";
import process from "node:process";
import { runSystem } from "#core/coordinators/system.coordinator";

const argv = resolveArgv(SYSTEM_ARGV);

try {
    runSystem(hasFlag(argv, FLAG_NAMES.check), {
        path: absolutePath("docArch.system"),
        rel: relativePath("docArch.system"),
    });
} catch (error) {
    printErr(error instanceof Error ? error.message : String(error));
    process.exitCode = FAILURE_EXIT;
}
```
