# z.lua

> A faster cd that learns which directories you use and jumps to them from a few letters.

Source: https://talira.ai/catalog/z-lua-sx2n9rnn
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool
- Categories: [developer tools / terminal / shell](https://talira.ai/categories/developer-tools/terminal/shell)
- Platforms: linux, macos, windows[^1]
- Licence: MIT[^2]
- Pricing: Free and open source[^2]
- Pricing notes: MIT.
- Free tier: yes[^2]
- Self-hostable: yes[^1]
- Creator: Linwei (skywind3000)

z.lua tracks the directories you visit and ranks them by frecency (how often and how recently), so `z foo bar` takes you to the best match for every word you type, in order. It can pick the highest-ranked or most recent match, limit matches to below the current directory, list matches, let you choose interactively or through fzf, and jump back to a parent directory or the project root without typing `cd ../../..`. It's a single Lua script for bash, zsh, dash, ksh, busybox and other POSIX shells, Fish, Nushell, PowerShell and Windows cmd through clink, and it says it's 10 times faster than fasd and autojump and 3 times faster than z.sh, with an optional native module in C. Similar to [zoxide](https://talira.ai/catalog/zoxide-pznserhn.md).

## Links

- GitHub: https://github.com/skywind3000/z.lua

## Problems it solves

- jump to a directory I use often without typing its full path
- cd ../../.. to get back to the project root is tedious
- autojump makes my shell slow to start
- a z.sh replacement that works on Windows and PowerShell
- pick from matching directories with fzf before changing directory
- smarter cd that learns my habits

## Features

- frecency ranking of visited directories
- match all given words or regexes in order
- rank-only or recency-only matching
- restrict to subdirectories of the current directory
- interactive selection and fzf integration
- jump back to a parent or the project root
- optional enhanced matching
- excluded directories and aging threshold
- bash, zsh, POSIX shells, Fish, Nushell, PowerShell and Windows cmd
- optional native module in C

## Limitations

- Needs Lua 5.1 or later, or LuaJIT, installed.[^1]

## Capabilities

- Has a command line tool: plan not known

## Trust

Overall: 0.28 out of 1.
Signals: backing 0.20, extensibility 0.20.

- created by Linwei (skywind3000)

Warnings:

- GitHub activity not fetched yet

## Alternatives

- [zoxide](https://talira.ai/catalog/zoxide-pznserhn.md): A smarter cd command. Supports all major shells.

## Sources

[^1]: https://github.com/skywind3000/z.lua (checked 22 Nov 2026)
[^2]: https://github.com/skywind3000/z.lua/blob/master/LICENSE (checked 22 Nov 2026)
