MCPcopy Index your code
hub / github.com/euank/pazi

github.com/euank/pazi @v0.5.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.5.0 ↗ · + Follow
197 symbols 426 edges 28 files 8 documented · 4%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

:zap: pazi :zap: — A fast autojump helper

What is pazi?

Pazi is an autojump utility. That is to say, pazi remembers visited directories in the past and makes it easier to get back to them. A typical use of pazi might look like the following:

user@host ~ $ cd go/src/k8s.io/kubernetes
user@host ~/go/src/k8s.io/kubernetes $ cd /usr/src/linux

# The primary way to interact with pazi is via the 'z', zap-to-directory, alias
user@host /usr/src/linux $ z kuber
user@host ~/go/src/k8s.io/kubernetes $ # pazi zapped to the best match for 'kuber' that it remembers having been in
user@host ~/go/src/k8s.io/kubernetes $ z linux
user@host /usr/src/linux $

# If multiple items match a query, they can be interactively chosen between with '-i':
user@host /usr/src/linux $ cd ~/dev/linux
user@host ~/dev/linux $ z -i linux
2   0.7200000000000001  /usr/src/linux
1   0.9200000000000002  /home/user/dev/linux
> 1

user@host ~/dev/linux

How do I install pazi?

First, you need to install the pazi binary somewhere in your $PATH.

Prebuilt binaries are available on the releases page.

If you have the rust toolchain installed, you may alternatively compile from this repository or run cargo install pazi.

After installing the pazi binary, add the following to your .zshrc or .bashrc:

if command -v pazi &>/dev/null; then
  eval "$(pazi init zsh)" # or 'bash'
fi

Note: The init should be added after autoload -Uz compinit; compinit; has been called since pazi init zsh initializes completion for the z command.

Or if you are a fish user, add the following to your config.fish

if command -v pazi >/dev/null
  status --is-interactive; and pazi init fish | source
end

Finally, re-launch the shell and start zapping around :)

Using pazi with fzf

Pazi may be used with "fuzzy finders" like fzf as described here.

What makes pazi different from X

There are several autojump utilities, including fasd (or a better maintained fork), z, and autojump.

This implementation aims to be faster than any of the others (in no small part due to being in Rust), and also safer than fasd and z which, being shell-parsers written entirely in shell, are tricky to get right.

It's worth specifically noting that zoxide is another autojumper written in Rust, which has comparable performance (better performance for some benchmarks currently!).

For a more complete list of other autojump programs, refer to the table here.

So, is it faster?

Pazi is faster than the other autojump implementations it has been benchmarked against, excluding zoxide. The results of these benchmarks are documented here.

Status

Pazi is currently a work-in-progress. It mostly works, but it's not ready for a 1.0 release yet.

The data-format is likely stable (or will be migrated automatically), so now's a fine time to try it... but it's quite possible there are bugs and rough edges. Please do file issues or PRs as appropriate!

License

GPLv3

Contributions

Welcome and encouraged; unfortunately, no contributing.md yet.

Extension points exported contracts — how you extend this code

Autojumper (Interface)
(no doc) [7 implementers]
tests/src/harness/autojumpers/mod.rs
Matcher (Interface)
(no doc) [4 implementers]
src/matcher.rs
Shell (Interface)
(no doc) [3 implementers]
src/shells/mod.rs

Core symbols most depended-on inside this repo

visit_dir
called by 30
tests/src/harness/mod.rs
len
called by 20
tests/src/harness/testshell/mod.rs
create_dir
called by 15
tests/src/harness/mod.rs
finish
called by 14
tests/src/harness/mod.rs
visit_with_time
called by 13
src/frecency.rs
timef
called by 10
src/frecency.rs
supported_shells
called by 10
tests/src/harness/autojumpers/z.rs
trim
called by 8
src/frecent_paths.rs

Shape

Method 104
Function 58
Class 28
Enum 4
Interface 3

Languages

Rust100%

Modules by API surface

tests/src/harness/testshell/mod.rs21 symbols
tests/src/integ.rs19 symbols
src/frecency.rs19 symbols
src/frecent_paths.rs16 symbols
src/main.rs15 symbols
tests/src/harness/mod.rs13 symbols
src/matcher.rs13 symbols
tests/src/harness/autojumpers/mod.rs7 symbols
tests/src/harness/autojumpers/autojump.rs7 symbols
tests/src/harness/autojumpers/zoxide.rs6 symbols
tests/src/harness/autojumpers/z.rs6 symbols
tests/src/harness/autojumpers/pazi.rs6 symbols

For agents

$ claude mcp add pazi \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page