Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Command-Line Apps
  3. z.lua

z.lua

MITLuav1.8.25

A faster cd command that learns your directory habits using frecency for quick navigation across shells.

GitHubGitHub
3.1k stars148 forks0 contributors

What is z.lua?

z.lua is a command-line tool that accelerates filesystem navigation by tracking frequently and recently used directories. It uses a 'frecency' algorithm to predict where you want to go based on your habits, making directory switching much faster than traditional cd commands. It is a faster alternative to z.sh with support for Windows, POSIX shells, and various enhancements.

Target Audience

Command-line users across multiple shells (Bash, Zsh, Fish, PowerShell, Windows cmd) and operating systems who frequently navigate deep directory structures and want to optimize their workflow. It is particularly beneficial for developers, system administrators, and power users who work in terminal environments.

Value Proposition

Developers choose z.lua for its exceptional speed—up to 10x faster than similar tools like fasd and autojump—and its broad cross-shell compatibility. Its unique selling point includes an enhanced matching algorithm for more intuitive jumps, optional native C module for ultimate performance, and self-contained distribution as a single Lua script with no external dependencies.

Overview

:zap: A new cd command that helps you navigate faster by learning your habits.

Use Cases

Best For

  • Quickly jumping to frequently accessed project directories without typing full paths.
  • Navigating filesystems on resource-constrained devices like Raspberry Pi where performance is critical.
  • Users who work across multiple shells (e.g., Bash, Zsh, Fish, PowerShell) and need a consistent navigation tool.
  • Interactive directory selection with fzf integration for fuzzy matching and visual selection.
  • Rapidly moving to parent directories without manually typing 'cd ../../..' using backward jumping.
  • Maintaining a shared directory history across different shell sessions and after re-login.

Not Ideal For

  • Environments where Lua cannot be installed or is restricted (e.g., locked-down corporate systems)
  • Users who exclusively use unsupported shells like csh or tcsh, as noted in the 'Help' section
  • Scenarios with highly ephemeral directory structures where paths are rarely reused, minimizing frecency benefits
  • Teams seeking a zero-configuration tool that works immediately without shell initialization edits

Pros & Cons

Pros

Blazing Fast Performance

Benchmarks in the README show z.lua is 10x faster than fasd and autojump, with an optional C native module (czmod) reducing update time to 1.6ms for ultimate speed.

Broad Shell Compatibility

It works with Bash, Zsh, Fish, PowerShell, Windows cmd, and POSIX shells, ensuring consistent navigation across diverse environments, as detailed in the installation instructions.

Intelligent Path Matching

The enhanced matching algorithm prioritizes the last path segment for intuitive jumps, and interactive selection with -i or fzf integration allows for fuzzy matching, improving accuracy.

Self-Contained Distribution

Distributed as a single Lua script with no external dependencies, making it portable and easy to deploy, as emphasized in the features list.

Cons

Shell-Specific Configuration

Installation requires editing shell initialization files (e.g., .bashrc, .zshrc) for each shell, which can be complex and error-prone, especially for multi-shell setups.

Lua Dependency Overhead

Requires Lua to be installed; on systems like WSL-1, additional packages like lua-filesystem are needed, adding setup steps and potential compatibility issues.

Incomplete Feature Support

The 'Help' section notes missing features like csh/tcsh support and improved completion for all shells, relying on community contributions for gaps.

Path Management Complexity

Default path validation can slow down operations; users must set $_ZL_NO_CHECK or use --purge to clean invalid paths, introducing manual maintenance.

Open Source Alternative To

z.lua is an open-source alternative to the following products:

a
autojump
z
z.sh

z.sh is a shell script that provides directory jumping based on 'frecency' (frequency + recency) for faster navigation.

f
fasd

A command-line productivity booster that provides quick access to files and directories by tracking frecency (frequency + recency).

Frequently Asked Questions

Quick Stats

Stars3,140
Forks148
Contributors0
Open Issues71
Last commit4 months ago
CreatedSince 2018

Tags

#productivity#shell-navigation#shell-integration#zsh-plugin#z#fzf-integration#jump#cd#frecency#shell#fasd#bash#cross-platform#lua#command-line#directory-jumping#autojump-alternative#autojump#zsh

Built With

L
Lua

Included in

Shell36.8kCommand-Line Apps19.2kZSH Plugins17.6kTerminals Are Sexy12.9k
Auto-fetched 2 hours ago

Related Projects

fzffzf

:cherry_blossom: A command-line fuzzy finder

Stars81,940
Forks2,820
Last commit18 hours ago
ripgrepripgrep

ripgrep recursively searches directories for a regex pattern while respecting your gitignore

Stars66,470
Forks2,658
Last commit12 hours ago
tldrtldr

Collaborative cheatsheets for console commands 📚.

Stars63,195
Forks5,345
Last commit6 hours ago
zoxidezoxide

A smarter cd command. Supports all major shells.

Stars38,203
Forks853
Last commit3 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub