Environments
Weik.io 2026.2Create 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.
This part of the video couldn't be loaded.
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.
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. |
-- |
Makes this a production environment, which can’t be changed later. |
-- |
Sets the environment’s display name. Give “” to remove it. |
-- |
Sets the environment’s place in the promotion order. The default on create is 1. |
-- |
Allows secret values to be revealed in this environment. |
-- |
Allows deployments in a production environment to follow the latest version. |
-- |
Allows deployments to start while the hub is out of reach. |
-- |
Sets how long an agent runs or starts its deployments while the hub is out of reach, such as 24h or 7d. |
-- |
Sets the size limit for events, which are channel events, webhook receipts and transfer records. |
-- |
Sets the size limit for entity events, which record each entity that is stored or changed. |
-- |
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. |
-- |
Sets the size of the entity store. The default on create is 512 MiB. |
-- |
Sets the size limit for dead letters. |
-- |
Sets the size limit for the record of handled events. |
-- |
Adds a PEM file that the environment’s deployments trust. Repeat it for each file. |
-- |
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.
$ weikio apply -f platform/environments.yamlTarget: https://hub.example
environment devtest created
environment production createdweikio get environments#
List the environments in order and show each one’s budgets and its gateways and agents.
weikio get environmentsWho 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.
$ weikio get environmentsNAME 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 MiBweikio describe environment#
Show an environment, including its deployments.
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}/deploymentsGET /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.
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. |
-- |
Removes the environment’s trusted certificates. |
-y, --yes |
Skips the confirmation. |
-- |
Sets the environment’s display name. Give “” to remove it. |
-- |
Sets the environment’s place in the promotion order. The default on create is 1. |
-- |
Allows secret values to be revealed in this environment. |
-- |
Allows deployments in a production environment to follow the latest version. |
-- |
Allows deployments to start while the hub is out of reach. |
-- |
Sets how long an agent runs or starts its deployments while the hub is out of reach, such as 24h or 7d. |
-- |
Sets the size limit for events, which are channel events, webhook receipts and transfer records. |
-- |
Sets the size limit for entity events, which record each entity that is stored or changed. |
-- |
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. |
-- |
Sets the size of the entity store. The default on create is 512 MiB. |
-- |
Sets the size limit for dead letters. |
-- |
Sets the size limit for the record of handled events. |
-- |
Adds a PEM file that the environment’s deployments trust. Repeat it for each file. |
-- |
Stores a reason for the change with the audit record. |
-- |
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. |
-- |
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. |
-- |
Removes the environment’s launch defaults, so its deployments use the installation’s. The -- and -- 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.
weikio delete environment <name> [-y]| Argument or flag | What it does |
|---|---|
<name> |
Identifies the environment. |
-y, --yes |
Skips the confirmation. |
-- |
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.
$ weikio delete environment devtesterror: 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.
weikio rename environment <name> <new-name>| Argument or flag | What it does |
|---|---|
<name> |
Identifies the environment. |
<new- |
Sets the new name. |
-- |
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. |