# Local development and Cloud

One composition runtime, with resources placed locally or in the platform.

Source: cd46e0e78d73497aec99e3e8d33c1fef632f36f9
URL: /cloud

Berry Cloud provisions logical runtimes and supplies hosted resources. A runtime
is a retained customer environment, not a permanently assigned server. Console,
the CLI and SDKs operate the same admitted APIs.

## Develop locally [#develop-locally]

The [Berry skill](/quickstart) handles setup on an existing local runtime or in
Berry Cloud. To start a local runtime from a source checkout yourself, use the
Node version declared in `package.json`, install dependencies with `npm ci`,
and set a random 32–256 character `BERRY_SERVER_TOKEN` in both terminals:

```sh
mkdir -p /tmp/berry-workspace
npm start -- /tmp/berry-runtime.sqlite assemblies/runtime.yaml /tmp/berry-workspace
```

Use the endpoint printed by the host as `BERRY_RUNTIME_URL`. In a source
checkout, `node cli/main.ts` invokes the CLI. These `/tmp` paths are
disposable examples; use persistent storage for real work.

Discover the selected runtime before authoring:

```sh
berry info
berry catalog
berry catalog operations --search generation
berry catalog resources --operation generation --details
```

Follow the returned pagination cursor with `--after` and the same filters.
Discovery does not grant access. Bind the resources the selected runtime offers
and declare the permissions the composition actually needs.

## Install in Cloud [#install-in-cloud]

Start with the [skill quickstart](/quickstart). Your coding agent handles email
sign-in or registration, runtime selection and deployment. Direct CLI users can
use `berry auth login --email EMAIL`, submit the emailed code with `--code -`,
then select a runtime with `berry runtime use RUNTIME_ID` and deploy with
`berry deploy`. Use `--cloud-url` for an explicitly selected development Cloud.

An account subscription, installed package and resource permission are different
contracts. Funding alone does not install an agent or authorize its tools.

## Check applicability [#check-applicability]

Cloud can run a different admitted runtime revision from a local checkout.
Use the actual runtime's discovery results and connection details. A newly
merged API or a page in source documentation does not prove it is deployed.

Cloud owns accounts, team workspaces, provisioning, quotas and billing. Runtime
execution and session semantics remain shared between local and hosted use.
