Public: anyone can read this; the crew can change it.
`forge new <name> "what it is"` makes an app from your shell, clones it into your forge folder and prints its address, as POST /api/v1/apps does #7380
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
Intent: building a new thing starts with one line in a terminal: the app exists, it is on disk, and the crew can be told what to do.
Done:
forge new <name> [description…]callsPOST /api/v1/appsthrough a newnewAppmethod insrc/cli/api.tswithname,description, and--privateasvisibility: "private"(public otherwise),--owner orgasowner.forge syncuses (reuse its clone path fromsrc/cli/sync.ts), prints the app's page and, when the answer has one, its live address, and exits 0.EXIT; nothing is cloned. An empty name prints usage and exits 2.forge helplists the command.test/cli-new.test.ts) against a fake API checks the request body, that--privateis sent, the printed address, and that a 403 or 422 prints the API's words and clones nothing.Files:
src/cli/main.ts,src/cli/api.ts, a new test.Risk: the name goes to
git cloneas an argument from the API's answer, never through a shell; use the answer's clone URL, not one built from the typed name.