Skip to content

chore(luarocks): add rockspec to publish/install with luarocks#2607

Merged
olimorris merged 3 commits into
olimorris:mainfrom
GuillaumeDesforges:main
Mar 29, 2026
Merged

chore(luarocks): add rockspec to publish/install with luarocks#2607
olimorris merged 3 commits into
olimorris:mainfrom
GuillaumeDesforges:main

Conversation

@GuillaumeDesforges

Copy link
Copy Markdown
Contributor

Description

Allow installation of codecompanion.nvim with luarocks (https://luarocks.org/).

  • Added a rockspec file to publish on luarocks.

Having this file does not, in itself, allow users to install via luarocks; it must be uploaded to https://luarocks.org/.
Since I needed to install it, I have gone and pushed this version to https://luarocks.org/modules/gdfrj/codecompanion.nvim; I can transfer ownership if you'd like to publish yourself (e.g. in the CI). Otherwise I can happily do it by hand when notified (ping me via GitHub or email).

Checklist

  • I've read the contributing guidelines and have adhered to them in this PR

Well, I have not opened a discussion before. If you don't care you may just close the PR I wan't take it personally. :)

  • I've run make all to ensure docs are generated, tests pass and StyLua has formatted my code

Not needed here though

  • (optional) I've added test coverage for this fix/feature
  • (optional) I've updated the README and/or relevant docs pages

... and wishing you a happy New Year!

@olimorris olimorris added the P3 Low impact, low urgency label Dec 31, 2025
@olimorris

Copy link
Copy Markdown
Owner

Hey @GuillaumeDesforges thanks for this PR. Absolutely awesome idea and one that I think is worthwhile pursuing.

My immediate thought is...how can we automate this? I think it would be cool to add a release workflow like I have with a Ruby gem so that we're always keeping it up to date.

Potentially we should do the same with the rockspec too? A simple lua script to traverse the CodeCompanion directory and create a rockspec file on our behalf.

@github-actions

github-actions Bot commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the Stale label Feb 2, 2026
@GuillaumeDesforges

Copy link
Copy Markdown
Contributor Author

Automation would be the best indeed. I'll look into it, though time is a scarce resource ;) if anyone wants to jump on this please do!

@GuillaumeDesforges GuillaumeDesforges force-pushed the main branch 2 times, most recently from 21ee3f1 to d33e801 Compare February 14, 2026 11:47
@github-actions github-actions Bot removed the Stale label Feb 16, 2026
@olimorris

Copy link
Copy Markdown
Owner

@GuillaumeDesforges - I came across this GitHub workflow that could automatically publish the release to LuaRocks.

@github-actions

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the Stale label Mar 23, 2026
@GuillaumeDesforges

Copy link
Copy Markdown
Contributor Author

@olimorris done, it successfully pushed https://luarocks.org/modules/gdfrj/codecompanion.nvim/scm-1

@olimorris

Copy link
Copy Markdown
Owner

@GuillaumeDesforges you are a hero!!

In terms of next steps, presume I register on LuaRocks and get an API key etc?

@GuillaumeDesforges

Copy link
Copy Markdown
Contributor Author

Exactly, it's pretty straightforward. Once you have an account I'll just free my entry on the luarocks repository so you can create it. Hopefully it should work?

The GA job expects a LUAROCKS_API_KEY secret defined in your GitHub repository.

@olimorris olimorris removed the Stale label Mar 29, 2026
@olimorris

Copy link
Copy Markdown
Owner

Amazing. Thanks so much for your work on this.

I've tied in the LuaRocks upload to my release mechanism so hopefully it will upload when I next do a release.

@olimorris olimorris merged commit 3921573 into olimorris:main Mar 29, 2026
4 of 5 checks passed
@GuillaumeDesforges

Copy link
Copy Markdown
Contributor Author

Did you set a LUAROCKS_API_KEY? Do you have a LuaRocks account?

I can delete the luarocks repo so you can re-create it and be its owner.

@olimorris

Copy link
Copy Markdown
Owner

I sure do: https://luarocks.org/modules/olimorris

@GuillaumeDesforges

Copy link
Copy Markdown
Contributor Author

Great! I have deleted the package I had created.

I can't see your own module when I search https://luarocks.org/search?q=codecompanion.nvim

it is now shown only when searching non root https://luarocks.org/search?q=codecompanion.nvim&non_root=on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low impact, low urgency

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants