How do I build my app with my own Claude Code?
Install the alori command, run alori dev to get your app on your computer, change it with Claude Code, and push it back as a new version.
You can change your app with your own Claude Code instead of the chat in Alori. The alori command brings your app's code to your computer and runs it there. You change it with Claude Code, then send it back. Alori builds it and saves it as a new version.
Alori has no AI in this path. Claude Code on your own computer does the changing.
Also called: Claude Code, CLI, command line, terminal, alori dev, pull, push, code export, git, merge, build with my own AI, développer avec Claude Code, ligne de commande
Before you start
You need Node 20 or newer and tar on your computer. Both are usually already there on a Mac or Linux.
You need Claude Code installed.
Your role in the app must be allowed to build it. If it isn't, ask an admin to change your role. See How do I add someone to my team and choose their role?
Get your app, change it, push it back
Install the command, once. In your terminal, type:
npm install -g @alori/cliDownload your app, install it and run it on your computer, all in one command. Type:
alori devIf this computer isn't connected to your Alori account yet, your browser opens on an Allow screen first. Check what it says and allow it. When the page says "Connected. You can close this tab and go back to your terminal.", you're signed in.
Then the terminal shows "Packing your app's code" while Alori gets it ready, and "Pulled … version …". Alori puts your app in a new folder named after it, installs what it needs (this takes a minute the first time), and starts it. Your browser opens on your app at
http://localhost:5300, or the next free port.To choose the folder yourself, type
alori dev my-app. The folder must be new or empty.The app on your computer uses your app's real backend and data. Screens and text change as you save a file. A change in
convex/reaches the backend only when you push.The folder also holds a
CLAUDE.mdfile that tells Claude Code how it works.Leave
alori devrunning. It stops when you press Ctrl-C. Open a second terminal window, go into the folder and start Claude Code:cd my-app claudeThen describe the change in Claude Code, like "Add a pricing page with three plans". You see it change in your browser. Before you push, ask it to run
pnpm typecheckandpnpm lint.See what changed. Type:
alori statusEach file shows as changed, new or removed since your last pull or push.
Send your changes back with a short message. Type:
alori push -m "New pricing page"The terminal lists each file it sends, with its size. Then, for each build step, it shows the step while it works ("Checking the code…", "Deploying the backend…", "Updating the preview…"). When a step is done it shows a check mark and how long it took, like
✓ Checking the code (12s). At the end you see "Saved as version … in …. It's in the preview: publish it in Alori when you're ready.", with the total time of the push.Watch it in Alori. Your push shows in the workspace chat as a card with the build's progress and a Stop button. It shows in the chat of every project, not only the CRM's, so your teammates see it too. Click Stop to cancel the build: nothing is saved. See How do I stop a change?
Open your app in Alori and look at the preview. When it looks right, publish it. See How do I publish my changes to my team?
When someone else changed the app too
If your teammate or the Alori builder saved changes to the same files since your pull, alori push merges their changes with yours, line by line, the way git does. You don't have to do anything.
After the save, the terminal lists the merged files: "Someone else changed these files too. Their changes and yours were merged:".
Alori then brings the merged files and the other changes into your folder, so it holds what was just saved.
Only when you and someone else changed the same lines does the push stop. Nothing is saved. The terminal lists those files and pulls their version into your folder next to yours, as
<file>.alori-theirs. Merge the two, delete the.alori-theirsfiles, then push again. A push won't start while any.alori-theirsfile is left.
Your folder is a git repository
alori pull (and the first alori dev) turns your folder into a git repository. Each pull is one commit, made by Alori, named "Pulled version 12 from Alori". git log then shows Alori's changes apart from yours, and you can open the folder in GitHub Desktop or send it to your own GitHub.
Commit your own work as usual.
A push to GitHub changes nothing in your app. Only
alori pushdoes.If your folder has changes you haven't committed, a pull doesn't make its own commit, so your work never lands inside Alori's commit.
If your folder is already inside another git repository, Alori leaves git alone.
Good to know
Only the
src/andconvex/folders travel. The other files (likepackage.jsonandpublic/) belong to Alori's template. They don't go up with a push, so a change there never reaches your app.Some files inside those folders are Alori's too, like the shell, sign-in, booking and Team chat. They're in your folder so the code checks out, but a push with a change to one of them is refused and names the file. Put your change in your app's own files instead.
Your backend is live. A change in
convex/reaches your app's real data when you push, even before you publish. Never delete a table or a field that holds data.Never edit
convex/_generated/orsrc/routeTree.gen.ts. They are written by tools.Publish stays in Alori. A push never puts anything live by itself. Every push becomes a version you can go back to. See How do I go back to an earlier version?
Bring in new changes. To get what your teammate or the Alori builder saved since your pull, run
alori pullinside your folder. Your changes are kept, and files nobody else touched are updated.Your sign-in is kept on your computer in
~/.alori/credentials.json. To forget it, runalori logout.
All the commands
alori login: connects this computer to your Alori account.alori dev [folder]: downloads your app (if the folder isn't pulled yet), installs it and runs it on your computer, then opens your browser.alori pull [folder]: downloads your app's code, or brings the latest into a folder you already pulled. It makes one git commit per pull.alori status: shows what changed since the last pull or push.alori push -m "message": sends your changes. Alori builds them and saves a new version.alori whoami: shows which app you're connected to, and its version.alori logout: forgets this computer's sign-in.
If it doesn't work
"You're not signed in. Run: alori login": run
alori loginagain."Your role in this app doesn't build it.": ask an admin to change your role.
"… isn't empty. Pull into a new folder" or "… isn't empty and wasn't pulled from Alori. Run alori dev <new folder>.": give the command a folder that doesn't exist yet or is empty.
"Installing packages failed": fix what the lines above it say, then run
alori devagain."These files are Alori's and change for every app, so they can't be pushed": move your change into your app's own files, then push again.
"Someone else changed the same lines in these files, so nothing was saved": merge each file with its
.alori-theirscopy, delete the.alori-theirsfiles, then push again."Merge and delete these first": the files listed are
.alori-theirscopies still in your folder. Merge them, delete them, then push again."Someone else saved changes while your last push built. Run alori pull first, then push.": run
alori pull, then push again."The version you pulled is gone. Run alori pull, then push again.": run
alori pull, then push again."Alori is already building this app": the builder, a restore, an upgrade or another push is working. Try again in a minute.
"You're out of credits. Add credits in Alori, then push again.": add credits in Alori, then push again.
"The build failed, so nothing was saved": the message under it says why. Fix it in your folder and push again.
"That's too much at once": push fewer files at a time.
"Too many calls in a minute": wait a moment and try again.
Signing in from a computer with no browser (over SSH): set
ALORI_NO_BROWSER=1beforealori login. The command prints the link instead of opening it. Open it on another computer.
Related
Did this answer your question?