Install
Soullayer runs locally on your machine. No cloud account required.
# Install and initialize
npx soullayer init
# Or install globally
npm install -g @soullayer/cli
soullayer init This creates ~/.soullayer/ with your config, an empty SSD (Soullayer State Document), and a SQLite database. You'll be prompted for an encryption passphrase.
Create your identity
Define who you are to AI systems:
# Set your identity
soullayer identity update '{
"name": "Jane Chen",
"bio": "Senior engineer focused on distributed systems",
"style": {
"tone": "technical",
"verbosity": "concise"
},
"expertise": [
{"domain": "TypeScript", "proficiency": "expert"},
{"domain": "Kubernetes", "proficiency": "advanced"}
],
"constraints": ["Never share company-internal code"],
"facts": {
"location": "San Francisco",
"timezone": "America/Los_Angeles"
}
}'
# Set your preferences
soullayer preferences update '{
"outputFormat": "markdown",
"codeStyle": {
"language": "TypeScript",
"framework": "React",
"conventions": ["ESLint", "Prettier"]
}
}'
# View your identity
soullayer identity show Compile for platforms
Your identity compiles into the native format each AI platform expects:
# OpenAI Custom Instructions (≤8000 chars)
soullayer compile --target openai
# Claude Project Knowledge
soullayer compile --target claude
# Cursor IDE Rules
soullayer compile --target cursor
# Ollama System Prompt
soullayer compile --target ollama
# LangChain Agent Config
soullayer compile --target langchain
# Save to file
soullayer compile --target cursor --output .cursorrules
# Preview what would be included/excluded
soullayer compile --target openai --dry-run Start the API server
Run the local HTTP API for programmatic access:
# Start on default port 4747
soullayer serve
# Custom port
soullayer serve --port 8080
# With MCP server
soullayer serve --mcp The API runs on 127.0.0.1:4747 with bearer token authentication. Your token is in ~/.soullayer/config.json.
# Example API call
curl -H "Authorization: Bearer YOUR_TOKEN" \
http://127.0.0.1:4747/v1/identity
# Compile via API
curl -H "Authorization: Bearer YOUR_TOKEN" \
"http://127.0.0.1:4747/v1/compile?target=plaintext" Connect via MCP
Soullayer is a first-class MCP server. Connect it to Claude Desktop, Cursor, or any MCP client:
// claude_desktop_config.json
{
"mcpServers": {
"soullayer": {
"command": "soullayer",
"args": ["serve", "--mcp"]
}
}
} Available MCP tools: get_identity, get_context, update_state, eval_policy, get_preferences
Browser extension
The Chrome extension auto-injects your identity into ChatGPT, Claude, and Gemini. Coming soon to the Chrome Web Store.
For now, load it manually:
# Clone the repo
git clone https://github.com/foldedfox/Soullayer.git
# Load unpacked extension
# Chrome → Extensions → Developer mode → Load unpacked
# Select: Soullayer/extensions/chrome/ Add privacy policies
Apply pre-built compliance templates or create custom rules:
# Apply HIPAA template
soullayer policy apply-template --name hipaa
# Apply GDPR template
soullayer policy apply-template --name gdpr
# List available templates
soullayer policy templates
# Evaluate a string against your policies
soullayer policy eval "Patient John Doe SSN 123-45-6789"