fzf-gnat
Search Ada source trees by unit name, file name, or declaration with fzf.
Find Ada.Strings.Unbounded even when GNAT names its source file a-strunb.ads.
Preview the source, then open your selection in $EDITOR.
Examples
Run these commands from an Ada source tree, or append the directory you want to search.
Find a unit by its Ada name
You know the unit is Ada.Strings.Unbounded, but its file is named a-strunb.ads:
fzf-gnat -q Ada.Strings.Unbounded
The list shows the unit name beside the file name, so either spelling works:
fzf-gnat -q strunb
Find a declaration without knowing its file
Search for Append in package specs:
fzf-gnat -ss -q Ada.Strings.Unbounded.Append
Preview each declaration, then press Enter to open it in your editor.
The editor starts at the declaration when it supports line arguments.
Use -s instead of -ss to include declarations in package bodies.
Find local declarations
Include local variables and nested subprograms when searching for a name such as Count:
fzf-gnat -sa -q Count
Search another source tree
Pass a directory to search without changing your working directory:
fzf-gnat -ss -q Ada.Strings.Unbounded.Append ~/work/toolchain/gnat
Install
Requires Python 3.10 or later and fzf on your PATH.
On Debian or Ubuntu, install fzf with:
sudo apt install fzf
After the first PyPI release, install with pip:
pip install fzf-gnat
Or use pipx:
pipx install fzf-gnat
For a local checkout, use pip install . or pipx install ..
Install bat for syntax highlighting in the preview. Without it, the preview uses cat.
Search files
fzf-gnat ~/work/toolchain/gnat
Each row shows the file name, its kind (spec, body, or subunit), the unit name, and the path.
Search any field, for example strunb or Strings.Unb.
Press Enter to open a file in $EDITOR. The default editor is vi.
Press Tab to select several files.
The first run parses the source tree with tree-sitter-ada.
Later runs parse only files that changed.
Use --rebuild to parse everything again.
Use --print to print the index without fzf.
Use -v to show warnings.
A file that contains only pragma No_Body; has no unit and shows as ?.
Search declarations
fzf-gnat -s ~/work/toolchain/gnat
fzf-gnat -ss ~/work/toolchain/gnat
fzf-gnat -sa ~/work/toolchain/gnat
-ssearches package-level declarations in specs and bodies.-sssearches package-level declarations in specs only.-sasearches every declaration, including local declarations.
Each row shows the qualified name, kind, unit, and file.
Press Enter to open the editor at the declaration when the editor supports line arguments.
Use -q TEXT to start fzf with an initial query.
Development
python3 -m venv .venv
.venv/bin/python -m pip install -e '.[dev,release]'
.venv/bin/python -m pytest
.venv/bin/python -m build
.venv/bin/python -m twine check --strict dist/*.whl dist/*.tar.gz
The build produces a source archive and a wheel in dist/.
Publish to PyPI
The GitHub Actions workflow .github/workflows/publish.yml tests pushes and pull requests on Python 3.10, 3.12, and 3.14.
It builds and checks both distributions after the tests pass.
It tests the installed wheel and checks installation with pipx before publication.
A manual workflow run builds artifacts without publishing.
A published GitHub release publishes to PyPI unless GitHub marks it as a prerelease.
Before the first release:
- Host this repository on GitHub.
- Sign in to the PyPI account associated with
zakaria1193@gmail.com. - Register a pending trusted publisher for
fzf-gnaton PyPI. - Enter the GitHub owner, repository name, workflow filename
publish.yml, and environment namepypi. - Create the
pypienvironment in the GitHub repository.
See the PyPI trusted publisher instructions. This method does not require a stored PyPI API token. The author email in the package metadata does not authenticate uploads.
For each release, update version in pyproject.toml and publish a matching GitHub release.
For version 0.1.0, use the tag v0.1.0.
PyPI does not permit replacement of an existing release file.
Metadata
Release files for fzf-gnat 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| fzf_gnat-0.1.1.tar.gz | 20.3 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fzf_gnat-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.7 kB
Release files / fzf_gnat-0.1.1.tar.gz
| Download URL | fzf_gnat-0.1.1.tar.gz |
|---|---|
| Size | 20.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b5ca5b43adef0721468e7a829ad4742de004393b30bcc96bcbf7c77c6bd59c3b
|
|
BLAKE2b-256 checksum How to use checksums |
bddab5247d7d99b4c1f06b1be9e1065deee33c3a443847ba8ccf517fb6431387
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logRelease files / fzf_gnat-0.1.1-py3-none-any.whl
| Download URL | fzf_gnat-0.1.1-py3-none-any.whl |
|---|---|
| Size | 12.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
628eaa6ea68eb5178c6326f145c86f20f1bd5837eacac9b8c1d9d444a4128ccd
|
|
BLAKE2b-256 checksum How to use checksums |
00a4dd1aca453b5269ad2d27ede19f5d0c98ad32de7e3fa72a7b88abe63c2c02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logSecurity for fzf-gnat 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for fzf_gnat-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.