nat-n / poethepoet

A task runner that works well with poetry.
https://poethepoet.natn.io/
MIT License
1.39k stars 56 forks source link

Wrap poetry #208

Closed luckydonald closed 4 months ago

luckydonald commented 5 months ago

So the initial idea of poe was to extend poetry to have the poetry run command.

(However poetry run does something else.)

Now this tool tries to give this missing run command, but introduces a new command instead of extending poetry.

What I propose is a mode (e.g. configured through the toml) which wraps poetry to have it a single executable to remember.

nat-n commented 4 months ago

Hi @luckydonald, thanks for the idea. I guess what you mean is that the poe CLI would by default behave like an alias for the poetry CLI, but if you define poe tasks then they're added to the tasks available in poetry?

This sounds almost like what you get if you install the poethepoet poetry plugin and configure tool.poe.poetry_command = "". In this configuration poe tasks are added directly to the poetry CLI. Have you tried that?

luckydonald commented 4 months ago

Ah, I tried installing the poetry as plugin and that didn't quite work, I skipped that part because it was so confusing, and seemed like an extra, and I didn't understand how it would work like you just explained. Though I was searching for that. Especially as I came from a stack overflow page where you advertised your plugin as a solution.

luckydonald commented 4 months ago

Whatever tool.poe.poetry_command is set to must not already exist as a poetry command!

What would happen then? That kinda scared me off, too.