SuperAPI AI Directory

lark-sheets

General & other

View repository

Updated 10-15 21:41

About this skill

sheets

CRITICAL — Before starting, you 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 according to the current action; the next step must be to Read the reference for that row, and commands must not be executed before the reading is complete. Only read the documents that are hit; when there are cross-cutting actions such as formulas / styles, read the corresponding specifications as well. Enumerating the directory is prohibited in place of Read.

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(pure text without type ambiguity),+table-put(typed; quantities/real dates; labels/IDs/leading zeros/text numbers use object, bare csv-put prohibited),+cells-set(formulas/rich writing),+cells-set-style(styles),+cells-set-image(cell images) Read references/lark-sheets-write-cells.md
Format inheritance (new columns/new rows) For physically inserting rows / inserting columns use +dim-insert --inherit-style before|after; for extending writing into an existing blank area use +range-copy --paste-type formats to lay out styles first and then write values Read references/lark-sheets-range-operations.md; after inserting rows and columns 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 to atomically move entire rows; for merge / unmerge use +cells-merge / +cells-unmerge; only for clearing content use +cells-clear; for sizing use +cols-resize / +rows-resize Read references/lark-sheets-range-operations.md; if structural layout is involved read references/lark-sheets-sheet-structure.md
Beautification and finishing +styles-put Read references/lark-sheets-styles-put.md
Subsheet structure +sheet-info、+dim-insert; to delete entire rows / columns use +dim-delete, and clear cannot be used instead Read references/lark-sheets-sheet-structure.md
Draw charts / visualization / bar chart / line chart / pie chart / trends / proportions For a single chart use +chart-create-basic, for multiple charts use the flat-input +batch-chart-create; to change an existing chart's data source use +chart-data-update, for configuration use +chart-config-update; only for single series / single data point / advanced fields that semantic shortcuts cannot express use +chart-create / +chart-update, 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 check item by item; after migrating images into real charts, delete them and recheck the original floating images Read references/lark-sheets-chart.md; if pivots / grouped summaries are involved, read references/lark-sheets-pivot-table.md
Grouped summary / pivot +pivot-create Read references/lark-sheets-pivot-table.md
Filter / only view rows that meet the conditions +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 for static coloring that the user explicitly requests Read references/lark-sheets-conditional-format.md
Illustration: Freely positioned 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 ranges +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; views and +filter-create are mutually independent and can coexist in the same subtable Read references/lark-sheets-filter-view.md
Query edit history / Roll back to a historical version +history-list Get 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 true dates involved in calculations are written as numbers (percentages passed as 0.4 + number_format); date labels, IDs, leading zeros, ID card / document numbers are written as text.--range Only write A1:B2, for subtables pass separately --sheet-id / --sheet-name。

