CLI Commands Reference

Reference for ModelKnife CLI commands, grouped by workflow and operational scope.

Command conventions: mk p is the short form of mk pipeline, and mk s is the short form of mk service. Most project commands accept -p/--profile for compose profiles and -w/--workspace for deployment isolation. Run mk COMMAND --help for exact option defaults in your installed version.

Start Here

GoalCommandNotes
Preview changesmk plan -p prod -w prod --refreshShows stack changes before deployment.
Deploy servicesmk s deploy -p prod -w prodDeploys provider infrastructure services.
Deploy pipelinemk p deploy -p prod -w prodDeploys module artifacts and orchestration.
Run with parametersmk p run -w gwliu --param start_date=2026-06-01Applies a pipeline-level run override for one execution.
Run selected modulesmk p run -w gwliu --modules user_feature_job,post_feature_jobRuns a selected module subgraph.
Check statusmk p status -w prodShows latest pipeline execution and module status.
Refresh inventorymk stacks sync --refreshSyncs current project state and provider metadata into the stack registry.

CLI Conventions

OptionMeaningUsed By
-p, --profileSelects a compose profile such as prod.Pipeline, service, state, schedule, show, viz.
-w, --workspaceSelects the logical deployment workspace. Defaults to the current user when omitted.Deploy, run, status, show, delete, state, stacks filters.
--base-path / --base_pathProject or configuration directory. Some commands still expose the underscore spelling.Most project-scoped commands.
--jsonMachine-readable output for automation.Deploy, run, status, state, stacks where supported.
--refreshReads remote provider state before planning or syncing metadata.mk plan, deploy commands, mk stacks sync.

Pipeline Commands

mk p manages pipeline modules, orchestration, runs, status, and schedules.

mk p deploy

Deploys pipeline module artifacts and provider orchestration.

mk p deploy [--profile PROFILE] [--workspace WORKSPACE] [--with-services] [--refresh] [--force] [--json]
--with-servicesDeploy services before pipeline modules.
--no-cacheIgnore build cache and rebuild artifacts.
--verboseShow detailed build and deployment output.
--forceProceed even when the plan reports blocking or no-op conditions.

mk p run

Starts a full pipeline execution or a selected module run. Full pipeline runs reuse the deployed pipeline. Selected module runs execute only the requested module subgraph.

mk p run [--modules MODULES] [--param KEY=VALUE] [--module-param MODULE.KEY=VALUE] [--profile PROFILE] [--workspace WORKSPACE]
-m, --modulesComma-separated module names to run.
--param KEY=VALUEPipeline-level run override. ModelKnife resolves affected module job parameters from compose references.
--module-param MODULE.KEY=VALUEModule-specific run override. This is the most specific run override.
--jsonEmit execution start metadata as JSON.
mk p run -w gwliu --param start_date=2026-06-01
mk p run -w gwliu --modules user_feature_job --module-param user_feature_job.output-mode=overwrite

mk p status

Shows execution status, schedule information, monitor link, and module-level progress.

mk p status [--name PIPELINE] [-n EXECUTION_INDEX] [--profile PROFILE] [--workspace WORKSPACE] [--json]

mk p show

Displays pipeline state or local module configuration with dependency and console-link information.

mk p show [--profile PROFILE] [--workspace WORKSPACE] [--detailed]

mk p runs

Lists recent pipeline executions.

mk p runs [--name PIPELINE] [--limit 10] [--profile PROFILE] [--workspace WORKSPACE] [--json]

mk p stop

Stops running executions by ARN, by module, or for the whole pipeline.

mk p stop [--execution-arn ARN | --module MODULE | --all] [--profile PROFILE]

mk p delete

Deletes pipeline orchestration and associated provider resources.

mk p delete [--name PIPELINE] [--profile PROFILE] [--workspace WORKSPACE] [--confirm]

mk p visualize / mk p viz

Generates an interactive pipeline dependency visualization.

mk p visualize [--profile PROFILE] [--output pipeline_dag.html] [--no-open]
mk p viz [--profile PROFILE] [--output pipeline_dag.html] [--no-open]

Pipeline Schedule Commands

mk p schedule manages provider schedules for automated pipeline runs.

CommandPurposeKey Options
mk p schedule setCreate or update a schedule.--cron, --timezone, --description, -p, -w
mk p schedule showShow current schedule.-p, -w, --base-path
mk p schedule listList scheduled pipelines in the provider account.-p
mk p schedule enableEnable an existing schedule.-p, -w, --confirm
mk p schedule disableDisable an existing schedule.-p, -w, --confirm
mk p schedule removeRemove a schedule.-p, -w, --confirm
mk p schedule set --cron "0 2 * * *" --timezone Europe/Zurich -p prod -w prod

