Memberstack CLI

Records

Manage data table records in your Memberstack application.

View Markdown
memberstack records <subcommand> [options]

records create

Create a new record in a data table.

memberstack records create <table_key> --data <key=value> [options]

Arguments

ArgumentDescriptionRequired
table_keyTable key or IDYes

Options

OptionDescriptionRequired
--data <key=value>Record field data (repeatable)Yes

Example

memberstack records create products --data name=Widget --data price=29.99

records update

Update a record in a data table.

memberstack records update <table_key> <record_id> --data <key=value> [options]

Arguments

ArgumentDescriptionRequired
table_keyTable key or IDYes
record_idRecord IDYes

Options

OptionDescriptionRequired
--data <key=value>Record field data (repeatable)Yes

Example

memberstack records update products rec_abc123 --data price=39.99 --data status=active

records delete

Delete a record from a data table.

memberstack records delete <table_key> <record_id>

Arguments

ArgumentDescriptionRequired
table_keyTable key or IDYes
record_idRecord IDYes

Example

memberstack records delete products rec_abc123

records query

Query records using a JSON query body.

memberstack records query <table_key> --query <json>

Arguments

ArgumentDescriptionRequired
table_keyTable key or IDYes

Options

OptionDescriptionRequired
--query <json>Query body as a JSON stringYes

Examples

# Fetch first 10 records
memberstack records query products --query '{"pagination":{"first":10}}'

# Filter records by field value
memberstack records query products --query '{"filter":{"fieldFilters":{"status":{"equals":"active"}}}}'

# Paginate with cursor
memberstack records query products --query '{"pagination":{"first":10,"after":"cursor_abc"}}'

records count

Count records in a data table.

memberstack records count <table_key>

Arguments

ArgumentDescriptionRequired
table_keyTable key or IDYes

Example

$ memberstack records count products
Total records: 256

records find

Find records with a friendly filter syntax.

memberstack records find <table_key> [options]

Arguments

ArgumentDescriptionRequired
table_keyTable key or IDYes

Options

OptionDescription
--where <clause>Filter clause: "field operator value" (repeatable)
--take <n>Limit number of results

Supported Operators

equals, not, in, notIn, lt, lte, gt, gte, contains, startsWith, endsWith

Examples

memberstack records find products --where "status equals active" --take 10
memberstack records find products --where "price gte 20" --where "category equals electronics"
memberstack records find products --where "name contains widget" --take 20

records export

Export all records from a data table.

memberstack records export <table_key> [options]

Arguments

ArgumentDescriptionRequired
table_keyTable key or IDYes

Options

OptionDescriptionDefault
--format <format>Output format: csv or jsonjson
--output <path>Output file pathrecords-{tableKey}.json or .csv

Examples

memberstack records export products
memberstack records export products --format csv --output products.csv

Exported CSV files flatten nested fields with data.* prefixes.

records import

Import records into a data table from a file.

memberstack records import <table_key> --file <path>

Arguments

ArgumentDescriptionRequired
table_keyTable key or IDYes

Options

OptionDescriptionRequired
--file <path>Input file path (CSV or JSON)Yes

File Format

CSV column headers can optionally use the data.* prefix. Both name and data.name are accepted.

Examples

memberstack records import products --file records.csv
memberstack records import products --file records.json

records bulk-update

Bulk update records from a CSV or JSON file.

memberstack records bulk-update --file <path> [options]

Options

OptionDescriptionRequired
--file <path>Input file with record updatesYes
--dry-runPreview changes without applying themNo

File Format

Required fields: id

Optional fields: data.* fields

Examples

memberstack records bulk-update --file updates.csv
memberstack records bulk-update --file updates.csv --dry-run

records bulk-delete

Bulk delete records matching a filter.

memberstack records bulk-delete <table_key> [options]

Arguments

ArgumentDescriptionRequired
table_keyTable key or IDYes

Options

OptionDescription
--where <clause>Filter clause: "field operator value" (repeatable)
--dry-runPreview deletions without applying them

Examples

memberstack records bulk-delete products --where "status equals archived"
memberstack records bulk-delete products --where "price lt 5" --dry-run

FAQ

How is this guide?

Last updated on

On this page