Feishu Sheet Editing Guidelines

  1. Minimal changes: when the user has not explicitly asked to delete / rename / hide, leave existing Sheets untouched; fill in only blank cells, and do not touch values / structure / formatting that were not requested to be adjusted.
  2. Target subtable and read-back assertions: first confirm the actual last row and target range; when no subtable is named, only choose from the visible grid candidates of resource_type=sheet && is_hidden=false , and use automatically only if it is unique; if 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 them 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 writing back pure CSV, remove annotated_csv 's [row=N] prefix; handlecells-get 's style fields separately from values; formulas must be read back formula。Styles must also be read back: for those where borders / background color / font color / number format / row height and column width / freeze have been 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 really there—a write returning ok does not mean the styles were applied; resend the whole thing for anything missing (styles are an idempotent stamp, and resending has no side effects).
  3. Formula closed loop: write cell formulas for derivable values, do not substitute static values—calculate the values in Python and then write them into cells, 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 cells must be formulas that reference other cells. Before writing, confirm field semantics, threshold boundaries (at or above/at least=>=, exceeding/greater than=>), units/time zones, and the complete source range; choose the first, middle, and last, empty values, boundaries, and one manually calculable record as sentinels; after writing, check segment by segment with +formula-verify --exit-on-error, and only when each segment's 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 results, and afterfailed is cleared, it can be delivered and explained even if there are still pending items); if it still fails after 3 trial-and-error attempts, you may downgrade to static values, and the delivery note must state "static values + 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 four borders must all extend to the new range.Physical insert rows / columnsuse +dim-insert --inherit-style before|after(native inheritance, more reliable than reapplying);extend into an existing blank area(e.g., add a new column to the right of the data) use +range-copy --paste-type formats to lay down styles first, then write values; only for irregular styles that neither can express, use +cells-get --include style to read the source area styles and write them back along with the values. Whichever path is taken, after inserting, also check row heights and column widths separately (row heights are not inherited with styles; before inserting rows and filling long text, supplement +rows-resize), and check merged cells and cross-column headers and fill in the gaps. 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 is written only into --sort-keys; to delete records use +dim-delete, to clear content / formatting only use +cells-clear; it is forbidden to read values and then use +csv-put overwriting to simulate sorting / deletion. Use high-risk +batch-update。
  6. Color tagging triage: highlights / red marks that should automatically recalculate after data changes use conditional formatting; fixed annotations for determined results use static styles; decorative beautification follows the visual specification. Both paths use the same criterion for color fields: in the user's Chinese context, "red mark / coloring / marking" refers tocell background color, while "red text / red font / make the text red" uses font color; by default when there is no explanation, choose background color. After creating conditional formatting, first +cond-format-list verify the rule and range, then +cond-format-result-get spot-check that the sentinel cell matches the style.
  7. Deliverables are verifiable: the sheet names and counts, headers, titles, legends, file names, and specifications named by the user are preserved verbatim; each "completed" item in the response can be traced to a deliverable, and gaps are declared item by item.
  8. Replacement and addition: after batch replacement / deletion, search to confirm there are no leftovers; newly added columns must have headers, with units / specifications placed separately, not occupying original headers or data cells.
  9. Do not fabricate: data outside the table must have a verifiable source; do not use common sense or name inference to fabricate companies, standard values, market quotes, or regulatory parameters;if there is no source, leave it blank— values filled in from memory are likely to mismatch 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 a sentence like "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 spreadsheets prefer using native =AI(prompt, range) to spread column by column (the syntax is the same as ordinary formulas, see references/lark-sheets-formula-translation.md); once placed in the sheet, it calculates automatically row by row, which is easier than reading item by item → manual judgment → write-back / Python calling the model and then writing static values.The criterion is "row-by-row independent": if each target cell depends only on the input in the same row, it is row-by-row independent;data volume (even 10k+), batching, and judgment complexity do not change this determination——With large data volumes, AI formulas are still the first choice; for batching, only change the batch size of formula placement (when there are many rows, process serially in batches, with a reference magnitude of a few hundred to one thousand rows per batch), and do not change 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 of input take the non-formula route. AI formulas are computed asynchronously; after writing, first check the seed cell / first cellonce +cells-get --include formula to verify the text, thenthe first verification entry point must be +formula-verify --ai-only --range <整个写入区间>, and it is forbidden to use +cells-get to poll for calculation results; the criterion is ai_formula_failed_count == 0(--range only passes through to the backend and does not guarantee narrowing the summary scope; verify this interval by the returned cell positions, and do not compare the total against the expected number of items. 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 specified by name, first locate by visible_grid selection) → read data → write with native tools → read back and verify according to the items the user named → 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 (if the original table already has freeze settings, do not change them). xlsx acceptance testing is only run when processing a local xlsx, or when the user specifically asks for a local xlsx / download / print.

References

reference is divided into two groups: first readGeneral methods and specifications(style / formula rules that cut across all tasks), then according to the operation object entertool referenceto look up specific shortcuts. Editing tasks must first go through the general methods and specifications; together with the "Feishu Sheets editing guidelines" above, they apply to all tool references.

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

Reference Description
Feishu Sheets style and color specifications Feishu Sheets style and color specifications: value standards for colors, font sizes, alignment, borders, number formats, etc. for headers / data areas / summary rows, as well as the decision-making process and style key points for typical scenarios such as layout beautification when creating a table from scratch, adding summary rows, appending rows and columns inheriting the original table style, 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, marking in red, data bars, color scales), please use lark-sheets-conditional-format.
Feishu Sheets formula generation rules Rules for migrating and generating 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 results. 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-layer range results and secondary expansion). This article is responsible for writing the formula correctly; after placing it into the table, it must be used with references/lark-sheets-formula-verify.md to diagnose the formula range segment by segment.

