jesseduffield / jesseduffield/lazygit

Consider making lazygit scriptable with an internal API

Open
#4,753 0 comments 7 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
82.4k
Forks
3k
Avg merge
2d 18h
Merged PRs (30d)
19

Description

Lazygit can be customized by defining custom commands, but all these can do is launch external programs or scripts.

It would be nice if custom commands could trigger scripts (probably in Lua) that have access to an internal API so that they can trigger things in lazygit. Examples for such things are
- focus a view
- select an item
- invoke a command
- switch to another repo
- change the value of a user config

Providing Lua bindings seems possible using either https://github.com/Shopify/go-lua or https://github.com/yuin/gopher-lua.

This is probably a huge task, there are tons of questions to be answered, and I'm not planning to work on this any time soon. Just putting this here so that we can link to it from other issues, for which this could be a solution.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.