flexkit export
Exports the full dataset of a project — every entity, every asset and its binary file — into a .tar.gz bundle that flexkit import can restore into the same or another project.
Synopsis
flexkit export [dest.tar.gz] [options]Bundle layout
flexkit-export-<projectId>-<date>.tar.gz
├── data.ndjson # one entity per line, in the import file format
├── assets.ndjson # asset metadata (_id, sha256, tags, _file, ...)
└── files/ # asset binaries, named <assetId>.<ext>data.ndjsonlines use the same formatflexkit importaccepts: scalar values inline, asset references as{"_asset": "file://files/<id>.<ext>"}(arrays ordered bysortOrder), and entity relationships as{"_ref": "<entityId>"}.assets.ndjsonpreserves each asset’s_id, metadata,sha256and tag names, so a re-import keeps ids stable and reattaches tags.- Localized attributes export every scope defined in the project’s
scopesconfig. Values that only exist in thedefaultscope stay plain ("name": "Chair"); values with additional scopes are wrapped ("name": {"_scopes": {"default": "Chair", "gb": "Armchair"}}).
Behavior
- Reads the entity types from your local config’s schema and pages through each type with GraphQL queries.
- Downloads every asset file once (deduplicated by asset
_id). - Without
--type, all project assets are bundled — including ones not referenced by any entity. With--type, only assets referenced by the exported entities are bundled. - The default destination is
flexkit-export-<projectId>-<date>.tar.gzin the current directory.
Round trip
Importing an export into an empty project reproduces the dataset:
- Entity
_ids are preserved, so_refrelationships reconnect in the import’s second pass. - Asset
_ids are preserved viaassets.ndjson, and content deduplication avoids storing duplicate file contents; repeated requests may still consume resources.
flexkit export
flexkit import flexkit-export-my-project-2026-07-20.tar.gz --project other-projectOptions
--project <ID>: Select the project when the local config defines several.--type <ENTITY>: Only export the given entity type(s), comma-separated (e.g.--type product,brand).--concurrency <N>: Parallel file downloads (default5).--overwrite: Replace the destination file if it already exists.
Examples
# Export everything
flexkit export
# Export a subset of entity types
flexkit export products.tar.gz --type product,brand
# Refresh an earlier export file
flexkit export backup.tar.gz --overwriteLast updated on