Skip to content
Weik.ioDocs
2026.2
Try Weik.io

Environments

Weik.io 2026.2

Create the installation's environments with the weikio CLI and set the budgets and protection of each one. Video

Watch: Projects, environments and access, 3:59

The video creates a project and an environment and grants a person access to them.

On this page

Environments such as devtest and production belong to the installation. A platform administrator creates them once, usually as kind: environment documents in Git. Each environment stores its events and entities apart from the other environments, within the budgets you give it.

A production environment is protected. Every command that changes something in it needs --env and doesn’t use your context’s default environment.

Commands on this page#

Command What it does
weikio env create Create an environment.
weikio get environments List the environments in order and show each one’s budgets and its gateways and agents.
weikio describe environment Show an environment, including its deployments.
weikio env set Change an environment’s settings.
weikio delete environment Delete an environment and everything in it.
weikio rename environment Rename an environment.

env and environment mean the same in every command on this page.

The tables below leave out the flags every command accepts, such as --env and --project, which the CLI reference lists.

weikio env create#

Create an environment. Weik.io creates the environment’s storage at the same time, sized by the --*-bytes budgets or by the installation’s defaults. An environment’s production flag can’t be changed after it’s created.

Terminal
weikio env create <name> [--display-name S] [--order N] [--production] [--allow-secret-reveal] [--allow-latest] [--start-offline=bool] [--offline-start-max-age LENGTH] [--entity-store-bytes SIZE] [--events-bytes SIZE] [--entity-events-bytes SIZE] [--runs-bytes SIZE] [--dead-letter-bytes SIZE] [--idempotency-bytes SIZE] [--trusted-certificates PEM-FILE ...]
Argument or flag What it does
<name> Sets the environment’s name.
--production Makes this a production environment, which can’t be changed later.
--display-name <display-name> Sets the environment’s display name. Give “” to remove it.
--order <order> Sets the environment’s place in the promotion order. The default on create is 1.
--allow-secret-reveal Allows secret values to be revealed in this environment.
--allow-latest Allows deployments in a production environment to follow the latest version.
--start-offline Allows deployments to start while the hub is out of reach.
--offline-start-max-age <offline-start-max-age> Sets how long an agent runs or starts its deployments while the hub is out of reach, such as 24h or 7d.
--events-bytes <events-bytes> Sets the size limit for events, which are channel events, webhook receipts and transfer records.
--entity-events-bytes <entity-events-bytes> Sets the size limit for entity events, which record each entity that is stored or changed.
--runs-bytes <runs-bytes> Sets the size limit for the record of each run of a schedule. The default is 1 GiB on a hub with more than one data server and 256 MiB otherwise.
--entity-store-bytes <entity-store-bytes> Sets the size of the entity store. The default on create is 512 MiB.
--dead-letter-bytes <dead-letter-bytes> Sets the size limit for dead letters.
--idempotency-bytes <idempotency-bytes> Sets the size limit for the record of handled events.
--trusted-certificates <trusted-certificates> Adds a PEM file that the environment’s deployments trust. Repeat it for each file.
--reason <reason> Stores a reason for the change with the audit record.

Who can run it: a platform administrator.

API: PUT /api/v1/environments/{name}.

Also written as weikio create environment.

Terminal
$ weikio apply -f platform/environments.yaml
You see
Target: https://hub.example
environment devtest created
environment production created

weikio get environments#

List the environments in order and show each one’s budgets and its gateways and agents.

Terminal
weikio get environments

Who can run it: a grant whose role has read in the environment.

API: GET /api/v1/environments, GET /api/v1/gateways.

Also written as weikio get env, weikio get environment and weikio get envs.

Terminal
$ weikio get environments
You see
NAME         ORDER   PRODUCTION   EVENTS BUDGET   ENTITY EVENTS   ENTITY STORE   GATEWAYS                      AGENTS       SCHEDULE RUNS
devtest      1       no           2 GiB           1 GiB           512 MiB        devtest (default)             2/2 online   256 MiB
production   2       yes          8 GiB           4 GiB           2 GiB          internal (default), partner   1/2 online   256 MiB

weikio describe environment#

Show an environment, including its deployments.

Terminal
weikio describe environment <name>
Argument or flag What it does
<name> Identifies the environment.

Who can run it: a grant whose role has read in the environment. Only a platform administrator sees the parts of the output about the platform.

API:

  • GET /api/v1/environments/{name}
  • GET /api/v1/environments/{name}/deployments
  • GET /api/v1/agents?environment=

Also written as weikio describe env, weikio describe environments and weikio describe envs.

weikio env set#

Change an environment’s settings. --trusted-certificates replaces the environment’s list of trusted certificates, which restarts every deployment of the environment with a new truststore. The command lists those deployments before you confirm.

When you lower a budget below what is already stored, the command prints what the change removes and deletes the oldest events once you confirm. A budget of 0, such as --runs-bytes 0, sets the budget back to its default.

