SuperAPI AI Directory

lark-sheets

Office & productivity

View repository

Updated 10-13 20:09

About this skill

sheets

CRITICAL — Before starting, MUST first use the Read tool to read ../lark-shared/SKILL.md, which contains authentication and permission handling.

Scenario → Command Quick Reference

Select the row based on the current action; the next step MUST Read the reference for that row, and no command may be executed until the read is complete. Read only the matching documents; when cross-cutting actions such as formulas / styles are involved, then read the corresponding specifications; enumerating the directory as a substitute for Read is prohibited.

What you need to do ✅ Correct way Read before acting (Read first, then act)
Read data +csv-get(pure values/CSV),+cells-get(formulas/styles/comments) Read references/lark-sheets-read-data.md
Write data +csv-put(plain text with no type ambiguity),+table-put(typed; quantities/real dates; for labels/IDs/leading zeros/text numbers use object, bare csv-put is prohibited),+cells-set(formulas/rich writes),+cells-set-style(styles),+cells-set-image(in-cell images) Read references/lark-sheets-write-cells.md
Format inheritance (new columns/new rows) For physically inserting rows / columns use +dim-insert --inherit-style before|after; to extend writing into an existing blank area use +range-copy --paste-type formats to lay down styles first, then write values Read references/lark-sheets-range-operations.md; after inserting rows or columns, then read references/lark-sheets-sheet-structure.md
Workbook operations +workbook-create、+workbook-info、+workbook-import、+sheet-copy、+revision-get、+workbook-export Read references/lark-sheets-workbook.md
Row and column operations For sorting use +range-sort atomic whole-row moves; for merging / unmerging use +cells-merge / +cells-unmerge; only use +cells-clearto clear contents; for dimensions use +cols-resize / +rows-resize Read references/lark-sheets-range-operations.md; if structural layout is involved, then read references/lark-sheets-sheet-structure.md
Beautification and finishing +styles-put Read references/lark-sheets-styles-put.md
Worksheet structure +sheet-info、+dim-insert; to delete entire rows / columns use +dim-delete, clear cannot be used as a substitute Read references/lark-sheets-sheet-structure.md
Create charts / visualization / bar chart / line chart / pie chart / trends / proportions For a single chart use +chart-create-basic, for multiple charts use +batch-chart-createwith flat input; to change the data source of an existing chart use +chart-data-update, for configuration use +chart-config-update; only use +chart-create / +chart-updatefor single-series / single-data-point / advanced fields that semantic shortcuts cannot express, and submit only the necessary local properties. Before acting, first assert each chart's type, horizontal-axis field, grouping field, and target number of charts; after drawing, +chart-list verify item by item; after migrating images into real charts, delete and recheck the original floating images Read references/lark-sheets-chart.md; if pivot / grouped aggregation is involved, then read references/lark-sheets-pivot-table.md
Grouped aggregation / pivot +pivot-create Read references/lark-sheets-pivot-table.md
Filtering / showing only rows that meet the criteria +filter-create Read references/lark-sheets-filter.md
Find / replace text +cells-search、+cells-replace Read references/lark-sheets-search-replace.md
Conditional formatting / conditional highlighting / data bars / color scales For coloring that changes with the data use +cond-format-create; fixed coloring is only used when the user explicitly asks for static coloring Read references/lark-sheets-conditional-format.md
Illustrations: freely placed decorations +float-image-create Read references/lark-sheets-float-image.md
Sparklines / in-cell trend lines +sparkline-create Read references/lark-sheets-sparkline.md
Batch clear multiple regions +cells-batch-clear Read references/lark-sheets-batch-update.md(high-risk)
Review edit changes / get differences between versions +changeset-get Read references/lark-sheets-changeset.md
Save multiple filter states / named filter views +filter-view-create; the view and +filter-create are independent of each other and can coexist in the same subtable Read references/lark-sheets-filter-view.md
Check edit history / roll back to a historical version +history-list get the version,+history-revert(high-risk, asynchronous) after rollback use +history-revert-status to poll Read references/lark-sheets-history.md

⚠️ Amounts / percentages / ratios / counts and real dates involved in calculations are written as numbers (for percentages pass 0.4 + number_format); date labels, IDs, leading zeros, ID card / document numbers are written as text.--range write only A1:B2, pass --sheet-id / --sheet-name。

