Replace glossary keywords in LyX text with nomenclature commands.
pip install https://github.com/ykgmfq/glo2lyx/archive/refs/tags/v1.zip
An example glossary looks like this:
\usepackage[automake]{glossaries-extra}
\renewcommand{\nomenclature}[2]{\gls{#1}}
\makeglossaries
\newabbreviation{api}{API}{Application Programming Interface}
Include this file in your LyX document preamble. Then you can use your abbreviation in the LyX editor with plain text:
We use an api for this task.
#api development is tedious.
Surround your abbreviation with spaces or lead with #
.
After running glo2lyx
the abbreviation will be properly added to your document!