Create a project from rails console

I am working on automation for our self-hosted setup and struggling to find any instructions on how to create a project in the rails console. Using direct Project.new creates an empty non initialized repository. Is there a way to initialize it with a readme like in the API call?