Feishu Sheet editing guidelines

  1. Minimal changes: when the user has not explicitly asked to delete / rename / hide anything, leave every existing Sheet untouched; fill only blanks, and do not change values / structure / formatting that were not requested.
  2. Target subtable and read-back assertions: first confirm the real last row and target range; when no subtable is named, only select from the visible grid candidates of resource_type=sheet && is_hidden=false , and only use it automatically if it is the only one; when there are multiple, do not guess by index. When "all / every sheet" is involved (cross-sheet aggregation, batch cleaning, merging multiple subtables), first +workbook-info list them all and then process one by one; do not do only the first few. After writing, use +csv-get / +cells-get / +<对象>-list to verify the first, middle, last, and user-named items—returning ok only means the request succeeded. Before plain CSV write-back, remove annotated_csv 's [row=N] prefix; handlecells-get 's style fields separately from values, and formulas must be read back formula。styles must also be read back: for anything where borders / background color / font color / number format / row height and column width / freezing were written, at the end use +cells-get --include style or +sheet-info to spot-check the first, middle, and last cells of the target range to confirm the attributes are actually there—a write returning ok does not mean the style was applied; for anything missing, resend the whole thing (styles are an idempotent stamp, and resending has no side effects).
  3. Formula closed loop: for derivable values, write the landing-cell formula; do not substitute a static value—use Python to calculate the value and then write it into the cell, and what is delivered is a dead sheet that does not recalculate when inputs change; Python is only used for derivation and verification, and what lands in the cell must be a formula that references other cells. Before writing, confirm the field semantics, threshold boundaries (at or above / at least =>=, exceeding / greater than =>), units/time zone, and the complete source range; choose the first, middle, and last, blanks, boundaries, and one manually calculable record as sentinels; after writing, segment by segment +formula-verify --exit-on-error, and only when each segment status='success' and the sentinel values are correct is it complete (AI formula exception: asynchronous calculation, instead use +formula-verify --ai-only to do one asynchronous status check on the entire written range; do not use +cells-get to poll the result, and afterfailed is cleared, it can be delivered and explained even if there are still pending items); after 3 failed attempts, you may downgrade to a static value, and the delivery note must state "static value + failure reason + does not update with source data".
  4. Fully inherit styles: when adding rows or columns, do not read only values and write only values—the original sheet's font, alignment, background color (including alternating odd/even rows), and all four borders must continue into the new range.Physically insert rows / columnsuse +dim-insert --inherit-style before|after(native inheritance, more reliable than repainting);Extend writing into an existing blank area(for example, adding a new column to the right of the data) use +range-copy --paste-type formats to lay down styles first and then write values; only for irregular styles that neither can express, use +cells-get --include style The style of the source range is written back along with the value. Regardless of which path is taken, after insertion also check the row height and column width separately (row height is not inherited with the style; before inserting rows to fill long text, supplement +rows-resize), and complete merges and cross-column headers. See references/lark-sheets-write-cells.md。
  5. Atomic operations: For sorting use +range-sort,--range to cover the full record width; the sort column only writes into --sort-keys; for deleting records use +dim-delete, and only for clearing content / formatting use +cells-clear; it is forbidden to read values and then use +csv-put to overwrite in order to simulate sorting / deletion. Use high-risk only when crossing types and there is an order dependency +batch-update。
  6. Color-coding routing: Highlights / red marks that should be automatically recalculated after data changes use conditional formatting; fixed annotations with already-determined results use static styles; decorative beautification follows the visual specification. The two paths use the same criterion for color fields: in the user's Chinese context, "标红 / 染色 / 标记" refers tocell background color, and "文字红 / 字体红 / 把字变红" uses font color; when there is no explanation by default, choose background color. After creating conditional formatting, first +cond-format-list verify the rule and range, then +cond-format-result-get spot-check the matching style of sentinel cells.
  7. Artifacts can be verified: Sheet names and counts, headers, titles, legends, file names, and scopes named by the user are preserved verbatim; every "completed" item in the reply can be traced to an artifact, and gaps are declared item by item.
  8. Replacement and addition: After batch replacement / deletion, search to confirm there is no residue; newly added columns must have headers, with units / scopes placed separately, not occupying original headers or data cells.
  9. Do not fabricate: Off-table data must have a verifiable source. Do not use common sense or name inference to fabricate companies, standard values, market conditions, or regulatory parameters;if there is no source, leave it blank—values filled in from memory are likely to fail to match the real values, which is worse than leaving them blank. For blank cells, list the cell addresses and the missing sources item by item in the delivery notes; do not just write "some data is missing."

