On this page

Local daemon

The local daemon is a background process on your machine. It runs:

  • the Dryv Engine, which validates, plans and generates;
  • the agent runtime behind dryv code and the VS Code chat;
  • task registry and sync for tasks.

It listens only on your own machine (127.0.0.1). It needs no Dryv account and no key.

How clients use it

You rarely start the daemon yourself.

  • CLI. Commands that need the Engine, such as dryv validate, plan and generate, start the daemon when it is not running and use its Engine. dryv code and dryv task sync also start it.
  • VS Code. The extension runs dryv local connect --json to start or find the daemon.

If you pass --api <url> or set DRYV_API_URL, the CLI uses that Engine instead and does not start the daemon.

Ports

The daemon picks free ports when it starts. It serves two addresses:

  • the agent API, for example http://127.0.0.1:41000/v1;
  • the Engine, on its own port.

Each start creates a new random access token for the agent API. Clients read the addresses and token from the daemon's connection file. You never need to copy them.

To choose the agent API port, pass --port to connect, start or restart. The Engine port is always picked automatically.

Commands

terminal
dryv local connect     # start the daemon if needed and print how to reach it
dryv local status      # is it running?
dryv local logs        # print the log (last 200 lines)
dryv local restart     # stop it and start a fresh one
dryv local stop        # stop it
ActionWhat it doesOptions
connectStarts the daemon if it is not running, then prints its connection details.--host, --port, --runtime-home, --json
startSame as connect.Same as connect
statusReports whether the daemon is running. Exits with status 1 when it is not.--runtime-home, --json
restartStops the daemon and starts a new one. Refuses while agent runs are active.--force, --host, --port, --runtime-home, --json
stopStops the daemon gracefully.--runtime-home, --json
logsPrints the daemon log.--tail <n> (default 200), --runtime-home, --json
link status|connect|disconnectShows or changes whether the daemon holds your Platform sign-in.--platform <url>, --json

restart will not interrupt work. If runs are active it stops and tells you how many. Use dryv local restart --force to restart anyway.

Where it keeps its files

The daemon home is ~/.dryv/local. Set DRYV_LOCAL_HOME to use another folder.

PathContents
daemon.jsonHow clients reach the running daemon. Removed when it stops.
credentials.yamlOptional model provider keys. See Dryv agent.
data/logs/api/api.logThe log that dryv local logs prints.
task-sync.jsonProjects with task sync turned on, so sync resumes after a restart.

Signing in and the daemon

dryv login stores your Platform session in your operating system's keychain. Each time the CLI reaches the daemon, it hands the session to the daemon, which keeps it in memory only. The daemon uses it for task sync.

  • dryv local link status shows whether the daemon holds a session.
  • dryv local link connect hands it over now. It fails if you are not signed in.
  • dryv local link disconnect makes the daemon forget it.

A daemon restarted without the CLI has no session until the next CLI command. Remote control of your machine from the web or mobile app is not available yet.

Troubleshooting

"dryv-local was not found." The CLI looks for the daemon in this order: the DRYV_LOCAL_COMMAND variable, the copy packaged with the CLI, dryv-local on your PATH. Reinstall the CLI, or set DRYV_LOCAL_COMMAND to the command that runs dryv-local.

A command hangs, then fails to connect. Run dryv local logs to see why the daemon did not start, then dryv local restart.

The agent does not see a new provider key. Keys are read when the daemon starts. Run dryv local restart.

You want to use another Engine. Pass --api <url> or set DRYV_API_URL. The daemon is then not used for Engine commands.

Search in