Skip to main content
Configure custom git commit author identity across PraisonAI CLI commands and internal services.

Quick Start

1

Set Environment Variables

Configure your git identity using environment variables:
export PRAISONAI_GIT_USER_NAME="Your Name"
export PRAISONAI_GIT_USER_EMAIL="your.email@example.com"
2

Use GitHub Noreply Email

Protect your personal email on GitHub:
export PRAISONAI_GIT_USER_NAME="YourUsername"
export PRAISONAI_GIT_USER_EMAIL="YourUsername@users.noreply.github.com"
3

Test Configuration

Verify the configuration works:
praisonai commit -a
# Commits will now show: Your Name <your.email@example.com>

How It Works

PraisonAI reads identity configuration in this priority order:
PriorityMethodExample
1Explicit parameterCheckpointService(user_name="Custom")
2Environment variablesPRAISONAI_GIT_USER_NAME
3Default values"PraisonAI"

Environment Variables

VariableDescriptionDefault
PRAISONAI_GIT_USER_NAMEGit user.name for commits"PraisonAI"
PRAISONAI_GIT_USER_EMAILGit user.email for commitsService-specific
Default email varies by service:
  • CLI commands: No default (uses global git config)
  • CheckpointService: "checkpoints@praison.ai"
  • FileSnapshot: "praison@snapshot.local"

Setup Methods

Add to your shell profile (~/.bashrc, ~/.zshrc, ~/.bash_profile):
# Personal identity
export PRAISONAI_GIT_USER_NAME="John Doe"
export PRAISONAI_GIT_USER_EMAIL="john@example.com"

# GitHub noreply (recommended)
export PRAISONAI_GIT_USER_NAME="johndoe"
export PRAISONAI_GIT_USER_EMAIL="johndoe@users.noreply.github.com"
Reload your shell:
source ~/.zshrc  # or ~/.bashrc

Affected Components

CLI Commands

The praisonai commit command uses the environment variables for git author:
from praisonaiagents import Agent

# Environment variables are automatically used
# No code changes needed

Checkpoint Service

Internal checkpoints use the configured identity:
from praisonaiagents import CheckpointService

# Uses environment variables automatically
service = CheckpointService(workspace_dir="./project")

# Or override explicitly
service = CheckpointService(
    workspace_dir="./project",
    user_name="Override Name",
    user_email="override@example.com"
)

File Snapshot

File snapshots use the configured identity:
from praisonaiagents.snapshot import FileSnapshot

# Uses environment variables automatically
snapshot = FileSnapshot(project_path="./project")

# Or override explicitly
snapshot = FileSnapshot(
    project_path="./project", 
    user_name="Override Name",
    user_email="override@example.com"
)

Common Patterns

Using GitHub noreply email for privacy:
export PRAISONAI_GIT_USER_NAME="MervinPraison"
export PRAISONAI_GIT_USER_EMAIL="MervinPraison@users.noreply.github.com"
This ensures:
  • Commits are attributed to your GitHub account
  • Your personal email is not exposed
  • GitHub shows your profile picture and username
Set team-wide defaults using environment management:
# Development environment
export PRAISONAI_GIT_USER_NAME="Dev Team"
export PRAISONAI_GIT_USER_EMAIL="dev@company.com"

# Production environment  
export PRAISONAI_GIT_USER_NAME="Production Bot"
export PRAISONAI_GIT_USER_EMAIL="production@company.com"
Different identities for different projects:
# Project A
cd project-a
export PRAISONAI_GIT_USER_NAME="Team A"
export PRAISONAI_GIT_USER_EMAIL="team-a@company.com"
praisonai commit -a

# Project B
cd ../project-b
export PRAISONAI_GIT_USER_NAME="Team B" 
export PRAISONAI_GIT_USER_EMAIL="team-b@company.com"
praisonai commit -a

Best Practices

Always use GitHub’s noreply email format to protect your privacy:
# Format: {username}@users.noreply.github.com
export PRAISONAI_GIT_USER_EMAIL="yourusername@users.noreply.github.com"
Benefits:
  • Commits link to your GitHub profile
  • Personal email stays private
  • Works with all GitHub features
Add variables to your shell configuration for persistence:
# ~/.zshrc or ~/.bashrc
export PRAISONAI_GIT_USER_NAME="Your Name"
export PRAISONAI_GIT_USER_EMAIL="your@email.com"
This ensures the configuration persists across sessions.
Always verify your configuration before committing:
echo "Name: $PRAISONAI_GIT_USER_NAME"
echo "Email: $PRAISONAI_GIT_USER_EMAIL"

# Test with a small commit
praisonai commit -a
git log --oneline -1  # Check the author
Use explicit parameters for special cases:
# For automated systems
service = CheckpointService(
    workspace_dir="./project",
    user_name="Automated System",
    user_email="automation@company.com"
)

AI Commit

Generate AI-powered commit messages

Git Integration

PraisonAI git workflow integration