Infer package name if inside a package for the home cmd

No tests as there currently are non for commands and not sure how it should be.