✓ Verified 💻 Development ✓ Enhanced Data

Spirit

State Preservation & Identity Resurrection Infrastructure Tool (SPIRIT)

Rating
4.8 (438 reviews)
Downloads
17,340 downloads
Version
1.0.0

Overview

State Preservation & Identity Resurrection Infrastructure Tool (SPIRIT)

Complete Documentation

View Source →

SPIRIT 🌌

State Preservation & Identity Resurrection Infrastructure Tool

Preserves AI agent identity, memory, and projects in a portable Git repository. Your AI's spirit, always preserved. Death. Migration. Multi-device. Always you.

New: OpenClaw Workspace Mode 🆕

SPIRIT can now link directly to your OpenClaw workspace:

bash
# Initialize with workspace mode
spirit init --workspace=/root/.openclaw/workspace --name="orion" --emoji="🌌"

# All your identity/memory files stay in workspace
# Only .spirit-tracked config is symlinked to ~/.spirit/

Benefits:

  • ✅ Edit .spirit-tracked config directly in workspace
  • ✅ All identity/memory files in one place
  • ✅ Sync with SPIRIT_SOURCE_DIR=/root/.openclaw/workspace spirit sync

Requirements

ToolPurposeRequired?Install
gitVersion controlRequiredBuilt-in
spiritThis toolRequiredbrew install TheOrionAI/tap/spirit
ghGitHub CLIOptional*brew install gh
*Only needed if you prefer GitHub CLI auth. SSH keys work without gh.


Quick Start

Option A: OpenClaw Workspace Mode (Recommended)

bash
# 1. Initialize with your OpenClaw workspace
spirit init --workspace=/root/.openclaw/workspace --name="orion" --emoji="🌌"

# 2. Edit what gets synced
cat /root/.openclaw/workspace/.spirit-tracked

# 3. Configure git remote
cd ~/.spirit
git remote add origin [email protected]:USER/PRIVATE-REPO.git

# 4. Sync
export SPIRIT_SOURCE_DIR=/root/.openclaw/workspace
spirit sync

Option B: Standard Mode (Legacy)

bash
# Files live in ~/.spirit/
spirit init --name="orion" --emoji="🌌"
spirit sync


SPIRIT_SOURCE_DIR Environment Variable

When set, SPIRIT reads files from this directory instead of ~/.spirit/:

bash
# One-time sync
SPIRIT_SOURCE_DIR=/path/to/workspace spirit sync

# Or export for session
export SPIRIT_SOURCE_DIR=/path/to/workspace
spirit sync

The .spirit-tracked config is still read from ~/.spirit/ (which may be a symlink to your workspace).


What Gets Preserved

With OpenClaw workspace mode, these files sync from your workspace:

FileContents
IDENTITY.mdYour agent's identity
SOUL.mdBehavior/personality guidelines
AGENTS.mdAgent configuration
USER.mdUser preferences
memory/.mdDaily conversation logs
projects/.mdActive project files
.spirit-trackedConfig: What to sync (edit this!)
Default .spirit-tracked:
json
{
  "version": "1.0.0",
  "files": [
    "IDENTITY.md",
    "SOUL.md",
    "AGENTS.md",
    "USER.md",
    "memory/*.md",
    "projects/*.md"
  ]
}


Authentication Options

Option 1: SSH Keys (Recommended, no gh needed)

bash
cd ~/.spirit
git remote add origin [email protected]:USER/REPO.git

Option 2: GitHub CLI

bash
gh auth login
git remote add origin https://github.com/USER/REPO.git

Option 3: Git Credential Helper

bash
git config credential.helper cache  # or 'store' for persistence
git remote add origin https://github.com/USER/REPO.git


Security Checklist

☑️ Repository: Always PRIVATE — state files contain identity and memory ☑️ Authentication: Use SSH keys or gh auth login — never tokens in URLs ☑️ Review: Check cat ~/.spirit/.spirit-tracked before sync ☑️ Test: Verify first sync in isolation

Never use:

  • https://[email protected]/... in remote URL
  • ❌ Tokens in shell history or process lists

Scheduled Sync

bash
# Add to crontab
crontab -e

# Every 15 minutes
*/15 * * * * SPIRIT_SOURCE_DIR=/root/.openclaw/workspace /usr/local/bin/spirit sync 2>/dev/null


Restore on New Machine

bash
# Install SPIRIT
curl -fsSL https://theorionai.github.io/spirit/install.sh | bash

# Clone your state
git clone [email protected]:USER/REPO.git ~/.spirit

# If using workspace mode, set source directory
export SPIRIT_SOURCE_DIR=/your/workspace/path


Resources

  • SPIRIT: https://github.com/TheOrionAI/spirit
  • GitHub CLI: https://cli.github.com

License: MIT

Installation

Terminal bash

openclaw install spirit
    
Copied!

💻Code Examples

# Only .spirit-tracked config is symlinked to ~/.spirit/

-only-spirit-tracked-config-is-symlinked-to-spirit.txt
**Benefits:**
- ✅ Edit `.spirit-tracked` config directly in workspace
- ✅ All identity/memory files in one place
- ✅ Sync with `SPIRIT_SOURCE_DIR=/root/.openclaw/workspace spirit sync`

---

## Requirements

| Tool | Purpose | Required? | Install |
|------|---------|-----------|---------|
| `git` | Version control | **Required** | Built-in |
| `spirit` | This tool | **Required** | `brew install TheOrionAI/tap/spirit` |
| `gh` | GitHub CLI | Optional* | `brew install gh` |

*Only needed if you prefer GitHub CLI auth. SSH keys work without `gh`.

---

## Quick Start

### Option A: OpenClaw Workspace Mode (Recommended)

spirit sync

spirit-sync.txt
---

## SPIRIT_SOURCE_DIR Environment Variable

When set, SPIRIT reads files from this directory instead of `~/.spirit/`:

spirit sync

spirit-sync.txt
The `.spirit-tracked` config is still read from `~/.spirit/` (which may be a symlink to your workspace).

---

## What Gets Preserved

With **OpenClaw workspace mode**, these files sync from your workspace:

| File | Contents |
|------|----------|
| `IDENTITY.md` | Your agent's identity |
| `SOUL.md` | Behavior/personality guidelines |
| `AGENTS.md` | Agent configuration |
| `USER.md` | User preferences |
| `memory/*.md` | Daily conversation logs |
| `projects/*.md` | Active project files |
| `.spirit-tracked` | **Config**: What to sync (edit this!) |

**Default `.spirit-tracked`:**

}

.txt
---

## Authentication Options

### Option 1: SSH Keys (Recommended, no `gh` needed)

git remote add origin https://github.com/USER/REPO.git

git-remote-add-origin-httpsgithubcomuserrepogit.txt
---

## Security Checklist

☑️ **Repository:** Always PRIVATE — state files contain identity and memory
☑️ **Authentication:** Use SSH keys or `gh auth login` — never tokens in URLs
☑️ **Review:** Check `cat ~/.spirit/.spirit-tracked` before sync
☑️ **Test:** Verify first sync in isolation

**Never use:**
- ❌ `https://[email protected]/...` in remote URL
- ❌ Tokens in shell history or process lists

---

## Scheduled Sync

*/15 * * * * SPIRIT_SOURCE_DIR=/root/.openclaw/workspace /usr/local/bin/spirit sync 2>/dev/null

15-----spiritsourcedirrootopenclawworkspace-usrlocalbinspirit-sync-2devnull.txt
---

## Restore on New Machine
example.sh
# Initialize with workspace mode
spirit init --workspace=/root/.openclaw/workspace --name="orion" --emoji="🌌"

# All your identity/memory files stay in workspace
# Only .spirit-tracked config is symlinked to ~/.spirit/
example.sh
# 1. Initialize with your OpenClaw workspace
spirit init --workspace=/root/.openclaw/workspace --name="orion" --emoji="🌌"

# 2. Edit what gets synced
cat /root/.openclaw/workspace/.spirit-tracked

# 3. Configure git remote
cd ~/.spirit
git remote add origin [email protected]:USER/PRIVATE-REPO.git

# 4. Sync
export SPIRIT_SOURCE_DIR=/root/.openclaw/workspace
spirit sync
example.sh
# Files live in ~/.spirit/
spirit init --name="orion" --emoji="🌌"
spirit sync
example.sh
# One-time sync
SPIRIT_SOURCE_DIR=/path/to/workspace spirit sync

# Or export for session
export SPIRIT_SOURCE_DIR=/path/to/workspace
spirit sync

Tags

#web_and-frontend-development

Quick Info

Category Development
Model Claude 3.5
Complexity One-Click
Author gopinathnelluri
Last Updated 3/10/2026
🚀
Optimized for
Claude 3.5
🧠

Ready to Install?

Get started with this skill in seconds

openclaw install spirit