Tarish is a user-friendly wrapper for XMRig that simplifies cryptocurrency mining on macOS and Linux systems. It provides automatic CPU detection, configuration management, and 24/7 operation support with built-in sleep prevention.
- 🚀 Easy Setup: One-command installation and configuration
- 🔍 Auto CPU Detection: Automatically detects your CPU and selects optimal settings
- 📦 Embedded Binaries: XMRig binaries and configs included - no separate downloads needed
- 🔧 Configuration Management: Pre-configured profiles for popular CPUs (M1, M2, M3, M4, Ryzen, etc.)
- 🚫 Zero Donation: Completely donation-free mining
- 🌙 Sleep Prevention: Automatic system wake-lock for 24/7 operation
- 🔄 Auto-start: Optional service installation for automatic startup on boot
- 📊 Status Monitoring: Real-time hashrate and pool statistics
- 🔒 Safe Process Management: Clean process handling with PID tracking
- Apple Silicon: M1, M1 Pro, M2 Max, M3, M3 Pro, M3 Max, M4, M4 Pro
- Intel: macOS 10.13+
- x86_64: Ubuntu, Debian, Fedora, CentOS, Arch, etc.
- ARM64: Raspberry Pi, ARM servers
# Clone or download tarish
git clone https://github.com/yourusername/tarish.git
cd tarish
# Install to system (requires sudo)
sudo ./tarish install
# Or install to user directory (no sudo needed)
./tarish installTarish now checks runtime dependencies before tarish install, tarish start, and tarish service enable.
- Installs
libhwloc15andhwlocwithapt-getwhen they are missing - Tries to install
msr-tools, download/usr/local/bin/randomx_boost.sh, and managexmrig-msr.service - Continues without
xmrig-msrwhen MSR tuning cannot be applied, which is common in containers that block MSR writes
- Verifies the built-in
caffeinatedependency used for sleep prevention - Uses Homebrew to install
hwlocwhen Homebrew is available andhwlocis missing - Skips
msr-toolsandrandomx_boost.shbecause that Linux MSR tuning path does not exist on macOS
# Start mining (auto-detects CPU and config)
tarish start
# Check mining status
tarish status
# Stop mining
tarish stop# Enable auto-start service (requires sudo on Linux)
sudo tarish service enable
# Check service status
tarish service status
# Disable auto-start
sudo tarish service disableTarish automatically prevents your system from sleeping during mining operations to ensure 24/7 uptime.
Uses the built-in caffeinate command to prevent:
- System idle sleep
- Display sleep
- Disk idle sleep
Uses systemd-inhibit (modern systems) or fallback methods to prevent:
- System idle sleep
- Suspend/hibernate
- Lid-close sleep
Check if sleep prevention is active:
tarish statusOutput will show:
Sleep Prevention: ACTIVE ✓
# View active power assertions
pmset -g assertions | grep PreventUserIdleSystemSleep
# Check caffeinate process
ps aux | grep caffeinate# List active sleep inhibitors
systemd-inhibit --list
# Check for tarish inhibitor
systemd-inhibit --list | grep tarish| Command | Alias | Description |
|---|---|---|
install |
i |
Install tarish to system |
uninstall |
un |
Remove tarish from system |
update |
u |
Update to latest version |
start |
st |
Start mining |
stop |
sp |
Stop mining |
status |
- | Show mining status |
info |
- | Show system information |
| Command | Description |
|---|---|
service enable |
Enable auto-start on boot |
service disable |
Disable auto-start |
service status |
Check auto-start status |
| Option | Description |
|---|---|
--force or -f |
Kill existing process and restart |
Tarish includes optimized configurations for popular CPUs:
- M1 (
m1.json) - M1 Pro (
m1pro.json) - M2 Max (
m2max.json) - M3 (
m3.json) - M3 Pro (
m3pro.json) - M3 Max (
m3max.json) - M4 (
m4.json) - M4 Pro (
m4pro.json)
- Ryzen 9 5900X (
5900x.json) - Ryzen 9 7950X (
7950x.json) - Ryzen 9 9950X (
9950x.json)
# Basic start (auto-detect CPU)
tarish start
# Force restart if already running
tarish start --forcetarish statusOutput example:
=== Tarish Status ===
Status: RUNNING (PID: 12345)
Version: 6.26.0
Uptime: 2h 15m
Hashrate: 8234.56 H/s (10s) | 8156.78 H/s (60s) | 8456.90 H/s (max)
Pool: pool.supportxmr.com:443
Wallet: 4AdUndXH...
Donate Level: 0%
Sleep Prevention: ACTIVE ✓
Auto-start: enabled
tarish infoOutput example:
=== System Information ===
CPU Model: Apple M3 Max
CPU Family: apple_m3_max
Cores: 16
OS/Arch: darwin/arm64
Config: /usr/local/share/tarish/configs/m3max.json
XMRig: /usr/local/share/tarish/bin/6.26.0/xmrig_macos_arm64 (v6.26.0)
Installed: /usr/local/bin/tarish
Available configs:
- m1.json
- m1pro.json
- m2max.json
- m3.json
- m3max.json
- m3pro.json
- m4.json
- m4pro.json
- 5900x.json
- 7950x.json
- 9950x.json
- Binary:
/usr/local/bin/tarish - Data:
/usr/local/share/tarish/ - Configs:
/usr/local/share/tarish/configs/ - Logs:
/usr/local/share/tarish/log/ - Service:
- macOS:
/Library/LaunchDaemons/com.tarish.plist - Linux:
/etc/systemd/system/tarish.service
- macOS:
- Binary:
~/.local/bin/tarish - Data:
~/.local/share/tarish/ - Configs:
~/.local/share/tarish/configs/ - Logs:
~/.local/share/tarish/log/ - Service:
- macOS:
~/Library/LaunchAgents/com.tarish.plist - Linux: User must use system installation for auto-start
- macOS:
- Go 1.21 or later
# Clone repository
git clone https://github.com/yourusername/tarish.git
cd tarish
# Build for current platform
go build -o tarish
# Or use the build script
./build.sh# Build for Linux AMD64
GOOS=linux GOARCH=amd64 go build -o tarish_linux_amd64
# Build for macOS ARM64 (Apple Silicon)
GOOS=darwin GOARCH=arm64 go build -o tarish_macos_arm64
# Build for Linux ARM64
GOOS=linux GOARCH=arm64 go build -o tarish_linux_arm64build.sh writes the client-facing release assets to dist/ and version. Use deploy.sh to sync only those release files instead of rsyncing the full repository.
# Build and deploy to the default NAS target
./deploy.sh
# Preview the rsync changes without uploading anything
./deploy.sh --dry-run
# Reuse existing dist/ and version without rebuilding
./deploy.sh --no-build
# Override the target for another host/path
./deploy.sh --target user@host:/path/to/tarishBy default deploy.sh syncs:
dist/with--deleteso stale binaries are removed remotelyversioninstall.sh
You can also override the default target with TARISH_DEPLOY_TARGET.
Use release.sh when you want a clean client-facing version instead of a -dirty development build.
./release.sh --version v1.0.7release.sh enforces:
- an explicit release version
- a clean git working tree
- build first, then deploy to the same release target
If the tree is dirty, the release is blocked until you commit or stash the changes.
- Check if tarish is installed:
which tarish - Check CPU detection:
tarish info - Verify config exists for your CPU
- Check logs:
cat /usr/local/share/tarish/log/xmrig.log
macOS:
# Check if caffeinate is running
ps aux | grep caffeinate
# Verify power assertions
pmset -g assertionsLinux:
# Check systemd-inhibit
systemd-inhibit --list
# If not available, install systemd
sudo apt install systemd # Debian/Ubuntu
sudo yum install systemd # RHEL/CentOSmacOS:
# Check service status
launchctl list | grep tarish
# Manually load service
sudo launchctl load -w /Library/LaunchDaemons/com.tarish.plistLinux:
# Check service status
sudo systemctl status tarish
# View logs
sudo journalctl -u tarish
# Manually enable
sudo systemctl enable tarish
sudo systemctl start tarish- Ensure tarish binary is executable:
chmod +x tarish - For system installation, use sudo:
sudo tarish install - Check log file permissions:
ls -l /usr/local/share/tarish/log/
tarish/
├── main.go # CLI entry point
├── cpu/ # CPU detection logic
│ └── detect.go
├── xmrig/ # XMRig process management
│ ├── binary.go # Binary path resolution
│ ├── config.go # Configuration selection
│ └── process.go # Process lifecycle
├── antisleep/ # Sleep prevention
│ ├── antisleep.go # Cross-platform implementation
│ └── README.md # Detailed documentation
├── service/ # Auto-start service
│ └── service.go
├── install/ # Installation logic
│ └── install.go
├── update/ # Self-update functionality
│ └── update.go
└── embedded/ # Embedded assets
└── assets.go
- No Network Access During Build: XMRig binaries are embedded in the repository
- PID Files: Process tracking uses PID files with appropriate permissions
- Log Files: Logs are world-readable but only writable by the process owner
- Service Installation: Requires sudo/root for system-level auto-start
- Sleep Prevention: Uses OS-native APIs, no privileged access required
Q: Is this mining software legal? A: Yes, cryptocurrency mining is legal in most jurisdictions when done on your own hardware. Always check local regulations.
Q: Will this damage my computer? A: No. XMRig is designed to use CPU resources safely. However, extended high-load operation may increase wear on cooling systems.
Q: Can I use this on a laptop? A: Yes, but be aware of increased heat generation and battery drain. Sleep prevention works on AC power but may be limited on battery.
Q: How do I change the mining pool or wallet?
A: Edit the config file in /usr/local/share/tarish/configs/ and restart mining.
Q: Does this support GPU mining? A: No, Tarish only supports CPU mining via XMRig.
Q: Why is donate level 0%? A: This is a donate-free fork of XMRig. We believe in giving miners full control of their hashrate.
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project uses XMRig which is licensed under GPL-3.0. See XMRig's license for details.
- XMRig: The underlying mining software
- CPU Detection: Based on CPUID and system info APIs
- Sleep Prevention: Uses OS-native power management APIs
For issues, questions, or feature requests:
- Open an issue on GitHub
- Check existing documentation in the
/antisleep/directory - Review the troubleshooting section above
Happy Mining! 🚀