🤖 For text-based NLP tasks, prefer AI formulas; do not default back to manual / Python: As long as you performtranslation / sentiment / classification labeling / information extraction / summarization / polishingand other NLP on text columns, on Feishu online sheets prefer using native =AI(prompt, range) spread column by column (syntax is the same as ordinary formulas, see references/lark-sheets-formula-translation.md); once written to the sheet, it calculates automatically along with the rows, which is easier than reading item by item → manual judgment → write-back / using Python to call a model and then write static values.The criterion is "row-by-row independence": If each target cell depends only on the same row's input, it is row-by-row independent.Data volume (even 10,000+), batching, and judgment complexity do not change this determination—under large data volumes, AI formulas are still the first choice; batching only changes the batch size for spreading the formula (when there are many rows, process serially in batches, with a reference magnitude of a few hundred to one thousand rows per batch). It must not be changed to "using Python or rule scripts to generate semantic results and then statically write them back"; Python can only do cleaning / row-number mapping / constructing formula batches, and must not read source text to generate target semantic values. Only cross-row tasks where a single result depends on multiple rows' input take the non-formula route. AI formulas calculate asynchronously; after writing, first performonce +cells-get --include formula verification of the text on the seed cell / first cell, and thenthe first verification entry point must be +formula-verify --ai-only --range <整个写入区间>; it is forbidden to use +cells-get to poll calculation results; the criterion is ai_formula_failed_count == 0(--range It is only passed through to the backend and does not guarantee narrowing the summary scope. Verify this interval by the returned cell positions; do not compare the total against the expected number of rows), and once satisfied, it can be delivered even if there are still pending items, and inform the user that "the AI formula is still running in the background".

Process: understand the structure → (if not named, first locate by visible_grid selection) → read data → write with native tools → read back and verify the items named by the user → deliver online. For tasks such as organizing / beautifying / adding summary rows that change the table length or layout, freeze the header row at the end (do not change the original table if it already has freeze settings). xlsx acceptance is only run when processing a local xlsx, or when the user names a local xlsx / download / print.

References

reference is divided into two groups: first readGeneral methods and standards(styles / formula rules that cut across all tasks), then enter by operation object intoTool referenceCheck the specific shortcut. For editing tasks, be sure to go through the general methods and standards first; together with the "Feishu Sheets editing guidelines" above, they apply to all tool references without exception.

General methods and standards (read first, cut across all tasks, does not include specific shortcut)

Reference Description
Feishu Sheets style and color scheme standards Feishu Sheets style and color scheme standards: value standards such as colors, font sizes, alignment, borders, and number formats for the header / data area / summary row, as well as the decision process and style points for typical scenarios such as layout beautification when creating a new table from scratch, adding summary rows, inheriting the original table style when appending rows and columns, and beautifying existing areas. For details of tool call parameters, please refer to the corresponding lark-sheets-write-cells / lark-sheets-range-operations / lark-sheets-batch-update. For conditional formatting (highlighting, red marking, data bars, color scales), please use lark-sheets-conditional-format.
Feishu Sheets formula generation rules Migration and generation rules from Excel formulas to Feishu Sheets formulas. The core goal is not to preserve the original Excel syntax, but to rewrite the formula according to Feishu Sheets executable rules, and align with Excel as much as possible in the result. Use when the user asks to rewrite Excel formulas into Feishu Sheets formulas, or needs to generate Feishu formulas (especially involving ARRAYFORMULA, array semantics and row-by-row filling, native array functions, INDEX/OFFSET, MAP/LAMBDA, date differences, multi-level range results and secondary expansion). This document is responsible for writing the formula correctly; after writing to the table, it must use references/lark-sheets-formula-verify.md to diagnose the formula range segment by segment for this instance.

Tool reference by object (including shortcut)

