This page is not a command reference. It is a set of concrete ways to work with Arche, ordered from the simplest loop to the kinds of history surgery and collaboration patterns that only show up once a repository is under steady use.
If you are new to the system, read the first two sections and stop there. The later sections build on the same ideas: the working copy is always a draft commit, change IDs survive rewrites, and bookmarks are publication pointers rather than the unit of day to day editing.
This is the default loop when you are working alone on a small change.
Typical commands:
arche status
arche diff
arche snap "Add config parser"
You do not stage files first. You do not create a branch first. You just modify the working copy and snapshot when the state is coherent.
If the change is not ready in one shot, keep taking snapshots as you make progress:
arche snap "Parse bare key value pairs"
arche snap "Handle quoted values and escapes"
arche snap "Report invalid syntax cleanly"
That gives you a small local chain of draft commits. Nothing is public yet.
mainThis is the right workflow when the work is ready and you want main to advance to your current tip.
main to the current HEAD.main.arche bookmark set main
arche sync --push
The bookmark points only at the top commit, but that is enough. All ancestor commits reachable from that tip are included automatically.
This is the simplest publication model in Arche. You do not need arche stack push here. stack push is for review bookmarks such as stack/<change-id-prefix>. If the work is already ready to become main, moving main itself is the direct path.
A good mental model is:
arche snap creates or refines local draft history.arche bookmark set main chooses what line of history should be published.arche sync --push makes the remote agree.A very common pattern is to develop quickly first, then clean up once the idea works.
Example:
arche snap "Get parser working"
arche snap "Wire parser into config loader"
arche snap "Add tests for invalid input"
Now review the history. If the first commit needs more work, check it out, amend it, and let Arche rebase the descendants automatically:
arche co ch:abcd1234
# edit files
arche snap --amend
Because change IDs survive rewrites, the identity of the amended change stays stable even though the content hash changes.
If the stack still looks good, publish it by moving main to the current tip:
arche co @
arche bookmark set main
arche sync --push
Use a review stack when each commit should be discussed separately, or when you expect comments on individual steps rather than on the final combined result.
A typical sequence is:
arche snap "Add parser core"
arche snap "Add parser tests"
arche snap "Wire parser into CLI"
Before publishing for review, check the stack:
arche stack list
If the chain looks right, publish review bookmarks:
arche stack push
This creates stack/<change-id-prefix> bookmarks on the remote. The forge can then show each change as its own review unit while still understanding that they belong to one stack.
Use this when the stack is under review. Do not use it as a substitute for moving main when the stack is already approved and ready to land.
This is where arche absorb becomes useful.
Suppose a reviewer asks for three changes:
You can make all three edits directly in the working copy, without manually checking out each ancestor one by one. Then run:
arche absorb
Arche blame walks the draft chain, finds which ancestor last introduced the surrounding lines, and folds each hunk into the right draft commit.
The normal loop is:
arche stack list
arche absorb
arche stack push
Any hunk Arche cannot confidently attribute is left in the working copy unchanged. That is a safety property, not a failure. You can snapshot the remainder manually.
Sometimes you are halfway through one change when a different task arrives.
If the partial work is not ready for a snapshot, shelf it:
arche shelve spike-notes
This stores the working copy state in store.db and restores the working directory to HEAD.
Handle the urgent task as normal:
# edit files
arche snap "Fix token expiry check"
arche bookmark set main
arche sync --push
Then restore the shelved work:
arche unshelve spike-notes
Use shelving when the work is real but not ready to become part of history yet. If the work is already coherent, a normal snapshot is usually better than a shelf.
Suppose your local draft stack is based on an older main, and the remote main has moved substantially.
The update flow is:
arche sync --pull
arche rebase main
If some commits no longer apply cleanly, Arche stores conflict objects in the replayed commits and continues rebasing the rest of the chain. At the end, the working copy reflects the rebased tip and any unresolved paths are materialised with conflict markers.
Resolve them one by one:
arche status
# edit conflicting files
arche resolve path/to/file
arche resolve other/file
arche snap "Resolve rebase conflicts"
If this was a review stack, publish the updated review bookmarks again:
arche stack push
If the whole stack is ready for main, move main and push instead:
arche bookmark set main
arche sync --push
There are two common ways to finish a reviewed stack.
mainIf the entire stack is approved and should become the new trunk, move main to the tip:
arche bookmark set main
arche sync --push
This is the simplest outcome.
If you want to mark a reviewed change as landed before the whole stack is published as main, use stack land:
arche stack land
That lands the oldest draft in the stack. To land a specific one:
arche stack land ch:abcd1234
And if you want a bookmark advanced at the same time:
arche stack land ch:abcd1234 --bookmark release
This is useful when review state matters independently from the final trunk bookmark, or when a stack is being landed gradually.
Suppose a fix already exists on main, but you also need it on a release line.
Check out the release line and graft the fix:
arche co release-1.2
arche graft ch:fixabcd
graft copies the change onto the current HEAD, preserving its change ID and recording the relationship with an obsolescence marker. The original mainline history is untouched.
After checking the result, publish the release bookmark:
arche bookmark set release-1.2
arche sync --push
Use graft when the right answer is "apply this change here too", not "move the original commit".
This is the kind of session that only shows up in a busy repository, but it demonstrates how the pieces fit together.
Imagine this situation:
stack/... bookmarksmain moved while review was happeningA reasonable session looks like this:
arche shelve big-refactor
arche co main
# implement urgent fix
arche snap "Fix session renewal bug"
arche bookmark set main
arche sync --push
arche unshelve big-refactor
arche sync --pull
arche rebase main
arche status
# resolve conflicts
arche resolve path/one
arche resolve path/two
arche snap "Resolve rebase conflicts"
arche absorb
arche stack push
arche co release-1.2
arche graft ch:fixabcd
arche bookmark set release-1.2
arche sync --push
That is a lot of movement, but each step is still local and explicit. Nothing depends on hidden staging state or implicit branch switching.
The important thing is to keep the decisions separate:
main when the result is ready to be the new public tipA lot of confusion disappears if you decide one thing first: are you publishing for review, or publishing as the new branch tip?
Use arche stack push when:
Use arche bookmark set main plus arche sync --push when:
main should advance to your current tipUse arche stack land when:
mainOnce you make that decision, the rest of the workflow is usually obvious.