Import and export workflows
Comindwork provides several ways to import data into and export data from your workspaces - from UI-based uploads to programmatic bulk operations.
Importing records
From the UI
Use the built-in data import feature to upload records from spreadsheet files:
- Navigate to the target app in your workspace
- Open the list menu and select Import data
- Upload a CSV or XLSX file
- Map file columns to app fields
- Choose how to handle duplicates
- Preview the results and confirm the import
From the CLI
Two CLI commands are available for importing records:
createRecords - create new records from a file:
npx comind createRecords <app> <workspace> <file>
importRecords - import with full control over duplicate handling:
npx comind importRecords <app> <workspace> <file>
Duplicate handling modes:
| Mode | Behavior |
|---|---|
| Block | Fail the entire import if any duplicates are found |
| Skip | Silently ignore duplicate records |
| Import | Update existing records (upsert) |
Action modes:
| Mode | Behavior |
|---|---|
| CreateAndUpdate | Create new records and update existing matches |
| CreateOnly | Only create, skip existing |
| UpdateOnly | Only update, skip new |
| Preview | Dry run - show what would happen without changes |
From code (server-side)
Use Cmw.importData() in action code for programmatic imports:
await Cmw.importData({
data: records,
keyFields: ["external_id"],
duplicateHandling: "Import",
actionMode: "CreateAndUpdate",
fieldMapping: [
{ source: "ext_name", target: "title" },
{ source: "ext_date", target: "creation_date" }
]
});
Importing list views
Import saved list view configurations (filters, columns, sort order) using the CLI:
npx comind importCustomViews
Exporting data
From the UI
Export the current list view to Excel:
- Open any list view
- Click the Export button in the toolbar
- The export respects your current filters, sorting, and visible columns
The export produces an XLSX file.
From the CLI
dump - export a running app schema back to TypeScript source files:
npx comind dump <app-id> <target-directory>
Converts compiled JavaScript back into editable TypeScript components (fields, actions, views, settings). Useful for migrating apps from the web editor to code-based development.
dumpLint - same as dump, with ESLint auto-formatting:
npx comind dumpLint <app-id> <target-directory>
Managing app source code
push - upload local source files to METAMETA storage:
npx comind push <app-name>
Diffs local files against remote and uploads only changes. Files are formatted with Prettier before upload.
pull - download app source to a local directory:
npx comind pull <app-name> <target-directory>
Use this to start coding an app that was originally created in the web editor.
Zero-code to code workflow
Move an app from the web editor to code-based development:
- Create the app using the web UI editor
- Pull the source:
npx comind pull my-app ./apps/my-app - Customize in your IDE - add fields, actions, views
- Install back to the workspace:
npx comind install my-app WORKSPACE
Changes flow bidirectionally. Web editor changes can be pulled back to code, and code changes deploy via the install command.