Service Commands

mk s deploys and manages provider infrastructure services.

CommandPurposeKey Options
mk s deployDeploy services with dependency resolution.-s/--service, -p, -w, --force, --no-cache, --refresh, --json
mk s statusShow service deployment status.-s/--service, -p, -w, --details, --json
mk s showDisplay service state or local config.-p, -w, --detailed
mk s validateValidate service configuration without deployment.--service, -p
mk s deleteDelete deployed services.-s/--service, -p, -w, --confirm

Service Tooling

CommandPurposeKey Options
mk s rollbackRollback services to previous state.--service, -p, --confirm
mk s templateGenerate service configuration templates.--type, --name, --interactive, --backend
mk s typesList service types available for a backend.--backend
mk s cacheInspect or clean service build cache.--action stats|clean|clear, --max-age, --backend

State Commands

Inspect, refresh, migrate, and repair ModelKnife deployment state.

CommandPurposeKey Options
mk planShow deployment plan for the current stack.-p, -w, --detail, --refresh, --json
mk state showShow state snapshots.-p, -w, --all, --detail, --json
mk state refreshRefresh remote provider state and show drift.-p, -w, --detail, --json
mk state doctorDiagnose state identity, coverage, schema, and backend health.-p, -w, --detail, --json
mk state adoptAdopt existing deployments into state.--from-legacy, --remote, --refresh, --force
mk state migrateMigrate state snapshots between backends.--from, --to, --force, --overwrite
mk state prunePrune old deployment attempts.--all, --keep-attempts, --force
mk state exportExport state snapshots as JSON.--all, --redact/--no-redact
mk state import EXPORT_FILEImport a non-redacted state export.--force
mk state schema migrateRewrite state payloads using the current schema version.--force
mk state lock-statusShow state backend lock status.--base_path
mk state unlockRelease a stale lock.--force
mk state backend showShow state backend config.--json
mk state backend initInitialize project state backend.--type, --set, --yes, --skip-validate, --reconfigure

Stack Registry Commands

mk stacks works across projects and state snapshots to find deployed ModelKnife stacks.

CommandPurposeKey Options
mk stacks listList registered stacks.--registry, --workspace, --json
mk stacks show SELECTORShow one stack by id or name.--registry, -p, -w, --region, --provider-profile, --json
mk stacks syncSync current project state into the global registry.--base-path, --registry, --refresh, --json
mk stacks doctorDiagnose the resolved stack registry.--registry, --json
mk stacks registry showShow resolved registry configuration.--base-path, --registry, --json
mk stacks registry initInitialize local or S3 stack registry configuration.--type, --name, --path, S3 options, --project, --yes, --json
mk stacks registry migrateMigrate registry metadata between local and remote registries.--from, --to, S3 options, --force, --overwrite, --json

Setup Commands

Initialize and validate ModelKnife team/provider setup.

CommandPurposeAccess
mk setup initCreate or update shared provider resources and team administrator access.Admin.
mk setup statusCheck setup health.User.
mk setup validateValidate access configuration files.User.
mk setup configGenerate local access configuration files.User.
mk setup fixFix common setup issues.Admin.
mk setup cleanRemove setup groups and resources.Admin, destructive.
mk setup resetReset user configuration to defaults.Admin, destructive.

Team Commands

CommandPurposeKey Options
mk team statusShow current user's access level.None.
mk team check-accessCheck access for an operation type.--operation basic|admin
mk team list-usersList team members.--group
mk team setupInitialize team access groups.Admin.
mk team add-userGrant team access.--user, --group
mk team remove-userRemove team access.--user, --group, --confirm

Utility Commands

Authentication, provider profile, formatting, and visualization helpers.

CommandPurposeKey Options
mk loginAuthenticate or check readiness for a cloud provider.--provider aws|gcp, -p/--profile, --region, --project, --check
mk conf showShow provider profile configuration.None.
mk conf set PROFILE_NAMESet provider profile for ModelKnife operations.Profile argument.
mk conf unsetRemove provider profile configuration.None.
mk fmtFormat compose YAML files.-p, --base-path, --check, --diff, --all, --mode
mk showDisplay pipeline and service configuration overview.-p, --base-path, --detailed
mk vizGenerate unified system architecture visualization.-p, --output, --no-open, --view
mk list-profilesList compose profiles in the current project.--base-path

Verification Tip

This page is a developer reference, not a substitute for command help. For exact option descriptions in your installed version, run mk COMMAND --help or mk GROUP COMMAND --help.