A shell in Logseq

What about having a shell integrated in Logseq?

Where you can define scripts (and import or share) for common operations, like find and remplace or check the logs or whatever you need that it’s not yet implemented…

That would be also useful for running git commands.

1 Like

You mean JavaScript REPL right? Otherwise it wouldn’t be possible to manipulate blocks, properties etc using Logseq API.

On the other hand a command line tool being able to manipulate Logseq entities without even the need to run Logseq would be nice (we already have logseq-query to search for blocks/pages¹).

1: GitHub - cldwalker/logseq-query

1 Like

Well, not exactly. I was thinking something like a Python console, witch interpreter was loaded at the beginning and was ready to accept commands at the prompt
>>> in some window inside Logseq.

So, when you say it wouldn’t be possible, what do you mean? That the current API would need to be extended or you mean that this types of operations need a deeper layer interaction?

On the other hand a command line tool being able to manipulate Logseq entities without even the need to run Logseq would be nice (we already have logseq-query to search for blocks/pages¹).

1: GitHub - cldwalker/logseq-query

Interesting, thanks.

That the definition of REPL :wink:

Yes, Logseq has a JavaScript API so that plugins can manipulate Logseq entities like blocks, properties keys and values and so on.

I get that you want a console integrated in Logseq, maybe that is aware of which one is the current page… I’m saying a first step would be CLI utilities (like logseq-query) we can run from terminal emulators including the one embedded in VS Code and later eventually add ones in Logseq window.