Creating and Updating Records
Detailed documentation for record-add and record-update commands
Record-Add Command Documentation
This document provides comprehensive examples for creating records using the record-add command in Keeper Commander. The command supports dot notation for field specification and $JSON: syntax for complex field types.
Note: Keeper Commander supports line continuation using backslash (
\) at the end of lines, allowing you to split long commands across multiple lines for better readability.Important: Do not put spaces after the backslash (
\) character. The line should end immediately with\with no trailing spaces, otherwise empty arguments will be created and cause parsing errors.
Command Syntax
record-add --title "Record Title" --record-type "RECORD_TYPE" [OPTIONS] [FIELDS...]Key Arguments
--title/-t: Record title (required)--record-type/-rt: Record type (required)--notes/-n: Record notes (optional)--folder: Folder path or UID to store the record (optional)--force/-f: Ignore warnings (optional)--syntax-help: Display field syntax help
Field Syntax Overview
Dot Notation Format:
Components:
FIELD_SET: Optional.f(fields) orc(custom)FIELD_TYPE: Field type (e.g., login, password, url, etc.)FIELD_LABEL: Optional field labelFIELD_VALUE: The field value
Special Value Syntax:
$JSON:{"key": "value"}- For complex object fields$GEN- Generate passwords, TOTP codes, or key pairs$BASE64:<base64_string>- Decode base64-encoded values for any string fieldfile=@filename- File attachments
Record Types
Keeper Commander supports two types of records:
Typed Records - Structured records with predefined schemas (login, bankAccount, contact, etc.)
Legacy Records - General records (use
-rt legacyor-rt general)
Field Types and Examples
Simple Field Types
login- Username/login fieldpassword- Password field (masked)url- Website URLemail- Email addresstext- Plain textmultiline- Multi-line textsecret- Masked text fieldnote- Masked multiline textoneTimeCode- TOTP/2FA codesdate- Unix epoch time or date strings
Complex Field Types (use $JSON:)
phone- Phone number with region/typename- Person's name (first, middle, last)address- Physical addresspaymentCard- Credit card detailsbankAccount- Bank account detailssecurityQuestion- Security Q&A pairshost- Hostname/port combinationskeyPair- SSH key pairs
Quick Start Examples
Basic Login Record
Single-line version (safest for copy-paste):
Multi-line version (type manually, don't copy-paste):
Basic Contact with Phone
Scripting and working with multiple records
Keeper Commander allows scripting through run-batch or run commands. The easiest way to get the record JSON template is to create one record in web vault then in Keeper Commander run get UID --format=json that gives the exact format to use for complex object fields in the form $JSON:{"key": "value"} Then you can generate the batch script and run it.
Detailed Examples by Record Type
1. Login Records
2. Bank Account Records
3. Credit Card Records
4. Contact Records
5. Address Records
6. Server Credentials
7. SSH Keys
8. Software Licenses
9. WiFi Credentials
10. Secure Notes
11. Database Credentials
12. Driver's License
13. Passport
14. Health Insurance
15. Membership
16. Birth Certificate
17. Social Security Card
18. Photo Records
19. File Attachments
PAM (Privileged Access Management) Record Types
20. PAM Database
21. PAM Directory
22. PAM Machine
23. PAM User
24. PAM Remote Browser
PAM Environment Example
Each PAM Record belongs to a PAM Configuration which references a Keeper Gateway usually installed in your local network or in a place that provides access to the PAM resources. The following is a good starting point for configuring a new PAM Environment.
Advanced Features
Password Generation
Passphrase generation
Use $GEN:passphrase only on the lowercase password field. Use single quotes around '$GEN:...'.
$GEN:passphrase does not work as Password=. It only works on record types with a built-in password field, such as login, general, serverCredentials, and databaseCredentials.
It does not work on record types without a password field, such as contact. Use record-type-info --list-record <type> to verify whether the record type includes a password field.
Syntax
Parameters
word_countaccepts5through9only.5–9is the Vault-supported range.Values outside that range are rejected.
Invalid values return an error.
separatormust be-,.,_,?,!, orspace.In
$GENsyntax,spis accepted as an alias forspace.capitalizemust be exactlytrueorfalse.numbermust be exactlytrueorfalse.Boolean matching is case-insensitive.
Partial values such as
tr,fa, andtestare rejected.
Valid examples
Passphrase validation and errors
Enterprise policy still controls passphrase-allow, word count, and separator.
Commander defaults capitalization and the first-word digit to on for passphrase generation unless the CLI explicitly sets them to false. This differs from Vault UI when policy has capitals or digit off.
Invalid $GEN syntax blocks the command. The command aborts. No record is created. No record is updated.
--force bypasses password policy warnings only. --force does not bypass $GEN syntax errors.
The following are syntax errors:
Unknown algorithms such as
$GEN:pas,7,_and$GEN:passphra,7,_Invalid separators such as
*,@, and#Trailing commas such as
$GEN:passphrase,9,_,true,Out-of-range word counts
Partial boolean values such as
tr,fa, andtest
Invalid examples
Policy Enforcement
When the logged-in user's enterprise role has policies configured, the following are enforced:
GENERATED_PASSWORD_COMPLEXITY— passwords on the record are validated against the policy (length, lowercase, uppercase, digit, special-character minimums). Violations print warnings and block the operation. Use--forceto override.passphrase-allow— passphrase generation must be allowed by enterprise policy.passphrase-length— passphraseword_countmust stay within the enterprise policy and the Vault-supported5–9range.passphrase-separator— the passphrase separator must resolve to-,.,_,?,!, orspace.RESTRICT_RECORD_TYPES— the value passed to-rt/--record-typeis checked against the user's blocked-type list. Restricted types are rejected up-front with an error. This is a hard block;--forcedoes not bypass it.$GEN— when generating a password inline,$GENuses the complexity policy's length and character-class minimums as defaults instead of hardcoded values.Commander defaults — for passphrase generation, Commander defaults capitalization and the first-word digit to on unless the CLI explicitly sets them to
false.--forcebehavior —--forcebypasses password policy warnings only. It does not bypass invalid$GENsyntax.
TOTP/2FA Generation
SSH Key Generation
Custom Fields
Common Field Reference
Date Formats
Phone Number Format
Name Format
Address Format
Security Questions Format
Self-Destructing Records (One-Time Shares)
The --self-destruct option creates temporary records that automatically delete themselves after being accessed. This is perfect for sharing sensitive information that should only be viewed once.
How Self-Destruct Works
Creates a temporary shareable URL that expires after your specified time
Record stays in your vault until someone opens the share URL
Auto-deletes from your vault 5 minutes after the URL is first accessed
Maximum duration is 6 months
Syntax
Time Units:
morminutes- Minutes (default if no unit specified)horhours- Hoursdordays- Days
Examples
Share temporary password (expires in 1 hour):
One-time WiFi credentials (expires in 30 minutes):
Temporary file share (expires in 24 hours):
Emergency contact info (expires in 2 hours):
JSON output with record UID and share URL:
Return Value
When using --self-destruct, the command returns the record UID on the first line and the shareable URL on the second line:
Use --format=json to return both values as JSON:
Important Notes
⚠️ Security Considerations:
URL is the key - Anyone with the URL can access the record
No authentication required - Share URLs bypass login requirements
One-time access - Record deletes 5 minutes after first view
Cannot be recovered - Once deleted, the record is gone forever
⚠️ Limitations:
Maximum 6 months expiration time
Cannot update self-destructing records
No preview - You can't see the record again after creation
Immediate sharing - URL is active immediately upon creation
Best Practices
Copy the record UID and share URL immediately - You won't be able to retrieve the share URL later
Use short expiration times for maximum security (minutes/hours vs days)
Include context in notes about why the record was created
Share URL through secure channels (encrypted messaging, in person)
Generate strong passwords using
$GENfor temporary accessVerify recipient received URL before the expiration time
Use Cases
Emergency access credentials for system administrators
Temporary passwords for contractors or consultants
One-time document sharing for sensitive files
Guest network credentials for visitors
Secure information handoffs between team members
Time-sensitive shared secrets for automated systems
Tips and Best Practices
Use single-line commands for copy-paste to avoid trailing space issues
Quote JSON values to prevent shell interpretation
Use $GEN for passwords instead of hardcoding them
Use $BASE64: for passwords with special characters (
$,!,",') to avoid shell escaping issuesTest with simple records first before creating complex ones
Use custom fields (c.) for non-standard data
Organize records in folders using the
--folderparameterAdd meaningful notes with
--notesfor context
Troubleshooting
Common Issues
"Expected: =, got: ; Missing ="
Remove trailing spaces after backslashes in multi-line commands
Use single-line format for copy-paste
"Field type not supported"
Check available field types with
record-add --syntax-helpUse custom fields with
c.prefix for non-standard fields
JSON parsing errors
Ensure JSON is properly quoted
Escape single quotes in JSON:
'\''Use double quotes inside JSON objects
File attachment errors
Use
@prefix:file=@/path/to/file.txtEnsure file path is accessible
Use absolute paths to avoid confusion
Record-Update vs Record-Add
While record-add creates new records, record-update modifies existing records. Here's how they compare:
Key Differences
Purpose
Creates new records
Modifies existing records
Record identifier
Not required
Required (-r or --record)
Record type
Required (-rt)
Optional (can change type)
Field behavior
Sets all fields
Updates only specified fields
Notes behavior
Sets notes
Appends with + prefix, overwrites without
Record-Update Syntax
Key Arguments:
--record/-r: Record title or UID (required)--title/-t: Update record title--record-type/-rt: Change record type--notes/-n: Update notes (+textappends,textoverwrites)--force/-f: Ignore warnings
Examples
Update password and URL:
Add a phone number to existing contact:
Append to notes (notice the + prefix):
Update title and add custom field:
Change record type (converts structure):
When to Use Each Command
Use record-add when:
Creating a completely new record
You want to specify all fields from scratch
Setting up initial record structure
Use record-update when:
Modifying existing records
Adding new fields to existing records
Updating passwords or other credentials
Appending information to notes
Converting between record types
Important Notes:
record-updateonly changes the fields you specifyExisting fields not mentioned remain unchanged
Use
field=(empty value) to clear a fieldNotes with
+prefix append, without+they replace
Getting Help
Last updated

