Skip to content

fix: correctly launch CLI #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ test = [
]

[project.scripts]
sqlspec = "sqlspec.cli:run_cli"
sqlspec = "sqlspec.__main__:run_cli"

[build-system]
build-backend = "hatchling.build"
Expand Down
12 changes: 12 additions & 0 deletions sqlspec/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from sqlspec.cli import add_migration_commands as build_cli_interface

__all__ = ("run_cli", )


def run_cli() -> None: # pragma: no cover
"""SQLSpec CLI"""
build_cli_interface()()


if __name__ == "__main__": # pragma: no cover
run_cli()
Loading