Skip to content

Scaffold Makefile invokes 'sm gen-pages' but that command doesn't exist in simple_module_cli #109

Description

@antosubash

Summary

The Makefile generated by sm new has:

gen-pages:
uv run sm gen-pages --host-dir=client_app

But simple_module_cli 0.0.6 ships only these top-level commands: new, package-update, create-host, create-module, skills. There is no gen-pages and no host subcommand. make dev (which depends on gen-pages) therefore aborts on a fresh scaffold:

$ make gen-pages
uv run sm gen-pages --host-dir=client_app
Usage: sm [OPTIONS] COMMAND [ARGS]...
Try 'sm --help' for help.
╭─ Error ─────────────────────────────────────────────╮
│ No such command 'gen-pages'. │
╰─────────────────────────────────────────────────────╯

(Other tries: uvx --from simple_module_cli sm gen-pages and uv run sm host gen-pages both fail the same way — there is no host subcommand.)

Where the command actually lives

simple_module_hosting/__main__.py exposes the Typer app — python -m simple_module_hosting gen-pages --host-dir=client_app works:

$ uv run python -m simple_module_hosting gen-pages --host-dir=client_app
INFO: Discovered module: Permissions (v1.0.0)
INFO: Discovered module: Users (v1.0.0)
INFO: Discovered module: Settings (v1.0.0)
INFO: Discovered module: Auth (v1.0.0)
INFO: Discovered module: Dashboard (v1.0.0)
INFO: Wrote module pages manifest: ...

The package metadata (simple_module_hosting-0.0.6.dist-info/METADATA) also documents the command as sm host gen-pages, suggesting the intent is for simple_module_cli to dispatch into the hosting package.

Suggested fix

Either:

  1. Have simple_module_cli register a host subcommand group that proxies to simple_module_hosting's Typer app (matching the documented invocation sm host gen-pages). This requires simple_module_cli to depend on simple_module_hosting or to discover it via entry points.
  2. Update the scaffold Makefile to call python -m simple_module_hosting gen-pages (which works today against the published packages).

(2) is the trivial unblock; (1) is the right long-term fix and would let the README's sm host gen-pages examples work.

Source references

  • simple_module_hosting/__main__.py:5 — references "gen-pages"
  • simple_module_hosting/host_cli.py:30@app.command(\"gen-pages\")
  • simple_module_hosting/manifest.py:29,38 — generated files include // Regenerate with: sm gen-pages (would also need updating with whichever invocation lands)
  • simple_module_cli 0.0.6 — no host subcommand registered

Workaround

In the generated Makefile:

 gen-pages:
-	uv run sm gen-pages --host-dir=client_app+	uv run python -m simple_module_hosting gen-pages --host-dir=client_app

Environment

  • simple_module_cli, simple_module_hosting 0.0.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions