| Crates.io | lacy |
| lib.rs | lacy |
| version | 0.5.0 |
| created_at | 2024-11-12 20:08:42.252664+00 |
| updated_at | 2025-09-15 12:36:18.190941+00 |
| description | Fast magical cd alternative for lazy terminal navigators |
| homepage | https://github.com/timothebot/lacy |
| repository | https://github.com/timothebot/lacy |
| max_upload_size | |
| id | 1445470 |
| size | 1,482,817 |
# Instead of 'cd Desktop/projects/lacy/src'
y desk prj lacy src
# or
y - - layc src
# or
y Desktop/prj layc sc
You don't have to type the full directory name. Just make sure the path matches the directory name more or less.
# normal cd
cd /Users/timothebot/projects/lacy/src
# with lacy
y / user timo prj lacy sr
# or
y / usrs timbo rojt layc rc
Forgot the directory name? No problem. Just skip it using -.
y / user timo - lacy sr
# as long as some parts are still unique, it will work
# ...and it's very fast
y / - - - lacy sr
Everything you can do with cd, you can do with y.
y /Users/timo/Projects/Lacy/src
y ~
y ..
You can also add real paths while lazy navigating.
y /Users/timo/ desk proj lacy/src
cargo install lacy
brew install timothebot/tap/lacy
There are a couple of ways to get lacy up and running on your Nix system. Both methods require adding lacy to your flake.nix inputs.
# flake.nix
{
inputs = {
lacy.url = "github:timothebot/lacy";
# ... other inputs
};
outputs = { self, nixpkgs, lacy, ... }@inputs: {
# ...
};
}
This is the easiest way to manage lacy if you're using Home Manager. The module handles most of the setup for you. You must explicitly add the lacy flake as an overlay to your configuration to ensure the lacy package is available.
# home.nix
{ pkgs, inputs, ... }: {
# Explicitly add the overlay to make lacy visible in your pkgs set
nixpkgs.overlays = [ inputs.lacy.overlays.default ];
imports = [
inputs.lacy.homeManagerModules.default
];
programs.lacy.enable = true;
}
If you prefer to manage packages directly without using the Home Manager module, this is the way to go. You apply the overlay and then add the lacy package to your system or user packages.
For NixOS:
# In your NixOS configuration (e.g., /etc/nixos/configuration.nix)
{ pkgs, inputs, ... }: {
nixpkgs.overlays = [ inputs.lacy.overlays.default ];
environment.systemPackages = [ pkgs.lacy ];
}
For Home Manager:
# In your home-manager configuration (e.g., ~/.config/nixpkgs/home.nix)
{ pkgs, inputs, ... }: {
nixpkgs.overlays = [ inputs.lacy.overlays.default ];
home.packages = [ pkgs.lacy ];
}
lacy directlyJust want to try it out? You can run lacy from the command line without adding it to your system configuration.
nix run github:timothebot/lacy
For more shell options, see lacy init --help.
# ~/.zshrc
eval "$(lacy init zsh)"
# ~/.bashrc
eval "$(lacy init bash)"
# ~/.config/fish/config.fish
lacy init fish | source
Feel free to contribute the init script for your preferred shell.
It is needed because you can't change the directory without using cd. So the shell script just executes cd if needed.
Yes. And no. Completions break, if you have a lot of similar named directories.
project_server/
project_web/
project_types/
For example, in this structure, you can just type y web instead.
z/zoxide?z is a great tool, but if you are working with a lot of projects with similar paths, it can be a pain to navigate. z also needs to learn first, while lacy can be used on systems you (or lacy) never touched before.
You can use z alongside lacy.
z/zoxide?If you have cd aliased to z, then it should work as long as the Lacy shell eval is below the z eval.
If not, run lacy init <shell> and manually add the result to your shell config. Then, replace the cd's with z.
Feel free to open an issue, contact me on discord (@tiimo, DM me, don't send friend requests).
Feel free to open a PR for any type of changes!
The code in this repository was written by hand. AI was used for the different shell configurations and helped with the Github actions.
Built with <3 by timothebot