Reference Description
Lark Sheet Formula Verify Formula writing / batch filling / --copy-to-range expansion / completion check after importing a workbook containing formulas. For ordinary formulas, scan segment by segment according to the range added or modified this time, combining compilation failures and the 7 types of runtime errors;partial continue splitting until all status='success' are complete. For AI formulas, use --ai-only to perform one asynchronous status check on the entire written range; pending can be delivered after explanation.
Lark Sheet Workbook Manage the workbook structure of Feishu Sheets (subsheet list and metadata). Use when the user mentions "see what this table has", "table structure", "what sheets are there", "create a new sheet", "delete this worksheet", "rename", "make a copy", "move to the front".
Lark Sheet Sheet Structure Manage the subsheet structure and layout of Feishu Sheets: view row height and column width, hide, merge, freeze and group, and perform physical structure operations such as inserting / deleting / moving rows and columns. For data grouping statistics, use lark-sheets-pivot-table. For appending at the end of an ordinary table, prefer using lark-sheets-write-cells's +table-put --mode append Auto-locate the last row; use this reference first only when the user explicitly requests physically inserting rows/columns, inheriting a template structure, or expanding the layout.
Lark Sheet Read Data Read cell data from a Feishu sheet. Use when the user needs to "look at the data", "analyze the data", or "count/summarize"; also applies to scenarios that require viewing formulas, styles, comments, and other detailed information.
Lark Sheet Search & Replace Search for and replace text in a Feishu sheet, supporting range restriction, case matching, exact matching, and regular expressions. Use when the user needs to "find", "search for", or "locate" a value, or to "replace", "batch modify text", or "change A to B". Do not use it to understand the sheet structure (you should read the data), do not use it for data analysis (you should read the data and then calculate), and do not treat keywords in the user's action description (such as "summarize the amount" or "count the quantity") as search terms.
Lark Sheet Write Cells Batch write values, formulas, styles, comments, or cell images to a specified range in a Feishu sheet. For plain text, use +csv-put; for amounts, percentages, dates, booleans, counts, and columns that will later participate in aggregation, use +table-put and explicitly declare dtypes/formats; for formulas or rich fields, use +cells-set. Appending data can directly use +table-put --mode append; go through lark-sheets-sheet-structure first only when physically inserting rows/columns is explicitly required. After a formula is written to the sheet, lark-sheets-formula-verify must be run.
Lark Sheet Range Operations Perform structural operations on a specified range in a Feishu sheet (without writing cell data values). Applicable scenarios: clearing content or formatting ("clear", "delete content", "remove formatting"), merging/unmerging cells, adjusting row height and column width ("widen the column", "auto-fit column width"), moving/copying/filling/sorting data ("move data", "copy to", "auto-fill", "sort by a column"). To write cell data, use lark-sheets-write-cells.
Lark Sheet Styles Put Apply a declarative visual specification (styles/borders/merges/row height and column width/freeze) in a single submission across multiple sub-sheets of an existing Feishu sheet, with the entire specification submitted at once. Use when the task is to polish existing sheets, batch-apply styles, or unify the layout. For style value standards, see lark-sheets-visual-standards; to create a new sheet with styles, go through lark-sheets-workbook (+workbook-create --styles), and to write data while applying styles, go through lark-sheets-write-cells (+table-put --styles). All three share the same --styles vocabulary. Applies only to Feishu sheets.
Lark Sheet Batch Update Combine multiple Feishu sheet write operations into a single batch execution, completing them sequentially in order. Suitable for scenarios that require executing multiple write operations consecutively (such as modifying the structure first and then writing data).
Lark Sheet Chart Manage charts in a Feishu sheet (column charts, line charts, pie charts, bar charts, area charts, scatter charts, combo charts, radar charts, etc.). Use when the user needs to create a chart, modify chart styles or data sources, view existing chart configurations, or delete charts. Also applies to data visualization-related scenarios in which the user mentions "data visualization", "draw a chart", "trend analysis", "comparison chart", "proportion analysis", "make a chart", etc.
Lark Sheet Pivot Table Manage pivot tables in a Feishu sheet. Use when the user needs to create a pivot table, modify a pivot table's row/column fields/aggregation method/filter conditions, view existing pivot table configurations, or delete a pivot table. Also applies to scenarios in which the user mentions "grouped summary", "cross-tabulation analysis", "statistics by XXX", "group by field", "group it further", "multidimensional analysis", "data pivot", etc.
Lark Sheet Conditional Format Manage conditional formatting rules in Lark Sheets (duplicate value highlighting, cell value comparison, data bars, color scales, rankings, custom formulas, etc.). Use when the user needs to create conditional formatting, modify the range or style of existing rules, view the current conditional formatting configuration, or delete rules. Also applies to scenarios where the user mentions "highlight", "mark in red", "color tagging", "data bars", "color scales", "conditional styles", etc.
Lark Sheet Filter Manage filters in Lark Sheets. Use when the user needs to filter data (filter rows by text/numeric/color/date conditions), view existing filter configurations, modify or delete filters. Also applies to scenarios such as "show only", "filter out", "keep only rows that meet the criteria", etc.
Lark Sheet Filter View Manage filter views in Lark Sheets. Use when the user needs to "create an XX view", "save this filter state", "switch between different filters", or maintain multiple independent filter configurations on one sheet. Views and filters are independent of each other and can coexist on the same sheet; rows hidden by a view take effect locally only when the user enters that view and do not affect other collaborators.
Lark Sheet Sparkline Manage sparklines in Lark Sheets (line sparklines, column sparklines, win/loss sparklines). Use when the user needs to embed small charts within cells to show data trends. Also applies to scenarios such as "trend line", "in-cell chart", "sparkline", etc. Note: this is not the same as the disabled SPARKLINE() formula function.
Lark Sheet Float Image Manage floating images in Lark Sheets. Use when the user needs to insert floating images into a sheet, adjust image position and size, view existing floating images, or delete images. Also applies to scenarios such as "insert an image", "add a logo", "put an image", etc. Note: if the user needs to embed an image inside a cell (cell image), please read lark-sheets-write-cells.
Lark Sheet History Query the historical versions of a Lark Sheet and roll back to a specified version. Use when the user needs to view the list of edit history versions of a sheet, roll back to a historical version, or query the asynchronous status of a rollback (in progress/succeeded/failed). Rollback is an asynchronous operation; after initiating it, poll the result via status query. Only applies to Lark Sheets.
Lark Sheet Changeset Read the changeset (raw list of change operations) between two versions (CS revisions), used to review whether a certain edit—especially an AI edit—truly satisfies the user's requirements. Pass in the starting version (the baseline before the edit), optionally an ending version (if omitted, the latest is used); the version difference limit is 20; the outermost level of the return contains the current sheet's latest version number. Use when the user needs to "see what was changed this time", "verify AI changes", or "compare the changes between two versions".