Tool reference by object (including shortcuts)

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 newly added or modified range this time, merging compilation failures and 7 types of runtime errors;partial continue splitting, all status='success' then complete. AI formulas use --ai-only Perform an asynchronous status check on the entire write range; pending can be noted and then delivered.
Lark Sheet Workbook Manage the workbook structure of a Lark spreadsheet (subsheet list and metadata). Use when the user mentions "see what this spreadsheet contains", "spreadsheet structure", "what sheets are there", "create a new sheet", "delete this worksheet", "rename", "make a copy", or "move to the front".
Lark Sheet Sheet Structure Manage the subsheet structure and layout of a Lark spreadsheet: view row heights and column widths, hiding, merging, freezing, and grouping, and perform physical structure operations such as inserting/deleting/moving rows and columns. For data grouping and statistics, use lark-sheets-pivot-table. For ordinary appending at the end of a table, prefer +table-put --mode append to automatically locate the last row; use this reference first only when the user explicitly requests physically inserting rows or columns, inheriting a template structure, or expanding the layout.
Lark Sheet Read Data Read cell data in a Lark spreadsheet. Use when the user needs to "look at the data", "analyze the data", or "count/summarize"; it is also suitable for scenarios that require viewing detailed information such as formulas, styles, and comments.
Lark Sheet Search & Replace Search and replace text in a Lark spreadsheet, supporting limited ranges, case matching, exact matching, and regular expressions. Use when the user needs to "find", "search", or "locate" a value, or to "replace", "batch modify text", or "change A to B". Do not use it to understand spreadsheet structure (data should be read), do not use it for data analysis (data should be read and then calculated), and do not treat keywords in the user's action wording (such as "summarize amount" or "count quantity") as search terms.
Lark Sheet Write Cells Batch write values, formulas, styles, comments, or cell images to a specified range in a Lark spreadsheet. For plain text, you can 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. To append data, you can directly use +table-put --mode append; only when physically inserting rows/columns is explicitly required should you first use lark-sheets-sheet-structure. After formulas land in the sheet, lark-sheets-formula-verify must be run.
Lark Sheet Range Operations Perform structural operations on a specified range in a Lark spreadsheet (without writing cell data values). Applicable scenarios: clearing content or formatting ("clear", "delete content", "remove formatting"), merging/unmerging cells, adjusting row heights and column widths ("widen 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 heights and column widths/freeze) all at once to multiple subsheets of an existing Lark spreadsheet, submitting the entire specification in one go. Use when the task is to finish beautifying 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, use lark-sheets-workbook (+workbook-create --styles); to write data with synchronized styles, use lark-sheets-write-cells (+table-put --styles); all three share the same --styles vocabulary. For Lark spreadsheets only.
Lark Sheet Batch Update Combine multiple Lark spreadsheet 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 Lark Sheets (column charts, line charts, pie charts, bar charts, area charts, scatter charts, combo charts, radar charts, etc.). Use when the user needs to create charts, modify chart styles or data sources, view existing chart configurations, or delete charts. Also applies to data visualization-related scenarios such as when the user mentions "data visualization", "draw a chart", "trend analysis", "comparison chart", "proportion analysis", or "make a chart".
Lark Sheet Pivot Table Manage pivot tables in Lark Sheets. Use when the user needs to create pivot tables, modify a pivot table's row/column fields, aggregation methods, or filter conditions, view existing pivot table configurations, or delete pivot tables. Also applies to scenarios such as when the user mentions "grouped summary", "cross analysis", "count by XXX", "group by field", "group it further", "multidimensional analysis", or "pivot".
Lark Sheet Conditional Format Manage conditional formatting rules in Lark Sheets (duplicate value highlighting, cell value comparison, data bars, color scales, ranking, 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 such as when the user mentions "highlight", "mark in red", "color marking", "data bars", "color scales", or "conditional styles".
Lark Sheet Filter Manage filters in Lark Sheets. Use when the user needs to filter data (filter rows by text/numeric/color/date criteria), view existing filter configurations, or modify or delete filters. Also applies to scenarios such as "only show", "filter out", or "keep only those matching the criteria".
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; a view's hidden rows take effect only locally for the user when they enter that view, without affecting other collaborators.
Lark Sheet Sparkline Manage sparklines in Lark Sheets (line sparklines, column sparklines, win/loss sparklines). Use when the user needs to embed a small chart within a cell to display data trends. Also applies to scenarios such as "trend line", "in-cell chart", or "sparkline". 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 image", "add a logo", or "place an image". 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 edited historical versions of a sheet, roll back to a certain historical version, or query the asynchronous status of a rollback (in progress/success/failure). A rollback is an asynchronous operation; after initiating it, poll the result via status query. This applies only to Lark Sheets.
Lark Sheet Changeset Read the changeset (raw list of change operations) between two versions (CS revision), used to review whether a certain edit—especially an AI edit—actually satisfies the user's requirements. Pass in the starting version (baseline before the edit), optionally the ending version (the latest is used if omitted); the version difference limit is 20; the outermost level of the return includes the sheet's current 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 flags quick reference

Under each reference's shortcut title, use a single line of badges to indicate the supported public / system flags (e.g., _公共四件套 · 系统:--dry-run_). type / required / description are declared uniformly in this section:

Public flags (resource targeting)

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

  1. spreadsheet targeting (required):--url(parses the three kinds of links /sheets/、/spreadsheets/、/wiki/ ; wiki links automatically target the spreadsheet behind them) and --spreadsheet-token(bare token), choose one of the two.Exception:+workbook-create / +workbook-import for outputdoes not yet exist, accepts no targeting flags.
  2. sheet targeting (required for the common four-piece set shortcuts):--sheet-id and --sheet-name , choose one of the two.
    • ⚠️ When unsure of the sheet name, do not guess Sheet1: unless a concrete value has already appeared in the conversation or context, the first step is to +workbook-info get sheets[].sheet_id/title and then choose — sheets in Chinese workbooks are often named "数据"/"工作表 1"/a business name, and guessing the name will very likely hit sheet not found。
    • ⚠️ --range the Sheet1! prefix in cannot replace sheet targeting: you must still pass --sheet-id / --sheet-name。
    • ⚠️ When an A1 reference contains ! , wrap the whole segment in single quotes(--range 'Sheet1!A1:B2', to prevent bash history expansion; do not use set +H, which is illegal under sh/dash). When the sheet name needs to be wrapped again in single quotes inside the A1, use '\'' to escape.
    • Exception: shortcuts whose badge is marked _公共:URL/token(无 sheet 定位)…_ do not accept sheet targeting — workbook-level (+workbook-info / +sheet-list / +sheet-create / +revision-get / +changeset-get / +history-list|revert|revert-status), batch and whole-sheet level (+batch-update / +batch-chart-create|update / +cells-batch-clear / +styles-put / +dropdown-update|delete), as well as +table-put。+workbook-export where the sheet name is written in the payload, only accept --sheet-id(if there is no --sheet-name),+pivot-create use --target-sheet-id/name(XOR, all may be omitted). 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 flags

Flag Type Required Description
--dry-run bool No Zero side effects: only prints the request path and parameter template, without making a call
--yes bool Yes (only high-risk-write) second confirmation; exit code 10 when not provided. See ../lark-shared/SKILL.md high-risk approval protocol.
--print-schema bool No Before writing a composite JSON flag, if the structure is uncertain, run it first: it prints the Schema locally and exits (without making a call or requiring other required flags), paired with --flag-name to specify which flag to query; when omitted, it lists the flags queryable for that shortcut. Only shortcuts containing composite JSON flags support this.
--flag-name string No Works with --print-schema: flag names do 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, do not page through the whole thing.

bool flag syntax: to enable, a bare --flagmay be used; for explicit values use only --flag=true or --flag=false, not space-separated.

⚠️ High-risk-write command list (exit 10 hard confirmation gate):+batch-update、+cells-clear、+cells-batch-clear、+sheet-delete、+dim-delete、+dropdown-delete、+history-revert(whole-table rollback 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 preview, show the user the operations to be executed and the scope of impact,after obtaining the user's explicit consentthen append --yes to the original command to execute. Without the user's consent, do not include --yes, and do not silently add --yes to retry after exit 10—that amounts to disabling the gate. For the full protocol, see ../lark-shared/SKILL.md。

Schema boundaries:--print-schema prints the internal structure of the flag value; when the flag description requires an outer envelope (e.g., --sheets 's {"sheets":[…]}), that layer is not visible in the schema—add it according to the description; the reference's ## Schemas section also only gives one layer. For diagrams, directly +chart-create --print-example <type> take the minimal usable template and modify the parameters.

Flag content types and output conventions (terminology quick reference)

  • JSON-like 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 = verbatim text (e.g., CSV).
  • envelope: all shortcuts return a unified outer {ok, identity, data, ...}; write operations do not automatically read back; for verification, call +*-list / +*-get / +cells-get。
  • Large payloads go through files / stdin, not inline on the command line: flags whose Type is marked File + Stdin support --flag "@./x.json"(@file only accepts relative paths under cwd; absolute paths are rejected) and --flag -(stdin); when the payload contains newlines / quotes or is large in size, always write it to a file.stdin can supply only one flag per invocation——+table-put 's --sheets and --styles are both large JSON, route one through -and the other through @./x.json. Do not put temporary files into the user's project directory.
  • Non-POSIX shell (PowerShell / cmd.exe) adaptation: all bash code blocks in this skill (heredoc <<'JSON', single-quote escaping '\'') apply only to bash / zsh. Determine the current shell before acting; 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 any platform:
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 via pipes is unreliable)
Single-line inline JSON --flag '{"a":1}' --flag '{"a":1}'(PS single quotes are likewise literal) Do not inline—cmd will swallow the inner double quotes; always use @file