Terminal
weikio env set <name> [--display-name S] [--order N] [--allow-secret-reveal=bool] [--allow-latest=bool] [--start-offline=bool] [--offline-start-max-age LENGTH] [--events-bytes SIZE] [--entity-events-bytes SIZE] [--runs-bytes SIZE] [--entity-store-bytes SIZE] [--dead-letter-bytes SIZE] [--idempotency-bytes SIZE] [--trusted-certificates PEM-FILE ...|--no-trusted-certificates] [--launch-property KEY=VALUE ...] [--launch-jvm-option FLAG ...] [--no-launch-defaults]
Argument or flag What it does
<name> Identifies the environment.
--no-trusted-certificates Removes the environment’s trusted certificates.
-y, --yes Skips the confirmation.
--display-name <display-name> Sets the environment’s display name. Give “” to remove it.
--order <order> Sets the environment’s place in the promotion order. The default on create is 1.
--allow-secret-reveal Allows secret values to be revealed in this environment.
--allow-latest Allows deployments in a production environment to follow the latest version.
--start-offline Allows deployments to start while the hub is out of reach.
--offline-start-max-age <offline-start-max-age> Sets how long an agent runs or starts its deployments while the hub is out of reach, such as 24h or 7d.
--events-bytes <events-bytes> Sets the size limit for events, which are channel events, webhook receipts and transfer records.
--entity-events-bytes <entity-events-bytes> Sets the size limit for entity events, which record each entity that is stored or changed.
--runs-bytes <runs-bytes> Sets the size limit for the record of each run of a schedule. The default is 1 GiB on a hub with more than one data server and 256 MiB otherwise.
--entity-store-bytes <entity-store-bytes> Sets the size of the entity store. The default on create is 512 MiB.
--dead-letter-bytes <dead-letter-bytes> Sets the size limit for dead letters.
--idempotency-bytes <idempotency-bytes> Sets the size limit for the record of handled events.
--trusted-certificates <trusted-certificates> Adds a PEM file that the environment’s deployments trust. Repeat it for each file.
--reason <reason> Stores a reason for the change with the audit record.
--launch-property <launch-property> Adds a Camel setting, as KEY=VALUE, that the environment’s deployments start with. Repeat the flag for each setting. Each one replaces the installation’s setting of the same key.
--launch-jvm-option <launch-jvm-option> Adds a Java option that the environment’s deployments start with. Repeat the flag for each option. The options you give replace the installation’s list for this environment.
--no-launch-defaults Removes the environment’s launch defaults, so its deployments use the installation’s. The --launch-property and --launch-jvm-option flags of the same command then start from an empty list.

Who can run it: a platform administrator.

API: PUT /api/v1/environments/{name}.

weikio delete environment#

Delete an environment and everything in it. The command stops without deleting anything while deployments, entity types, agents or gateways still use the environment. Otherwise, type the environment’s name at the prompt. The command then deletes every event and dead letter stored in the environment. It also deletes the environment’s values and client certificates.

Terminal
weikio delete environment <name> [-y]
Argument or flag What it does
<name> Identifies the environment.
-y, --yes Skips the confirmation.
--reason <reason> Stores a reason for the change with the audit record.

Who can run it: a platform administrator.

API: GET /api/v1/version, DELETE /api/v1/environments/{name}.

Also written as weikio delete env, weikio delete environments and weikio delete envs.

Terminal
$ weikio delete environment devtest
You see
error: Environment 'devtest' is still used by 7 deployments, 1 entity type and 2 agents. Undeploy from it, delete its entity type and remove it from the agents that serve it.
       deployment 'finance/erp-invoice-export'
       deployment 'finance/invoice-tally'
       deployment 'finance/nightly-payroll'
       deployment 'finance/orders-api'
       deployment 'hr/onboarding'
       deployment 'hr/payroll-sync'
       deployment 'shop/orders'
       entity type 'finance/invoice'
       agent 'site-01'
       agent 'site-02'

weikio rename environment#

Rename an environment.

Terminal
weikio rename environment <name> <new-name>
Argument or flag What it does
<name> Identifies the environment.
<new-name> Sets the new name.
--reason <reason> Stores a reason for the change with the audit record.

Who can run it: a platform administrator.

API: PATCH /api/v1/environments/{environment}.

Also written as weikio rename env, weikio rename environments and weikio rename envs.

Exit codes#

The codes match the exit code table in the CLI reference.

Code Meaning
0 The command succeeded.
1 The command stopped without making the change.
2 The command has a usage error.
3 Your key is missing, expired or revoked, or its access doesn’t cover the command.
4 What you named doesn’t exist.
5 The change conflicts with another change.
6 Weik.io couldn’t be reached or wasn’t ready, or it was rate limiting your calls or out of storage. Run the command again later.
8 A document isn’t valid.

See also#

Sign in to the live demo

Sign in with the shared viewer account. It can open every screen of the example projects but can't change anything.

E-mail
viewer@demo.weik.io
Password
try-weikio-live-demo
Open the live demo