Common flag quick reference

Under the shortcut title of each reference, use a one-line badge to indicate the supported common / system flags (such as _公共四件套 · 系统:--dry-run_). type / required / description are uniformly declared in this section:

Common flags (resource locators)

Common four-piece set = --url / --spreadsheet-token / --sheet-id / --sheet-name, divided into two XOR groups,each group must provide exactly one(XOR = exactly one of the two is required, not "optional")—spreadsheet refers to the workbook,sheet refers to the subtable; objects such as conditional formatting / charts / filter views / pivot tables / sparklines / floating images use their own --*-id outside the four-piece set for locating:

  1. spreadsheet locator (required):--url(parses /sheets/、/spreadsheets/、/wiki/ three types of links; wiki links automatically locate the spreadsheet behind them) and --spreadsheet-token(bare token), choose one.Exception:+workbook-create / +workbook-import outputdoes not exist yettables do not accept any positioning flag.
  2. sheet positioning (required for the common four-piece shortcut set):--sheet-id and --sheet-name ; choose one.
    • ⚠️ When unsure of the sheet name, do not guess Sheet1: unless a specific value has already appeared in the conversation or context, first +workbook-info to get sheets[].sheet_id/title and then choose—subsheets of Chinese workbooks are often named "数据"/"工作表 1"/a business name, and guessing the name will most likely hit sheet not found。
    • ⚠️ --range the Sheet1! prefix cannot replace sheet positioning: you must still pass --sheet-id / --sheet-name。
    • ⚠️ When an A1 reference contains ! , wrap the whole thing in single quotes(--range 'Sheet1!A1:B2', to block bash history expansion; do not use set +H, which is illegal under sh/dash). If the sheet name needs to be wrapped in single quotes again inside the A1, use '\'' to escape.
    • Exception: shortcuts marked with the badge _公共:URL/token(无 sheet 定位)…_ do not accept sheet positioning—workbook-level (+workbook-info / +sheet-list / +sheet-create / +revision-get / +changeset-get / +history-list|revert|revert-status), batch and whole-table level (+batch-update / +batch-chart-create|update / +cells-batch-clear / +styles-put / +dropdown-update|delete), and +table-put。+workbook-export with the subsheet name written in the payload only accept --sheet-id(with no --sheet-name),+pivot-create use --target-sheet-id/name(XOR, you may omit both). The badge is the criterion; this line is only a shorthand.
