Re: Introducing lq ??? a CLI for LyX

Pavel Sanda <[email protected]> Mon, 25 May 2026 16:16:40 +0200
Newsgroups gmane.editors.lyx.devel
Message-ID <[email protected]>
On Sun, May 24, 2026 at 04:53:10PM +0800, Shifu Jiang wrote:
> I have been using LyX for academic writing for over a decade. I often wish
> I could get some help from AI in LyX so that I wouldn't spend all day
> polishing just a few paragraphs while not enjoying it at all.
> Recently, I built a CLI tool called *lq* to enable AI agents to edit .lyx
> files safely and easily. You can find it in this Github repo
> <https://github.com/naivej/lq>.
> I don't lack coding experience but admittedly I'm not a software engineer.
> So this tool is heavily "vibe coded". However, I did my best to stay
> involved in critical design decisions and ensure the code was of a high
> quality. It turned out to be a really enjoyable process, and I learnt a lot.

Dear Shifu, thanks for sharing. It's unfortunate I will not have time
to interact with you on this issue in the closest future, but
I'll keep this topic on my horizon. The way I see it is that in some way
the interaction between LyX and AI will land sooner or later.

I appreciate that you tried to actually check the correctness from
the POV of parse trees, so the chance of syntax breakage is smaller.

In long term though I think we need that some part of lyx codebase is
shared somehow with project like this so one doesn't need to rewrite
and test the pipeline for each major version of LyX when the fileformat
changes.

When sensing the current atmosphere in our dev community, I would
summarize that

1) we are not going to be vibe coding project any time soon - we are
   wary of the AI slop & longterm commitment of newcomers that are just
   some prompts away from getting something which "looks functional".
   Keeping in check large codebase by human hands is difficult with
   the volume produced by machines.

2) we don't take the copyright issues lightly. 
   E.g. you write Copyright (c) 2026 naivej, but can you claim it if it's
   written by AI? You gave it MIT license, but did you check it does not
   contain code with different license, as LLMs are known to memorize and
   re-produce the training material?

This is not to attack your project (and I get you were not asking to have
the code included) but it' useful to clarify our slow/hesitant reponses on 
this topic in general.


The compromise solution for future is perhaps 
1) to allow easy feedback loop on LyX side by some minimal API via lyxserver,
   which would give the AI machinery access to document internals/cursor/
   cut&paste/change tracking mechanisms so the interaction does not need
   to go through copy pasting and can be visible right away.

   E.g. we never had grammar check - having instantaneuous feedback with CT
   flagged changes would be easy if we set this machinery up. I would be
   personally happy if such tooling appears, but my free time does not
   permit to get involved ATM.

2) the ai tool will somehow have imported parsing from lyx so we don't
   have to worry about format changes and syntax correctness of the
   exchanged snippets. I tried to explain similar point with solo 
   projects that tried to directly parse .lyx files before. I was not
   heard and the projects with this approach are long dead/unmaintained
   even when they outperformed our internal feature(s). Maybe I will
   be heard this time, who knows ;)


Both these points would keep LyX codebase at reasonable distance from
the AI code and yet allow agentic tools cooperation anyway.


At the moment I would propose to create LyX & AI wiki page and list/link there
related topics and contributions, this is not the first one and I expect
new emails like this are coming.

If we get more trust/more experience with your or similar agentic tooling
public endorsement on main website or even announce seems appropriate...

Cheers, Pavel
-- 
lyx-devel mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-devel