From 3ed2da23bef7c332bd505a2810f8579cd18a1cd9 Mon Sep 17 00:00:00 2001 From: Bruno Postle Date: Fri, 20 Feb 2026 22:22:29 +0000 Subject: [PATCH] Create missing CLI tools Actually create the ifcquery, ifcedit and ifcmcp executables on pip install instead of relying on `python3 -m ifcquery` style usage --- src/ifcedit/pyproject.toml | 3 +++ src/ifcmcp/ifcmcp/__main__.py | 10 ++++++++-- src/ifcmcp/pyproject.toml | 3 +++ src/ifcquery/pyproject.toml | 3 +++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/ifcedit/pyproject.toml b/src/ifcedit/pyproject.toml index 411c0a95c8..c125bf3163 100644 --- a/src/ifcedit/pyproject.toml +++ b/src/ifcedit/pyproject.toml @@ -17,6 +17,9 @@ classifiers = [ ] dependencies = ["ifcopenshell"] +[project.scripts] +ifcedit = "ifcedit.__main__:main" + [project.urls] Homepage = "http://ifcopenshell.org" Documentation = "https://docs.ifcopenshell.org" diff --git a/src/ifcmcp/ifcmcp/__main__.py b/src/ifcmcp/ifcmcp/__main__.py index e4990aaf95..834fdd3dc8 100644 --- a/src/ifcmcp/ifcmcp/__main__.py +++ b/src/ifcmcp/ifcmcp/__main__.py @@ -1,5 +1,11 @@ # ifc_cli/src/ifcmcp/ifcmcp/__main__.py from ifcmcp.server import build_server -server = build_server() -server.run(transport="stdio") \ No newline at end of file + +def main(): + server = build_server() + server.run(transport="stdio") + + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/src/ifcmcp/pyproject.toml b/src/ifcmcp/pyproject.toml index 07366056d1..31e5a17408 100644 --- a/src/ifcmcp/pyproject.toml +++ b/src/ifcmcp/pyproject.toml @@ -19,6 +19,9 @@ dependencies = ["ifcopenshell", "ifcquery", "ifcedit"] [project.optional-dependencies] mcp = ["mcp"] +[project.scripts] +ifcmcp = "ifcmcp.__main__:main" + [project.urls] Homepage = "http://ifcopenshell.org" Documentation = "https://docs.ifcopenshell.org" diff --git a/src/ifcquery/pyproject.toml b/src/ifcquery/pyproject.toml index c8c7d6feac..3c8e734474 100644 --- a/src/ifcquery/pyproject.toml +++ b/src/ifcquery/pyproject.toml @@ -17,6 +17,9 @@ classifiers = [ ] dependencies = ["ifcopenshell"] +[project.scripts] +ifcquery = "ifcquery.__main__:main" + [project.urls] Homepage = "http://ifcopenshell.org" Documentation = "https://docs.ifcopenshell.org"