Without a terminal
init asks which coding agents to sync from the first time. Answer it up front
when nothing can be typed — a script, or a coding agent setting this up for you:
resumecontext agents --list prints what is supported, where each one’s
history normally lives, and whether it is there — enough to ask someone which
to enable before running this.
--json prints the outcome as one object instead of the usual output. Without
--agents or --yes and without a terminal, init stops immediately and says
which flag to use, rather than waiting for a keypress that cannot come. Nothing
is created in that case. See setting up with an agent.
What else it does
It registers the directory with the background daemon and starts it if it is not already running. That is what makes syncing automatic from here on, roughly every 20 seconds, with no command to run. Seedaemon.
On an OS with neither launchd nor systemd the CLI cannot install a background
service. It says so, and on those machines
sync has to be run
by hand.What it prints
The project’s MCP URL, and a pointer toresumecontext mcp for the
token your agent needs. Add that MCP server only to this directory’s
folder-level agent configuration, never to a global agent configuration.
Running it twice
Not an error. If the directory already has a marker, either because you raninit before or because the marker was committed to git and you just cloned
the repo, init looks the project up and reports your relationship to it:
There is no way to create a project from the website.
init writes the marker
file that ties a directory to a project id, and a browser has no directory.Invited projects
Do not useinit to join an existing project. After accepting an invite, run
sync once from a clone that contains the project’s
.resumecontext.json marker. That registers the clone with the daemon and
makes later syncing automatic.