Docs
CLICI/CD

Services and environments

Create and edit the services and environments you deploy, and set their spec with a file (co service, co env)

co service and co env manage the services (what to deploy) and environments (where to deploy) a pipeline deploys. They are the service and environment named under deployment: in a pipeline's YAML. The on-screen way is in Prepare to deploy.

Services belong to a project. To view, edit or delete a service, or to work with its spec, pass the project with -p. An environment's spec needs -p too.

Services

co service list -p CORE
co service view api -p CORE                                     # the service and its environments
co service create api --name "API" --type kubernetes -p CORE
co service edit api --name "API server" -p CORE                 # renames only (the identifier stays)
co service delete api -p CORE

--name is the name shown on screen; leave it out to use the identifier. --type is one of kubernetes, manifests or node.

Environments

co env list -p CORE
co env view prod -p CORE                             # the environment and its services
co env create stage --tier stage --type non_prod -p CORE
co env edit stage --name "Staging" -p CORE           # changes only the flags you pass
co env delete stage -p CORE
FlagValues
--tierdev test stage prod customer
--typenon_prod or prod (Pre-Production and Production on screen)
--store-typeproduct or git

Edit the spec as a file

The spec is the YAML the spec editor on screen saves. A service's spec holds its image, ports and per-environment settings; an environment's holds settings for the whole environment.

co service spec get api -p CORE --json        # updated_at and check results
co service spec get api -p CORE > api.yml     # the YAML only
co service spec set api -f api.yml -p CORE --base 2026-11-23T04:05:06Z
co env spec get prod -p CORE > prod.yml

spec set replaces the whole spec. Pass --base with the updated_at from spec get --json: if someone saved in between, nothing is saved and co exits with code 4. Without --base the later save silently wins. A spec with problems is refused with one line per problem and exit code 3.

Deleting

delete asks first unless you pass -y, and refuses without a terminal. Pipelines that still deploy to that service or environment fail at their next deploy.

Table of Contents

AI tools

Was this helpful?