Browse documentation

Work with Codi

codi is the command-line client for Codinamo. It operates the same server-owned resources as the web application, so changes made in either interface are immediately visible in the other.

Install the client for Linux or Windows before following this guide. See Install Codi for the supported downloads and setup instructions.

Commands use a resource-oriented shape:

codi [global-options] <resource> <verb> [identifier] [options]

Resources are singular and verbs are consistent. For example:

codi workspace list
codi project create backend --git
codi pipeline update build-deploy --file pipeline.ice
codi run logs RUN-123 --follow

Use contextual help when composing a command:

codi help
codi help registry
codi registry token create --help

See Codi command reference for documented command syntax and global options.

Check the client and server

Display the client version or check whether a Codinamo server is reachable:

codi version
codi status
codi status --server https://codinamo.com

status does not require authentication. It reports the server as available whenever the server answers with an HTTP status below 500, and returns a nonzero exit status otherwise, making it suitable for diagnostics and readiness checks.

Check whether a newer client has been published:

codi update check

update check reports the installed and latest versions and, when an update is available, the download URL and SHA-256 digest for your platform. It does not install anything; see Install Codi to upgrade.

Codi can generate completion definitions for Bash, Zsh, and Fish. The following commands enable completion in the current shell session:

source <(codi completion bash)
source <(codi completion zsh)
codi completion fish | source

Run only the line for the active shell.

Configure profiles and authenticate

A profile stores a server URL and the current workspace. Authentication credentials are stored separately with owner-only file permissions.

codi profile create production --server https://codinamo.com
codi profile use production
codi profile show
codi profile list

codi auth login
codi auth whoami

Without options, auth login opens the browser and polls Codinamo while you complete the login form. The browser only marks the pending session authorized; the CLI exchanges the session with PKCE for the final token.

To authenticate from a non-interactive environment, read the password from standard input:

printf '%s\n' "$CODINAMO_PASSWORD" \
  | codi auth login --email user@example.com --password-stdin

The equivalent compact spelling is:

printf '%s\n' "$CODINAMO_PASSWORD" \
  | codi auth login --email:user@example.com --pwdstdin

Create an account interactively with codi auth signup. Name, email, and handle can also be provided as options; the password is still read without echo or through --password-stdin.

Use codi auth logout to remove the stored token for the selected profile. Deleting a profile removes both its local context and its stored credential:

codi auth logout
codi profile delete production

Personal access tokens

A sign-in lasts 24 hours. For scripts, CI, and tools that run without a browser, create a personal access token instead. Sign in first, then:

codi token create nightly-report --scope read --expires-days 30

Codi prints the token once. Store it in a secret manager; Codinamo keeps only a digest and cannot show it again.

To use a token on the same machine without ever displaying it, let Codi store it in a separate profile:

codi token create automation --save-profile automation
codi --profile automation pipeline list

The automation profile points to the same server and workspace as the profile you created it from, and keeps working after your own sign-in expires.

Choose the narrowest scope that does the job:

Scope Allows

write (default)

Everything your account can do, except managing personal access tokens.

read

Reading only. Requests that create, change, run, or delete something are refused.

A token always expires: after 90 days by default, and after at most 365. Review and revoke tokens with:

codi token list
codi token revoke automation

Revocation takes effect immediately. Revoke a token as soon as it is no longer needed or may have been exposed.

For CI, provide the token as CODINAMO_ACCESS_TOKEN through the runner’s secret mechanism. Do not place access tokens or passwords directly in command arguments.

Select a workspace

Most delivery resources are scoped to an active workspace. Select it once in the profile:

codi workspace list
codi workspace create platform --slug platform
codi workspace use platform
codi workspace current

Use --profile or --workspace to override local state for one command:

codi project list --profile production --workspace platform

A selector may be a canonical ID or a unique name. Organizations and workspaces also accept their slug; deployment targets also accept their reference name. If a name is ambiguous, Codi asks for the canonical ID instead of guessing.

See Resource identifiers for the public ID prefixes.

Manage organizations and teams

Organization commands operate above workspace context. Team commands always identify their organization explicitly:

codi organization list
codi organization create Acme --slug acme
codi organization show acme

codi team create developers --organization acme
codi team member add developers \
  --organization acme --email developer@example.com
codi team member list developers --organization acme

Use team member remove to remove membership. This may change access inherited through the team, but it does not remove grants assigned directly to the user.

Inspect access

Use the authorization catalog to discover permission and resource codes. Capabilities show every decision for a resource; decision checks one permission and returns exit code 4 when access is denied.

codi access catalog
codi access capabilities --resource WORKSPACE:WKS-123
codi access decision \
  --permission pipeline.run --resource PIPELINE:PIP-456

When access capabilities has no --resource, it inspects the active workspace.

Manage roles and grants

Roles and grants use JSON files so their definitions remain reviewable and do not become long command lines. Preview a role before creating it:

{
  "description": "Can operate project pipelines",
  "permissions": ["pipeline.read", "pipeline.run"],
  "assignableScopeTypes": ["PROJECT"]
}
codi role preview --organization acme --file project-operator.json
codi role create "Project Operator" \
  --organization acme --file project-operator.json
