Bring the power of Linux's
freecommand to macOS with real-time visual memory monitoring
Ever missed the free command on macOS? Free-macOS brings it back—and makes it better. Monitor your system's memory in real-time with colorful progress bars and live statistics, right in your terminal.
macOS doesn't include the beloved free command that Linux users rely on. Free-macOS fills that gap and enhances it with:
- 📊 Visual Progress Bars - See memory usage at a glance with colorful indicators
- ⚡ Real-Time Updates - Live monitoring with customizable refresh intervals
- 🎨 Beautiful Output - Clean, formatted display with automatic unit conversion (B/KB/MB/GB)
- 🔧 Zero Configuration - Works out of the box with sensible defaults
- 🚀 Lightweight - Minimal resource footprint
| Feature | Description |
|---|---|
| Live Monitoring | Continuous memory status updates in your terminal |
| Progress Bars | Visual representation of memory usage (Used, Free, Active, Wired, Compressed) |
| Custom Intervals | Adjust refresh rate with --interval flag |
| Smart Formatting | Automatic unit conversion for readability |
| Easy Integration | Set up as a system-wide command with simple aliasing |
- macOS (10.14+)
- Python 3.8 or higher
- Poetry (for dependency management)
# 1. Clone the repository
git clone https://github.com/Danialsamadi/Free-macos.git
cd Free-macos
# 2. Install dependencies with Poetry
poetry install
# 3. Run the tool
poetry run free --interval 2That's it! You're now monitoring your system's memory.
Run with default settings (1-second refresh):
poetry run freeSet your preferred update frequency (in seconds):
poetry run free --interval 2 # Updates every 2 seconds
poetry run free --interval 0.5 # Updates every 500ms (fast)
poetry run free --interval 5 # Updates every 5 seconds (slow)Make free available system-wide by adding an alias to your shell configuration:
For Zsh (default on modern macOS):
# Add to ~/.zshrc
echo 'alias free="cd /path/to/Free-macos && poetry run free"' >> ~/.zshrc
source ~/.zshrcFor Bash:
# Add to ~/.bashrc or ~/.bash_profile
echo 'alias free="cd /path/to/Free-macos && poetry run free"' >> ~/.bashrc
source ~/.bashrc💡 Pro Tip: Replace
/path/to/Free-macoswith your actual project path. Usepwdin the project directory to get the full path.
Now run free from anywhere in your terminal! 🎉
Free-macOS displays the following memory metrics:
- Total - Total physical RAM installed
- Used - Memory currently in use by applications
- Free - Completely unused memory
- Active - Recently used memory that's still in RAM
- Wired - Memory required by the system (cannot be compressed or paged out)
- Compressed - Memory that's been compressed to save space
Progress bars show the percentage of each metric relative to total memory.
Free-macos/
├── free_macos/ # Main source code
│ ├── __init__.py
│ └── main.py # Core monitoring logic
├── pyproject.toml # Poetry configuration
├── poetry.lock # Locked dependencies
└── README.md
Want to enhance Free-macOS? Here are some ideas:
- Export metrics to CSV/JSON
- Add alerts for high memory usage
- Historical memory graphs
- Swap memory monitoring
- Process-level memory breakdown
Contributions are welcome! Whether it's bug fixes, new features, or documentation improvements:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Found a bug or have a feature request? Open an issue on GitHub.
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by the classic Linux
freecommand - Built for macOS users who miss their Linux tools
- Thanks to the Python and Poetry communities
Danial Samadi - @Danialsamadi
Project Link: https://github.com/Danialsamadi/Free-macos
⭐ If Free-macOS makes your life easier, give it a star!
