huak icon indicating copy to clipboard operation
huak copied to clipboard

Use metadata in huak run command to run project.scripts: huak run temp-app

Open balarajuyogesh opened this issue 1 year ago • 2 comments

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "temp-app"
version = "0.0.1"
description = ""
dependencies = []

[project.scripts]
temp-app = "temp_app.main:main"

balarajuyogesh avatar May 19 '23 02:05 balarajuyogesh

As a note to myself, I may implement this with a [huak.alias] section.

cnpryer avatar Oct 10 '23 00:10 cnpryer

So, to elaborate, the idea would be cover both the desired behavior provided in this issue's description and other commands as well. Maybe something like

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "temp-app"
version = "0.0.1"
description = ""
dependencies = []

[project.scripts]
temp-app = "temp_app.main:main"

[huak.alias]
run = "temp-app"
simple_command = "my command"
complex_command = { cmd = ["my", "command"], env = { MY_VARIABLE = "some value" } }

cnpryer avatar Oct 10 '23 00:10 cnpryer