codi role list --organization acme

A grant connects a user or team, a role, and a resource scope:

{
  "principalType": "TEAM",
  "principalId": "TEA-123",
  "roleId": "ARO-456",
  "scopeType": "PROJECT",
  "scopeId": "PRO-789",
  "expiresAt": null
}
codi grant create --organization acme --file grant.json
codi grant list --organization acme --scope PROJECT:PRO-789
codi grant effective --organization acme \
  --principal TEAM:TEA-123 --resource PROJECT:PRO-789

Role creation and update run the server preview before mutation. When a role version or grant revision is omitted, Codi reads the current value and uses it for optimistic concurrency control.

Discover actions and source

Inspect the action catalog from the terminal before authoring ICE:

codi action list
codi action list --category build
codi action show MAVEN_BUILD

For hosted source, enable a project repository and inspect its tree:

codi repository enable application
codi repository show application
codi repository tree application --path src

Create and run a pipeline

codi project create application --git
codi pipeline create build-deploy --project application
codi pipeline validate --file pipeline.ice
codi pipeline update build-deploy --file pipeline.ice --message "add publish step"
codi pipeline update build-deploy --file pipeline.ice --pr --title "add publish step"
codi pipeline configure build-deploy --continue-on-error false
codi pipeline run build-deploy --follow

pipeline validate checks the ICE document without changing any state. pipeline update validates the source and commits it into the project repository under .codinamo/pipelines/, recorded with the authenticated user as author. A custom commit message can be passed with --message. The committed definition is what both the visual editor and executions see.

With --pr, pipeline update opens a pull request instead of committing to the default branch. --title and --description describe the pull request and --branch names its source branch. To add another commit to a pull request that is already open, pass --pull-request with its ID instead of --pr.

List and complete pull requests from the terminal:

codi pr list --project application --status open
codi pr list --project application --output json
codi pr show <pull-request>
codi pr merge <pull-request> --message "add publish step"
codi pr close <pull-request>

pr show, pr merge, and pr close take the pull request ID, which is the id field of pr list --output json.

pipeline configure also selects the runner a pipeline executes on with --runner.

Export the current valid ICE or inspect executions separately:

codi pipeline export build-deploy --file pipeline.ice
codi run list --pipeline build-deploy
codi run show RUN-123
codi run logs RUN-123 --follow
codi run reports RUN-123
codi run cancel RUN-123

The dashboard commands provide workspace-level summaries:

codi dashboard show
codi dashboard recent
codi dashboard pipelines

Manage variables and secrets

codi variable-group create production
codi variable-group set production REGION=us-east-1
codi pipeline attach-variable-group build-deploy production

codi secret-group create release --description "Release credentials"
printf '%s' "$REGISTRY_PASSWORD" \
  | codi secret-group set release REGISTRY_PASSWORD --stdin
codi pipeline attach-secret-group build-deploy release

Secret values are read without echo or through standard input. They are never accepted as command arguments or included in Codi output. secret-group show reports only names and configuration state.

Operate Registry resources

Inspect or enable the Registry attached to a project, list its repositories, and create scoped client credentials:

codi registry enable application
codi registry show application
codi registry repositories application
codi registry token create application local-publisher \
  --permissions pull,push

A newly created Registry token is shown once. Capture it in an approved secret store and revoke it when it is no longer required.

Adjust the Registry visibility and storage quota, and remove older images:

codi registry update application --visibility private
codi registry update application --quota-gb 20 --quota-policy BLOCK
codi registry cleanup application --keep 10
codi registry cleanup application --keep 10 --apply

--quota-policy is DELETE_OLDER_IMAGES or BLOCK and selects what happens when the quota is exceeded. registry cleanup is a dry run unless --apply is present: it lists the images it would delete, keeping the newest --keep images of each repository (default 5) and the images in use by deployed releases. With --apply, Codi asks for confirmation before deleting.

Manage agents and deployment targets

Issue an enrollment token for a DinaSync agent, then create a target from a strategy-specific JSON file:

codi agent enrollment-token production-agent --expires-in 900

codi target create production-api \
  --reference production_api \
  --kind machine \
  --strategy docker-compose \
  --config target.json

The target may be created without --agent and assigned later with target update. Valid kinds are machine, container, and swarm; valid strategies are docker-compose, docker-container, docker-swarm, and docker-stack.

{
  "workingDirectory": "/home/codinamo",
  "composeFile": "docker-compose.yml",
  "projectName": "codinamo",
  "service": "codinamo-backend",
  "imageVariable": "CODINAMO_WEBAPP_IMAGE"
}

Automate safely

Use --output json for structured output and --quiet when a command supports identifier-only output. --no-color removes terminal color and --timeout sets a request timeout from 1 to 300 seconds.

workspace_id=$(codi workspace current --quiet)
codi pipeline list --workspace "$workspace_id" --output json

Human-readable results go to standard output and diagnostic errors go to standard error. With --output json, errors use a stable object containing code, message, and httpStatus.

Destructive commands prompt before changing state. In non-interactive automation, pass --yes explicitly; it is required when a destructive command also uses --output json.

See Troubleshoot Codi for exit codes and common failures.