# How to Configure the `lifeos` Launch Command to Load the Constitutional System Prompt

> Learn to configure the lifeos launch command using the system prompt flag to automatically load constitutional rules. Streamline your sessions today.

- Repository: [Daniel Miessler 🛡️/LifeOS](https://github.com/danielmiessler/LifeOS)
- Tags: how-to-guide
- Published: 2026-08-12

---

**Use the `-s` or `--system-prompt` flag when running [`lifeos.ts`](https://github.com/danielmiessler/LifeOS/blob/main/lifeos.ts) to inject [`LIFEOS/LIFEOS_SYSTEM_PROMPT.md`](https://github.com/danielmiessler/LifeOS/blob/main/LIFEOS/LIFEOS_SYSTEM_PROMPT.md), or create a shell alias that includes this flag so every session loads the constitutional rules automatically.**

LifeOS operates Claude through a three-layer architecture where the *constitutional* layer—immutable rules, response formatting, and security protocols—resides in a dedicated system prompt file. Understanding how to configure the `lifeos` launch command to load this constitutional system prompt is essential for activating LifeOS's core protections. This guide walks through the exact mechanism, shell configurations, and verification steps based on the [danielmiessler/LifeOS](https://github.com/danielmiessler/LifeOS) source code.

## How the `lifeos` Launcher Handles System Prompts

The [`lifeos.ts`](https://github.com/danielmiessler/LifeOS/blob/main/lifeos.ts) tool serves as the primary launcher for LifeOS. Located at [`LifeOS/install/LIFEOS/TOOLS/lifeos.ts`](https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/LIFEOS/TOOLS/lifeos.ts), it accepts a `-s | --system-prompt` option that specifies the path to the system prompt file.

According to [line 688 of [`lifeos.ts`](https://github.com/danielmiessler/LifeOS/blob/main/lifeos.ts)](https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/LIFEOS/TOOLS/lifeos.ts#L688), when this option is omitted, the tool **defaults** to [`LIFEOS/LIFEOS_SYSTEM_PROMPT.md`](https://github.com/danielmiessler/LifeOS/blob/main/LIFEOS/LIFEOS_SYSTEM_PROMPT.md). However, relying on defaults is risky—explicit configuration ensures the constitutional prompt is always present.

Without this flag, a plain `claude` command runs without the constitution, loading only [`CLAUDE.md`](https://github.com/danielmiessler/LifeOS/blob/main/CLAUDE.md) and bypassing LifeOS's security framework.

## Creating the Shell Alias for Automatic Loading

The official installation approach wraps the launcher in a shell alias that hardcodes the system prompt path. This guarantees every `lifeos` invocation includes the constitutional layer.

### Bash and Zsh Configuration

The alias uses a `<configRoot>` placeholder that resolves to your LifeOS configuration directory (typically `~/.claude`), discovered via the `DetectEnv` utility:

```bash
alias lifeos='bun <configRoot>/LIFEOS/TOOLS/lifeos.ts -s <configRoot>/LIFEOS/LIFEOS_SYSTEM_PROMPT.md'

```

The [`install.sh`](https://github.com/danielmiessler/LifeOS/blob/main/install.sh) bootstrap script handles this automatically during setup, injecting the alias after environment detection. See [line 286 of [`install.sh`](https://github.com/danielmiessler/LifeOS/blob/main/install.sh)](https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/install.sh#L286) for the implementation.

To add manually:

```bash

# Detect your config root and append alias

echo "alias lifeos='bun $(detectEnv)/LIFEOS/TOOLS/lifeos.ts -s $(detectEnv)/LIFEOS/LIFEOS_SYSTEM_PROMPT.md'" >> ~/.bashrc
source ~/.bashrc

```

### Fish Shell Configuration

Fish requires a different syntax using `funcsave` for persistence:

```fish
alias lifeos "bun (detectEnv)/LIFEOS/TOOLS/lifeos.ts -s (detectEnv)/LIFEOS/LIFEOS_SYSTEM_PROMPT.md"
funcsave lifeos

```

## What the Constitutional System Prompt Contains

When properly loaded, [`LIFEOS/LIFEOS_SYSTEM_PROMPT.md`](https://github.com/danielmiessler/LifeOS/blob/main/LIFEOS/LIFEOS_SYSTEM_PROMPT.md) injects:

- **Five constitutional rules** — Security protocol, verification doctrine, and operational constraints
- **Unified output format** — Structured response requirements the model must obey
- **Built-in security checks** — External content treated as data only, preventing prompt injection

These protections are **absent** without the `-s` flag. The install documentation explicitly warns: *"The launch command loads the constitution"* — skip this step and you defeat LifeOS's core security model. See [[`INSTALL.md`](https://github.com/danielmiessler/LifeOS/blob/main/INSTALL.md), lines 97-99](https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/skills/LifeOS/INSTALL.md#L97).

## Using Alternative Harnesses

If you prefer a different CLI (e.g., `pi`), pass its equivalent system-prompt flag pointing to the same file:

```bash
pi --append-system-prompt <configRoot>/LIFEOS/LIFEOS_SYSTEM_PROMPT.md

```

The constitutional rules are tool-agnostic—what matters is that [`LIFEOS_SYSTEM_PROMPT.md`](https://github.com/danielmiessler/LifeOS/blob/main/LIFEOS_SYSTEM_PROMPT.md) contents reach the model's system context.

## Verifying Your Configuration

Confirm the constitutional prompt loads correctly:

```bash

# Check that the -s option is recognized

lifeos --help

# Test with an invalid path — should error, proving the flag is active

lifeos -s /dev/null

# Run normally — constitutional rules now govern the session

lifeos

```

## Key Source Files Reference

| File | Purpose |
|------|---------|
| [`LifeOS/install/LIFEOS/TOOLS/lifeos.ts`](https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/LIFEOS/TOOLS/lifeos.ts) | Launcher script defining `-s/--system-prompt` flag |
| [`LifeOS/install/skills/LifeOS/INSTALL.md`](https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/skills/LifeOS/INSTALL.md) | Official alias syntax and launch requirements |
| [`LifeOS/install/install.sh`](https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/install.sh) | Bootstrap script that injects aliases during setup |
| [`LifeOS/LIFEOS/LIFEOS_SYSTEM_PROMPT.md`](https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/LIFEOS/LIFEOS_SYSTEM_PROMPT.md) | Constitutional rules, format spec, security protocol |
| [`LifeOS/install/settings.system.json`](https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/settings.system.json) | Privileged paths always authorized for edits |

## Summary

- **The `-s/--system-prompt` flag** is mandatory to inject [`LIFEOS/LIFEOS_SYSTEM_PROMPT.md`](https://github.com/danielmiessler/LifeOS/blob/main/LIFEOS/LIFEOS_SYSTEM_PROMPT.md) into Claude's context.
- **Shell aliases** hardcode this flag so you never launch without the constitution.
- **The [`install.sh`](https://github.com/danielmiessler/LifeOS/blob/main/install.sh) script** automates alias creation during environment setup.
- **Alternative CLIs** like `pi` require their own flag syntax but consume the same prompt file.
- **Verification** via `--help` and invalid path testing confirms proper configuration.

Without this configuration, LifeOS runs in a degraded state—functional but unprotected.

## Frequently Asked Questions

### What happens if I run `lifeos` without the `-s` flag?

The model launches with only [`CLAUDE.md`](https://github.com/danielmiessler/LifeOS/blob/main/CLAUDE.md) loaded. You lose the five constitutional rules, unified output format, and security protocols. The session behaves like standard Claude without LifeOS protections.

### Does the default behavior work, or must I specify the path explicitly?

While [`lifeos.ts`](https://github.com/danielmiessler/LifeOS/blob/main/lifeos.ts) defaults to [`LIFEOS/LIFEOS_SYSTEM_PROMPT.md`](https://github.com/danielmiessler/LifeOS/blob/main/LIFEOS/LIFEOS_SYSTEM_PROMPT.md) when `-s` is omitted, explicit configuration via alias is strongly recommended. This prevents accidental unprotected launches if working directories or environment variables change.

### Can I use LifeOS with a different model or CLI tool?

Yes. Any CLI that supports system prompt injection can load the constitution. Adapt the flag syntax—`pi` uses `--append-system-prompt`, for example—and point it to [`LIFEOS/LIFEOS_SYSTEM_PROMPT.md`](https://github.com/danielmiessler/LifeOS/blob/main/LIFEOS/LIFEOS_SYSTEM_PROMPT.md).

### Where is `<configRoot>` determined during installation?

The `DetectEnv` utility discovers this at runtime, typically resolving to `~/.claude`. The [`install.sh`](https://github.com/danielmiessler/LifeOS/blob/main/install.sh) script performs this detection before injecting aliases, ensuring paths are correct for your system.