Import Export Commands
This page catalogues and details the usage of import export commands
Overview
Keeper Commander supports several powerful CLI commands for migrating and managing vault data. These commands facilitate data import from various formats, exporting vault contents, and synchronizing shared folder permissions and custom templates.
Commands
The following commands are supported
Import Command
Import records and folders into your Keeper vault from local files or external password managers.
DotNet CLI
Note: The dotnet implementation of this command supports only import of json file only.
Command: import
Flag:
filename : this is name of the file which contains json to be imported into keeper
Exception:
MyVault> import <file_path.json>DotNet SDK
Note: This function supports just json import of records.
Function:
Flag:
importFile: this is dictionary of the objects which constitute individual records or folders etc.
Python CLI
Command : import
Parameters :
name: file name (json, csv, keepass, 1password), account name (lastpass_lib), or URL (Thycotic)
Options:
--display-csv, -dc: display Keeper CSV import instructions--display-json, -dj: display Keeper JSON import instructions--format: {json, csv, keepass, lastpass, 1password, bitwarden, thycotic} file format--dry-run: display records to be imported without importing them--folder: IMPORT_INTO import into a separate folder.--filter-folder: FILTER_FOLDER import data from the specific folder only.-s, --shared: import folders as Keeper shared folders-p, --permissions: PERMISSIONS default shared folder permissions: manage (U)sers, manage (R)ecords, can (E)dit, can (S)hare, or (A)ll, (N)one--record-type: RECORD_TYPE Import legacy records as record type. login if empty--show-skipped: Display skipped records
Example:
Python SDK
Class to use :
To import json records we can use the following class
To import records from LastPass we can use following class
To import records from key pass, we can use following class
This class object can be used as importer object for following functions
Function :
keepersdk.importer.import_utils.py
data source will be the object we have created earlier
Arguments
vault - VaultOnline instance
data_source - Importer Class
import_logger - This is logger object of class ImportData.
Export Command
This command allows you to export your vault data (records, folders, shared folders) from Keeper to your local system.
DotNet CLI
Note: The dotnet implementation of this command supports JSON export of vault data including records, folders, and shared folder information.
Command: export
Flags:
filename (required): Name of the output JSON file to export vault data
--force or -f (optional): Overwrite existing file without prompting
--exclude-shared-folders or -x (optional): Exclude shared folders from export
Examples:
DotNet SDK
Note: This function exports vault records, folders, and shared folder information to JSON format.
Functions:
Export to JSON string:
Export to file:
Flags:
vault: The authenticated VaultOnline instance
filename: Path to the output JSON file
recordUids: Optional list of specific record UIDs to export (null exports all)
includeSharedFolders: Whether to include shared folder information (default: true)
logger: Optional logging callback
Python CLI
Command: export
Parameters:
name: file name or console output if omitted
Options:
--format {json,csv,keepass}: file format--max-size MAX_SIZE: Maximum file attachment file. Example: 100K, 50M, 2G. Default: 10M--file-password FILE_PASSWORD: Password for the exported file--zip: Create ZIP archive for file attachments. JSON only--force: Suppress user interaction. Assume "yes"--folder FOLDER: Export data from the specific folder only.
Example:
Download Membership Command
This command downloads the sharing settings of your shared folders, including:
Which users or teams have access
What permissions they have (read-only, edit, manage)
DotNet CLI
Note: The dotnet implementation downloads shared folder and team membership information for migration purposes. Currently supports only Keeper as the source.
Command: download-membership
Parameters:
--source: Membership source - valid values:keeper,lastpass,thycotic(onlykeeperis currently implemented)
Flags:
filename: Output JSON filename (default:shared_folder_membership.json)--forceor-f: Overwrite existing file; if not set, data will be merged with existing file--folders-only: Download shared folders only, skip teams--permissionsor-p: Force shared folder permissions - values:U(manage users),R(manage records)--restrictionsor-r: Force shared folder restrictions - values:U(manage users),R(manage records)--sub-folder: Shared sub-folder handling - values:ignore,flatten
Examples:
DotNet SDK
Note: This function downloads shared folder and team membership information from the vault.
Functions:
Download to ExportFile object:
Download to JSON string:
Download to file:
Merge with existing file:
DownloadMembershipOptions:
FoldersOnly: Include only shared folders, skip teams (default: false)
ForceManageUsers: Force manage users permission for all users (nullable bool)
ForceManageRecords: Force manage records permission for all users (nullable bool)
SubFolderHandling: Subfolder handling mode - values:
"ignore","flatten"
Flags:
vault: The authenticated VaultOnline instance
filename: Path to the output JSON file
options: Configuration options for the download operation
logger: Optional logging callback
PowerCommander
Command : Export-KeeperMembership
Flags:
-FileName(Optional, default:shared_folder_membership.json) - Output JSON filename. Extension.jsonadded automatically if not specified.-Force(Optional) - Overwrite existing file. Without this flag, data is merged with existing file.-FoldersOnly(Optional) - Download shared folders only, skip teams-ForceManageUsers(Optional) - Force enable 'manage users' permission for all users in all shared folders-ForceManageRecords(Optional) - Force enable 'manage records' permission for all users in all shared folders-RestrictManageUsers(Optional) - Force disable 'manage users' permission for all users in all shared folders-RestrictManageRecords(Optional) - Force disable 'manage records' permission for all users in all shared folders-SubFolderHandling(Optional) - Shared sub-folder handling. Valid values:ignore,flatten
Notes:
Cannot specify both
-ForceManageUsersand-RestrictManageUsersCannot specify both
-ForceManageRecordsand-RestrictManageRecordsIf output file exists and
-Forceis not used, new data is merged by UID (new entries override, additional entries preserved)Parent directories are created automatically if they don't exist
Example:
Python CLI
Command: download-membership
Parameters:
--source {keeper,lastpass,thycotic}: Shared folder membership source
Options:
-p, --permissions: PERMISSIONS force shared folder permissions: manage Users(U), manage Records(R).-r, --restrictions: RESTRICTIONS force shared folder restrictions: manage Users(U), manage Records(R).--folders-only: Unload shared folders only. Skip teams--sub-folder, -sf {ignore,flatten}: hared sub-folder handlingname: Output file name. "shared_folder_membership.json" if omitted.
Example:
Apply Membership Command
This command restores or applies shared folder permissions from a JSON file created by download-membership.
Add the correct users/teams to folders
Set their permissions automatically
Python CLI
Command: apply-membership
Parameters:
name: Input file name. "shared_folder_membership.json" if omitted
Options:
--full-sync: Update and remove membership also.
Example:
Download Record Types Command
This command downloads your custom record types (templates you use for special data like server logins, SSH keys, etc.) into a JSON file.
DotNet CLI
Command: download-record-types
Flag:
source: this is source from which we are pulling record types from
Example:
PowerCommander
Command : Export-KeeperRecordTypes
Flag :
Source- currently onlykeeperis supported.FileName- file name to store the data to, this can be file path too.SSHKeyAsFile- whether to store ssh keys as files or to store them as data, when set to true, files will be download.
Example:
Python CLI
Command : download-record-types
Parameters :
--source {keeper}: Record Type Source. Only "keeper" is currently supported.
Options:
--ssh-key-file: Prefer store SSH keys as file attachments rather than fields on a record--name: NAME Output file name. "record_types.json" if omitted.
Example:
Load Record Types Command
This command uploads your custom record types from a JSON file into Keeper.
Created templates in another account
Want to standardise templates across teams
DotNet CLI
Command : load-record-types
Flag :
--help: Display this help screen.--version: Display version information.<paraeter at position one>- File path to load record type from
Example:
PowerCommander
Command: Import-KeeperRecordTypes
Flag:
-FilePath: File path for the record type file.
Example:
Last updated
Was this helpful?

