I want to revive this old prototype I built - <Cod...
# share-your-work
r
I want to revive this old prototype I built - Codeline. It's a tool that lets you run commands from your source code comments. Anyone interested in helping? Some ideas: 1. Build a LSP server that can detect appropriate comments and run the commands/add CodeLens context/other stuff 2. Finish off the SDK so people can build new commands 3. Modernise the tooling (
poetry
->
uv
,
make
->
just
etc) 4. Build a few commands 5. Design a way to decouple commands from the codebase, so they can be installed independently. 6. Use treesitter to find relevant comments 7. Permission system for risky actions (e.g.
rm
) 8. ...
The general goal is to build a system that makes source code comments more interactive, in a safe and secure way. Alternatively, it could be seen as an editor-agnostic plugin system.
I've also got another one related to making comments more useful: anot. It just extracts structured data from comments. Intended to be a building block for other tools (incl. codeline, probably).
b
Interesting. Go has a system of
// go:generate
comments which works quite well, for its goals: https://go.googlesource.com/proposal/+/refs/heads/master/design/go-generate.md I think they approached this from an artifact angle of "this is where we want the command to be preserved for future", while you focus more on in-the-moment angle of "do things without leaving editor"?
r
Oh cool, glad to see other examples. Yes that summary is correct, but it's also "do things that require local code context". E.g. some plugins might pull in +/- 10 lines of code around the comment and use that in their functionality.