zoxide: أداة التنقل الذكية التي غيّرت حياتي في Terminal
أغلب المشاكل التي تواجه مستخدمي linux خاصة المستخدمين الجدد و هي مسألة التنقل بين ملفات و مجلدات النظام و أنا أيضا لا أنكر أنني كنت أنزعج من ذلك في البداية (مع انني صرت استمتع بذلك الآن) و اليوم أحببت أن اقدم أداة اكتشفتها مؤخرا و أرى أنها ستكون ذات فائدة عظيمة و هي أداة تحمل اسم zoxide فمنذ معرفتي لها لم أعد أحتاج لاستخدام cd أو ls بشكل تقليدي. هذه الأداة الذكية أحدثت ثورة في طريقة التنقل بين المجلدات وحولت Terminal من أداة مملة إلى بيئة عمل ديناميكية وسريعة[1][2].
ما هو zoxide؟
zoxide هو بديل ذكي لأمر cd التقليدي[3][4] مستوحى من أدوات z و autojump[3]. يتذكر المجلدات التي تزورها بشكل متكرر ويستخدم خوارزمية تصنيف ذكية للانتقال إلى أفضل تطابق بضغطات قليلة[2][5].
الفرق بين cd العادي و zoxide
باستخدام cd التقليدي:
cd ~/Documents/Projects/MyProject/src/components
cd ../../../AnotherProject/backend/api
cd ~/Documents/Projects/MyProject/src/components # كتابة الطريق كاملاً مرة أخرى
باستخدام zoxide:
z components # ينقلك مباشرة
z backend # انتقال فوري
z comp # يفهم أنك تقصد components
الميزات القوية
1. خوارزمية “Frecency” الذكية
يستخدم zoxide مفهوم “frecency” (تركيب من frequency + recency)[6][7] لتسجيل نقاط لكل مجلد:
- +4 نقاط للمجلدات المزارة خلال الساعة الأخيرة[6][7]
- +2 نقاط للمجلدات المزارة خلال اليوم الأخير[6][7]
- +0.5 نقطة للمجلدات المزارة خلال الأسبوع الأخير[6][7]
- +0.25 نقطة للمجلدات الأقدم[6][7]
2. البحث الضبابي (Fuzzy Matching)
- عدم حساسية للحروف الكبيرة/الصغيرة[6]:
z PROJECT=z project - مطابقة جزئية:
z docيجد~/Documents - ترتيب الكلمات مهم:
z foo barيجد مجلدات تحتوي foo ثم bar[6][7]
3. الوضع التفاعلي
zi project # يفتح قائمة تفاعلية مع fzf
يسمح لك باختيار المجلد المناسب من قائمة بواجهة جميلة[8][5].
4. التكامل مع الأدوات الأخرى
zoxide يتكامل مع أكثر من 25 أداة شهيرة[4]:
- محررات النصوص: vim, neovim, emacs
- مديري الملفات: ranger, lf, nnn, yazi
- أدوات أخرى: tmux, fzf, telescope.nvim
التثبيت السهل
عبر Package Managers
# Ubuntu/Debian
sudo apt install zoxide
# Arch Linux
sudo pacman -S zoxide
# macOS
brew install zoxide
# Fedora
sudo dnf install zoxide
# أو باستخدام Cargo
cargo install zoxide --locked
تثبيت سريع عبر Script
curl -sS https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | bash
إعداد Shell
للـ Bash:
echo 'eval "$(zoxide init bash)"' >> ~/.bashrc
للـ Zsh:
echo 'eval "$(zoxide init zsh)"' >> ~/.zshrc
للـ Fish:
echo 'zoxide init fish | source' >> ~/.config/fish/config.fish
أوامر أساسية
| الأمر | الوظيفة |
|---|---|
z foo |
انتقل لأعلى مجلد يحتوي “foo”[9] |
z foo bar |
ابحث عن مجلد يحتوي “foo” ثم “bar”[9] |
zi |
وضع تفاعلي مع fzf[9] |
z - |
العودة للمجلد السابق[9] |
z .. |
صعود مستوى واحد[9] |
zoxide query --list |
عرض جميع المجلدات المحفوظة[9] |
لماذا zoxide متفوق؟
الأداء الفائق
- مكتوب بـ Rust مما يجعله سريع البرق[3][10]
- أسرع بمراحل من البدائل مثل autojump و z.lua[11]
- استهلاك ذاكرة قليل ومُحسَّن للأداء[12]
مفتوح المصدر وموثوق
- رخصة MIT[4][10] - مفتوح المصدر بالكامل
- +27.6k نجمة على GitHub[4]
- 640+ مساهم[4] من المجتمع
- تطوير نشط مع إصدارات منتظمة[13]
دعم شامل للمنصات
يعمل على جميع المنصات الرئيسية[3]:
- Linux, macOS, Windows
- جميع الـ Shells الشهيرة: bash, zsh, fish, PowerShell, nushell
الأمان والخصوصية
حماية البيانات الحساسة
# استبعاد مجلدات خاصة من قاعدة البيانات
export _ZO_EXCLUDE_DIRS="$HOME:$HOME/private/*"
تحكم كامل في البيانات
- قاعدة بيانات محلية مخزنة في
~/.local/share/zoxide[14] - إمكانية حذف المجلدات:
zoxide remove path[9] - تحكم في العمر: متغير
_ZO_MAXAGEللتحكم في عدد الإدخالات[7]
نصائح الاستخدام المتقدم
1. استبدال cd بالكامل
eval "$(zoxide init bash --cmd cd)"
الآن cd يستخدم zoxide تلقائياً!
2. تخصيص fzf
export _ZO_FZF_OPTS="--preview 'ls -la {2..}'"
3. طباعة المسار قبل الانتقال
export _ZO_ECHO=1
المقارنة مع البدائل
| الأداة | النجوم | اللغة | الأداء | الميزات |
|---|---|---|---|---|
| zoxide | 27.6k[15] | Rust | ||
| z | 16.6k[15] | Shell | ||
| autojump | 15k+ | Python | ||
| fasd | 5k+ | Shell |
الخلاصة
zoxide ليس مجرد أداة - إنه ثورة في طريقة العمل. منذ استخدامه:
- وفرت ساعات من الكتابة المتكررة
- تحسنت إنتاجيتي بشكل ملحوظ
- أصبح Terminal بيئة عمل ممتعة
إذا كنت تعمل بـ Terminal بشكل منتظم، فـ zoxide أداة أساسية لا غنى عنها. جربه اليوم وستشعر بالفرق من أول استخدام!
روابط مفيدة:
مستودع GitHub[4]
دليل التثبيت الرسمي[3]
فيديوهات تعليمية[16]
هذه الأداة الرائعة طورها Ajeet D’Souza ومجتمع مفتوح المصدر نشط. شكراً لهم على هذا الإنجاز المذهل! ![]()
الاقتباسات و المراجع:
[1] How to install Zoxide on Linux - DEV Community How to install Zoxide on Linux - DEV Community
[2] Zoxide: The Smarter Way to Navigate Your Terminal - Bit Doze Zoxide: The Smarter Way to Navigate Your Terminal
[3] zoxide 0.9.8 zoxide 0.9.8 - Docs.rs
[4] ajeetdsouza/zoxide: A smarter cd command. Supports all major shells. GitHub - ajeetdsouza/zoxide: A smarter cd command. Supports all major shells.
[5] Zoxide https://christitus.com/zoxide/
[6] You might want to replace cd command with Zoxide
— a smarter and trainable cd alternative
You might want to replace cd command with Zoxide 🎉 — a smarter and trainable cd alternative 🗂️ - DEV Community
[7] Algorithm · ajeetdsouza/zoxide Wiki - GitHub Algorithm · ajeetdsouza/zoxide Wiki · GitHub
[8] Zoxide, A Smarter cd Command - Mark Skelton Mark Skelton
[9] zoxide: a smarter cd command | zoxide Commands | Man Pages zoxide: a smarter cd command | Man Page | Commands | zoxide | ManKier
[10] zoxide zoxide — Homebrew Formulae
[11] Differences between zoxide and z/z.lua? #149 - GitHub Differences between zoxide and z/z.lua? · ajeetdsouza/zoxide · Discussion #149 · GitHub
[12] Command Line – zoxide - » Linux Magazine Command Line – zoxide » Linux Magazine
[13] Releases · ajeetdsouza/zoxide - GitHub Releases · ajeetdsouza/zoxide · GitHub
[14] zoxide(1) zoxide(1) — Arch manual pages
[15] zoxide vs z - compare differences and reviews? | LibHunt zoxide vs z - compare differences and reviews? | LibHunt
[16] zoxide has forever improved the way I navigate in the terminal. https://www.youtube.com/watch?v=aghxkpyRVDY
[17] zoxide — better cd command | daily.dev daily.dev | Where developers grow together
[18] I love Zoxide : r/commandline - Reddit Reddit - The heart of the internet
[19] Say good bye to cd and hello Zoxide - the better and smarter cd command! Say good bye to cd and hello Zoxide - the better and smarter cd command! - DEV Community
[20] Best cd alternative commands for Linux users - CloudSpinx https://cloudspinx.com/best-cd-alternative-commands-for-linux-users/
[21] zoxide Alternatives and Similar Apps - AlternativeTo https://alternativeto.net/software/zoxide/
[22] zoxide 0.4.3 zoxide 0.4.3 - Docs.rs
[23] hpr3836 :: Using ‘zoxide’, an alternative to ‘cd’ - Hacker Public Radio Hacker Public Radio ~ The Technology Community Podcast
[24] Home · ajeetdsouza/zoxide Wiki - GitHub Home · ajeetdsouza/zoxide Wiki · GitHub
[25] zoxide: better cd : r/commandline - Reddit Reddit - The heart of the internet
[26] zoxide man | Linux Command Library zoxide man | Linux Command Library
[27] J’adore Zoxide : r/commandline - Reddit Reddit - قلب الإنترنت النابض
[28] You might want to replace cd command with Zoxide - DEV Community You might want to replace cd command with Zoxide 🎉 — a smarter and trainable cd alternative 🗂️ - DEV Community
[29] Mastering Efficient Filesystem Navigation with Zoxide - LinkedIn Mastering Efficient Filesystem Navigation with Zoxide: A Practical Guide and Command Showcase"
[30] [New]: sysutils/zoxide-v0.9.5 [New]: sysutils/zoxide-v0.9.5
[31] Zoxide Zoxide - Official NixOS Wiki
[32] zoxide 0.3.1 zoxide 0.3.1 - Docs.rs
[33] zoxide 0.8.1 zoxide 0.8.1 - Docs.rs
[34] zoxide/zoxide.plugin.zsh at main · ajeetdsouza/zoxide - GitHub zoxide/zoxide.plugin.zsh at main · ajeetdsouza/zoxide · GitHub
[35] Zoxide - Space Bums Zoxide | Space Bums
[36] Using zoxide - smarter cd command for Linux/macOS | ComputingForGeeks https://computingforgeeks.com/using-zoxide-smarter-cd-command-for-linux-macos/
[37] GitHub - conda-forge/zoxide-feedstock: A conda-smithy repository for zoxide. GitHub - conda-forge/zoxide-feedstock: A conda-smithy repository for zoxide.
[38] zoxide 安装与使用指南 https://blog.csdn.net/i89211/article/details/144258538
[39] How to Install and Use zoxide on Linux? - GeeksforGeeks How to Install and Use zoxide on Linux? - GeeksforGeeks
[40] Arch Linux Arch Linux - zoxide 0.9.8-2 (x86_64)
[41] zoxide - A faster alternative to boring cd command - DEV Community zoxide - A faster alternative to boring cd command - DEV Community
[42] ZFS RaidZ1: Bad performance in fio benchmark with 4MB blocksize ZFS RaidZ1: Bad performance in fio benchmark with 4MB blocksize - Linux - Level1Techs Forums
[43] zoxide — better cd command - YouTube https://www.youtube.com/watch?v=_tFuiIIADzg
[44] zk-Bench: A Toolset for Comparative Evaluation and Performance Benchmarking of SNARKs https://eprint.iacr.org/2023/1503.pdf
[45] zoxide-query: search for a directory in the database | zoxide Commands | Man Pages zoxide-query: search for a directory in the database | Man Page | Commands | zoxide | ManKier
[46] zoxide-query(1) - Arch Linux manual pages zoxide-query(1) — Arch manual pages
[47] Stop typing ‘cd’ to change directories - use this instead #coding https://www.youtube.com/watch?v=RAOz3CzC_vc
[48] zoxide v0.8.0, a smarter cd command for your terminal : r/rust - Reddit Reddit - The heart of the internet
[49] Introducing zoxide, a replacement for cd that learns your habits : r/rust Reddit - The heart of the internet
[50] THIS Tool CHANGED My Life! Zoxide on KALI Linux - YouTube https://www.youtube.com/watch?v=HNcQXe8NlL8