# 统一调用范式:两组定位缺一不可(占位符别原样填;表名先 +workbook-info 查)
lark-cli sheets +csv-get --url "https://.../sheets/shtXXX" --sheet-name "<真实表名>" --range "A1:F30"

System flag

Flag Type Required Description
--dry-run bool No Zero side effects: only prints the request path and parameter template, does not make a call
--yes bool Yes (only high-risk-write) second confirmation; exit code 10 when omitted. See ../lark-shared/SKILL.md high-risk approval protocol
--print-schema bool No If the structure is uncertain before writing a composite JSON flag, run it first: it prints the Schema locally and exits (without making a call and without needing other required flags), paired with --flag-name to specify which flag to inspect; when omitted, it lists the flags that can be inspected for that shortcut. Only shortcuts containing composite JSON flags support this.
--flag-name string No Used with --print-schema: the flag name does not carry the -- prefix (cells / properties)。supports dot-separated path slicing:--flag-name properties.snapshot.plotArea.axes only prints that subtree; for large schemas (chart's properties is about 1700 lines), fetch on demand instead of paging through the whole thing.

bool flag syntax: to enable, you may use bare --flag; for explicit values use only --flag=true or --flag=false, and do not separate with a space.

⚠️ high-risk-write command list (exit 10 mandatory confirmation gate):+batch-update、+cells-clear、+cells-batch-clear、+sheet-delete、+dim-delete、+dropdown-delete、+history-revert(roll the whole table back to a historical version), as well as deletion of each object +chart-delete / +pivot-delete / +cond-format-delete / +filter-delete / +filter-view-delete / +sparkline-delete / +float-image-delete。

Approval protocol: first --dry-run to preview, show the user the operation to be performed and its scope of impact,after obtaining the user's explicit consentthen append --yes to the original command and execute. Without the user's consent, do not include --yes, and do not silently add --yes to retry after exit 10—that is equivalent to disabling the gate. See the full protocol in ../lark-shared/SKILL.md。

Boundaries of the Schema:--print-schema prints the internal structure of the flag value; when the flag description requires an outer envelope (such as --sheets of {"sheets":[…]}), that layer is not visible in the schema, so add it according to the description; the ## Schemas section of the reference also gives only one layer. For charts, directly +chart-create --print-example <type> Modify parameters using the minimal usable template.

Flag content types and output conventions (terminology quick reference)

  • JSON-type input parameters fall into three categories:Composite JSON = deeply nested objects (--print-schema can be queried);Simple JSON = one- or two-dimensional scalar arrays;Non-JSON text = raw text (e.g. CSV).
  • envelope: all shortcuts return a unified outer {ok, identity, data, ...}; write operations do not automatically read back, so validate by calling +*-list / +*-get / +cells-get。
  • Large payloads go through files / stdin, not inlined on the command line: The flag labeled Type File + Stdin supports --flag "@./x.json"(@file only accepts relative paths under cwd; absolute paths are rejected) and --flag -(stdin); when a payload contains newlines / quotes or is large in size, always write it to a file.stdin can only be given to one flag per invocation——+table-put 's --sheets and --styles are both large JSON, one goes through -, and the other goes through @./x.json. Do not put temporary files into the user's project directory.
  • Adaptation for non-POSIX shells (PowerShell / cmd.exe): All bash code blocks in this skill (heredoc <<'JSON', single-quote escaping '\'') apply only to bash / zsh. Determine the current shell before starting; in non-POSIX environments, rewrite according to the table below,do not change quotes by trial and error——@file(cwd-relative path) is the fallback form with no quoting issues on all platforms:
Form bash / zsh PowerShell cmd.exe
Large / multi-line JSON --flag - <<'JSON' … JSON First write a UTF-8 file without BOM, then --flag '@./x.json', or Get-Content -Raw ./x.json | lark-cli … --flag - first write a file, then --flag @./x.json(cmd has no heredoc / reading files through pipes is unreliable)
Single-line inline JSON --flag '{"a":1}' --flag '{"a":1}'(PS single quotes are also literals) Do not inline—cmd will swallow the inner double quotes; always use @file