Skip to main content
This page is written for a coding agent. It describes what a local environment is and the steps to connect a project to one. If you are a person, hand it to your agent:

What a local environment is

  • The app runs on the user’s machine, started from the project directory. Modelence does not build or host it; to put the app online, deploy it to a cloud environment as described in Deploy Setup.
  • The environment holds what the app uses: the connection strings of its resources (databases, caches) and its settings. They reach the app when it starts, so they never need to be copied into the project.
  • The dashboard shows the running app on the environment’s Overview, so the user can see whether it is up.

Connecting a project

  1. Run npx modelence@latest setup in the project root, with a timeout of at least 10 minutes. It opens the browser, where the user signs in and picks the organization, application and environment, or creates a new application or environment there. Tell the user to confirm there, then wait for the command to finish. Pass --new when the user wants a new environment rather than an existing one.
  2. Tell the user the project is connected, and that they start it by running npx modelence@latest dev in the project directory, in place of the project’s own development command. Do not start it yourself unless the user asks you to. Once it runs, the environment’s Overview in the Modelence dashboard shows it.