Skip to main content
In Newly v2, at app.newly.app and in Newly for Mac, the agent writes your app’s code for you. This page explains where that code is kept, how versions are saved, and how the dev and main branches fit together.

Your project’s repository

Newly keeps each project’s code in a private repository that Newly hosts. You don’t get a direct git address for it. To get a copy of the code on your computer, use the newly CLI. See Get your code.

Versions are saved automatically

Every agent turn that changes files is saved as a new version. This happens whether or not the app built successfully after the change. Each saved version is attached to the message that started the turn. You’ll see Restore to here under that message, which takes the code back to that point. See Undo and Restore to here. There’s no separate version history screen. Your chat is the history.

Seeing the code

There’s no file browser or code editor in the app. To see what the agent changed:
  1. Find the agent’s reply in the chat.
  2. Expand one of its steps.
  3. A step that wrote or edited a file shows the code or a diff, with the file path at the top.
If you want to browse the whole project, download it with the newly CLI and open it in your own editor.

Branches: dev and main

Each project has two main branches:

Promote dev to main

When you’re happy with what’s on dev, copy it onto main. You can do this from the web app or the Mac app. People with Can view access can’t promote.
1

Open Settings

With the project open, open Settings and go to Project.
2

Find the production branch

Under Production branch, select Promote to main.
3

Confirm

Select Promote dev to main to copy everything on dev onto main.
If main has changes that aren’t on dev, Newly combines them first. A conflict stops the promotion. The web app and the Mac app word some results differently: In the web app, a conflict also lists the files involved. The Mac app shows the message only. Resolve the conflict in a chat in the project, then promote again.

Working in several chats at once

All chats in a project share the dev branch. When you send a message, the agent checks whether the project changed somewhere else since this chat last caught up. If it did, the agent holds your message and asks: “Your app changed somewhere else while you were working here. Combine the changes?”
  • Choose Yes to combine the other changes with this chat’s before your message runs.
  • Choose Not now to run your message without combining. The agent asks again on a later message.
If the changes edited the same part of the app and can’t be combined safely, your message doesn’t run and a Sync paused notice appears. Send another message telling the agent which change should win, or asking it to merge them by hand.
Restoring an earlier version in one chat changes dev for every chat in the project. If several people or chats are working at once, let them know before you restore.

Local chats on Mac

In Local chats (Mac): on a Newly project, the agent works in a copy of the code that Newly manages on your Mac. The app recreates that copy each time the chat starts or resumes, and saves each turn back to the project. Don’t edit files in that copy with your own editor, because your edits can be lost. To work in a folder you control and edit with your own tools, use Open Existing Project in the Mac app. In that case the saved versions are git commits inside your folder. See Local chats on your Mac.

Undo and Restore to here

Go back to an earlier version of your code.

Get your code

Download your project with the newly CLI.

Share a project

Work on a project with other people.

Projects, chats, Remote and Local

How your work is organized.