CLI reference
The Comind CLI ships as part of the @comind/api package and is invoked via npx comind <command>. It handles every step between local source code and a running workspace - building, deploying, syncing, and importing data. All commands are scriptable, so they work equally well at a developer's terminal or inside a CI/CD pipeline.
Command reference
| Command | Alias | Purpose | Example |
|---|---|---|---|
install | i | Compile an app and deploy it to a workspace | npx comind i app-task CMW 100 |
push | Upload source files to METAMETA/APPCODEFILE | npx comind push app-task | |
pull | Download app source from METAMETA/APPCODEFILE | npx comind pull app-task apps-dev/app-task | |
build | Compile app to JS (output to __upload/build/) | npx comind build app-task | |
dump | Export a running app schema to TypeScript files | npx comind dump default-app-wiki apps-dev/app-wiki | |
dumpLint | Dump with ESLint auto-fix applied | npx comind dumpLint default-app-wiki apps-dev/app-wiki | |
promote | Promote an app to another environment | npx comind promote ... | |
createRecords | Create records from CSV or JSON | npx comind createRecords ... | |
importRecords | Import records into a workspace | npx comind importRecords ... | |
importCustomViews | Import list view configurations | npx comind importCustomViews ... |
Key workflows
install - local dev to running workspace
The most common command during development. It builds the full compilation pipeline and deploys the result in a single step.
npx comind install app-task CMW
→ buildAppSchemaObject("app-task")
→ buildAppSchemaCompiledJsCode(schema)
→ comind.schema.deploy(code, "CMW", position)
- The optional third argument sets the app's position (sort order) in the workspace sidebar.
- The builder resolves the full dependency tree - base, plugins, and any parent app declared via
inheritFrom- before compiling.
push - local source to backend storage
Syncs your local files to the platform's internal APPCODEFILE storage. Unlike install, this does not compile or deploy; it only persists the source.
npx comind push app-task
→ Build schema, get app GUID
→ Load remote APPCODEFILE records from METAMETA
→ Diff local vs remote files
→ Upload changed files as APPCODEFILE records
→ Trigger "publish_with_sync" on APP record
Only changed files are uploaded. The final publish-with-sync step makes the new source visible in the platform's app editor.
pull - backend to local source
The inverse of push. Downloads the current app source from the platform and writes it to a local directory. Useful when an app was edited in the browser and you need to bring those changes into your codebase.
npx comind pull app-task apps-dev/app-task
→ Fetch APPCODEFILE records from METAMETA
→ Write each file to local directory
→ Format with Prettier
Output is auto-formatted with Prettier so the downloaded code matches the project's style conventions.
dump - running app to TypeScript
Reverse-engineers a compiled app back into TypeScript source files. This is the primary tool for migrating legacy apps to the v2 package structure.
npx comind dump app-id target-dir
→ comind.schema.load(appId)
→ Parse compiled JS back into TypeScript components
→ Generate fields/, actions/, views/, settings/
→ Format with Prettier
The dumpLint variant runs ESLint with auto-fix on the generated files, saving a manual cleanup step.
build - compile without deploying
Produces compiled JS output in the __upload/build/ directory without deploying to any workspace. Useful for validating that an app compiles cleanly, or for inspecting the build output.
npx comind build app-task
Scaffolding
New customer apps can be scaffolded using npm-init-comind. This generates the standard package structure - fields, actions, views, settings, and package.json - ready for development.
npm init comind
CI/CD usage
Customer CI/CD pipelines typically script npx comind install for each app in deployment order. The CLI is designed to be non-interactive, so it runs without modification in TeamCity, GitHub Actions, or any other CI system.
A typical deployment script installs apps sequentially to respect dependency order:
npx comind install app-base-task PROD
npx comind install app-custom-task PROD
npx comind install app-custom-deal PROD
For more on how install fits into the broader development process, see App lifecycle.