Man Page Reference¶
The full man-page reference for octa(1). The source of truth is
docs/cli/octa.1.adoc
(AsciiDoc); this page mirrors that content as Markdown for the
docs site.
On Linux (with the man page installed) man octa gives you the
same content at a terminal. See
Installation for how to get
the man page on disk.
Name¶
octa: multi-format tabular data viewer, editor, CLI tool, and MCP server.
Synopsis¶
octa [FILE...]
octa ACTION [OPTIONS]
octa --mcp [--mcp-read-only] [--mcp-tools LIST] [--mcp-without LIST]
Description¶
octa is a desktop application for viewing and editing tabular data files. It opens Parquet, CSV, JSON, SQLite, DuckDB, Excel and many more, over 40 formats in all, in a spreadsheet-like view with sorting, filtering, full-text search, inline editing, SQL queries, and file comparison.
Run without an action flag, it launches the graphical interface and opens each FILE in a tab. Run with one action flag, it performs that action, prints the result and exits. The actions are listed below, grouped by task. Only one action runs per invocation. Each action takes the files shown in its usage line; any other trailing FILE is ignored with a warning.
A FILE may be a local path, - for standard input, a plain
http:// or https:// URL, or a cloud object URL (s3://bucket/key,
az://container/blob, gs://bucket/key, sftp://user@host/path,
davs://host/path). A URL or cloud object is downloaded to a
temporary file and read as usual. Cloud credentials come from a saved
cloud connection covering the URL, otherwise from the ambient chain
(AWS_* environment variables, a cached SSO session, az login,
Google application default credentials). Cloud objects are read-only
here: output still goes to a local path. See
Pipelines and Reading from a URL
under Examples.
octa --help prints the flag list, and octa --help-all adds worked
examples for every action.
Actions¶
Each entry shows the action's usage line, what it does, and the
options that belong to it alone. Options several actions share (-f,
--rows, --out-dir, --table and others) are described under
Common options.
Look at a file¶
--schema FILE- Print the column schema of FILE as a two-column table (column
name, data type). For streaming formats (Parquet, CSV, TSV) the
reader loads the initial-row batch (2,000,000 rows by default)
and projects the schema from that. See
octa --schema. --head FILE [-n N] [--sort-by COLS [--sort-desc COLS] [--natural]]- Print the first N rows of FILE to standard output. N defaults
to 20 and is set with
-n/--lines. For streaming formats the reader stops at the initial-load cap and N is a slice off that, so this is fast on large files. With--sort-bythe rows are sorted before the first N are taken. Seeocta --head. --tail FILE [-n N]- Print the last N rows of FILE. N defaults to 20 and is set
with
-n/--lines. Streaming formats load with the standard row cap, so the tail reflects the end of the loaded window; raise--rowsto tail the true end of a very large file. Seeocta --tail. --sample FILE [-n N] [--seed N]- Print a random N-row sample of FILE (without replacement,
original row order preserved). N defaults to 20 (
-n/--lines). The sample is reproducible for a given--seed(default0). Seeocta --sample. --describe FILE [--table NAME] [--sample-rows N] [--deep]-
Print a one-shot orientation snapshot of FILE: format, file size, row count, column schema, and a small sample of rows. The
--tableflag picks a specific table on multi-table sources. Seeocta --describe.--sample-rows N- Number of preview rows (default
5, clamped to100). --deep- Also report how the file is physically written: row groups,
compression codec, encodings and per-column statistics,
followed by one row per column per row group. Plain-language
hints about a poor layout (very small row groups, missing
statistics, no compression) go to standard error, so a piped
run stays parseable. Parquet reports full detail; other formats
report their size and state that they expose no inspectable
structure. Place it after the file:
--describe FILE --deep. See File Internals.
Analyse¶
--report OUT.html FILE [--report-sample N] [--report-sections LIST]-
Write an HTML profiling report for FILE to OUT.html: per-column statistics, distribution charts, the most common values and a correlation matrix. The document is self-contained (inline CSS, inline SVG, no JavaScript) and fetches nothing, so it can be mailed or published as-is. See
octa --report.--report-sample N- Profile a random sample of N rows instead of every row. The report states that it sampled.
--report-sections LIST- A comma-separated subset of
stats,distributions,top_valuesandcorrelation(default: all four). An unknown name is an error rather than a silent omission.
--unique-columns FILE [--table NAME] [--max-combo N]-
Find columns (and optional small combinations) whose values are unique across FILE. Useful for primary-key reconnaissance on undocumented data. See
octa --unique-columns.--max-combo N- Also test column pairs (
2) or triples (3). Default1, clamped to[1, 3].
--shapes FILE --shapes-column COL [--shapes-exact]-
What a column's values look like, digits folded to
9, capitals toA, other letters toa, punctuation kept, and a run of letters of one kind written once (Anna SchmidtisAa Aa). One row per shape, most common first, with a count and an example. Seeocta --shapes.--shapes-column COL- Column to shape. Required.
--shapes-exact- Shape letter by letter (
Aaaa Aaaaaaa) instead of by word.
--lookups FILE [--lookups-min N]-
Hidden lookup tables: columns that always follow another column. One row per key and following column, with its consistency, conflicting keys and breaking rows. See
octa --lookups.--lookups-min N- Share of rows (0 to 1) that must agree with their key. Default
0.95.
--outliers FILE [--outlier-method M] [--outlier-cols COLS] [--outlier-k K] [--order-by COL] [--outlier-window N] [--outlier-same-weekday]-
Flag numeric outlier cells in FILE and print their coordinates. See
octa --outliers.--outlier-method Miqr(default),zscore, orneighbours(each value against the values around it in the order of--order-by, for a series over time).--outlier-cols COLS- Comma-separated columns to scan (default: all).
--outlier-k K- Threshold multiplier (default
1.5for IQR,3.0for z-score and neighbours). --order-by COL- For
neighbours, required: the date, time or number column that puts the rows in order. --outlier-window N- For
neighbours: values compared on each side (default 7). --outlier-same-weekday- For
neighbours: compare a value only with those on the same weekday.
--detect-pii FILE [--pii-sample N]-
Scan FILE for likely PII columns (email, phone, IBAN, credit card, SSN) and print the findings. See
octa --detect-pii.--pii-sample N- Rows sampled per column (default
500).
--compare-distributions FILE --dist-column COL [--dist-file-b FILE] [--dist-column-b COL]-
Do two columns look like the same population? Numbers are compared with a two-sample Kolmogorov-Smirnov test, which looks at the whole shape rather than one summary of it; anything else is compared as categories with a chi-square test. Prints a two-column
field/valuetable led by a plain-languageheadline(the answer), then theverdict(sameordifferentat p = 0.05), the test, its statistic and p-value. When the test does not apply (fewer than 20 usable values, or more than 50 distinct ones), aresultrow says why instead of a verdict. Rare categories are pooled into one(other)bucket rather than dropped, and nulls are left out.--table-a/--table-bpick the table on multi-table sources. Seeocta --compare-distributions.--dist-column COL- The column to compare. Required.
--dist-file-b FILE- A second file. Omit it to compare two columns of the first.
--dist-column-b COL- The second column. Defaults to
--dist-column.
--forecast FILE --forecast-x COL --forecast-y COL [--forecast-periods N] [--forecast-season N]-
Forecast one column over time (Holt-Winters) with 80% and 95% ranges. See
octa --forecast.--forecast-x COL- Time column: dates, date-times or numbers, evenly spaced. Required.
--forecast-y COL- Column of numbers to forecast. Required.
--forecast-periods N- How many periods ahead. Default
12. --forecast-season N- Season length in points. Default: read from the spacing.
--seasonality FILE --seasonality-x COL --seasonality-y COL [--seasonality-season N]-
Split one column over time into trend, repeating pattern and rest, one row per point. The season length and how much the pattern explains go to stderr. See
octa --seasonality.--seasonality-x COL- Time column: dates, date-times or numbers, evenly spaced. Required.
--seasonality-y COL- Column of numbers to split. Required.
--seasonality-season N- Season length in points. Default: read from the spacing.
--bands FILE --bands-column COL [--bands-by width|count|edges] [--bands-count N] [--bands-edges LIST] [--bands-back middle|lower|upper]-
Add a column of number bands (18-34, 65+) right after the column, or with
--bands-backread band labels back into numbers, and print the table. Never modifies FILE. Seeocta --bands.--bands-column COL- The column to band, or to read back. Required.
--bands-by width|count|edges- Equal widths (default), equal counts, or own edges.
--bands-count N- How many bands for width and count. Default
5. --bands-edges LIST- Where bands start, comma-separated; semicolons for decimal commas.
--bands-back middle|lower|upper- Read bands back: which number of each band to give.
--reference FILE --ref-mode currency|inflation|places [--ref-amount COL] [--ref-from COL|CODE] [--ref-to CODE] [--ref-date COL|DATE|latest] [--ref-country COL|CODE] [--ref-target YYYY-MM] [--ref-round usual|none|N] [--ref-currency-mark code|symbol] [--ref-key COL] [--ref-key-kind postcode|municipality|kreis|nuts] [--ref-outputs LIST] [--ref-first]-
Reference data: convert currency at the rate of the row's date, express amounts in the prices of another month, or look up places and region keys, and print the table with the new columns. Never modifies FILE. Uses public data downloaded on request; each source is off until switched on in Settings > Online data or under
[reference.<id>]insettings.toml, and the action exits 1 naming the key while it is off. Seeocta --reference.--ref-mode currency|inflation|places- What to do. Required.
--ref-amount COL- The amount column (currency, inflation).
--ref-from COL|CODE- The amount's currency: a column of codes, or one code.
--ref-to CODE- The currency to convert to.
--ref-date COL|DATE|latest- The date column;
latest(currency only, the default) for the newest rate. For inflation also one date or month (YYYY-MM) for every row. --ref-country COL|CODE- The country: a column, or one ISO code (
XMis the euro area). --ref-target YYYY-MM- Inflation: the month to express amounts in. Default: the newest month every country has.
--ref-round usual|none|N- The currency's usual decimals (currency default), not rounded, or a number of decimals (inflation default 2).
--ref-currency-mark code|symbol- Currency: name the target currency by its official code (default) or its symbol, where the symbol belongs to that currency alone.
--ref-key COL- Places: the column holding the key.
--ref-key-kind postcode|municipality|kreis|nuts- Places: what the key is. Default
postcode. --ref-outputs LIST- Places: comma-separated outputs (place, region, latitude, longitude, postcode, municipality, municipality_name, kreis, kreis_name, nuts1, nuts1_name, nuts2, nuts2_name, nuts3, nuts3_name). Default: all whose source is switched on.
--ref-first- Places: the first match only, alphabetically, not all joined.
--rfm FILE --rfm-customer COL --rfm-date COL --rfm-amount COL [--rfm-order COL] [--rfm-as-of DATE] [--rfm-names seven|eleven|none]-
Customer segments (RFM): every customer marked 1 to 5 for how recently, how often and how much they bought, and the segment name. One row per customer, largest amount first. The As of day and the skipped rows go to stderr. See
octa --rfm.--rfm-customer COL- The column naming a customer. Required.
--rfm-date COL- The date or timestamp of each purchase. Required.
--rfm-amount COL- What each row was worth; empty counts as 0. Required.
--rfm-order COL- Rows with the same value are one order; a row without one is its own. Default: every row is one.
--rfm-as-of DATE- The day the segments are made for; later purchases are left out. Default: the latest date in the data.
--rfm-names seven|eleven|none- Which segment names. Default
seven.
--cohort FILE --cohort-who COL --cohort-when COL [--cohort-period P] [--cohort-show S] [--cohort-sum COL]-
Print a cohort table: who first appeared in which period, and how many came back (or a column's sum) in each later period. See
octa --cohort.--cohort-who COL- The column naming a person or customer. Required.
--cohort-when COL- The date or timestamp column. Required.
--cohort-period Pday,week(Monday start),month(default),quarteroryear.--cohort-show Sshare(default, percent of the cohort),countorsum.--cohort-sum COL- The number column
--cohort-show sumadds up.
--funnel FILE --funnel-who COL --funnel-event COL --funnel-steps A,B,C [--funnel-when COL] [--funnel-within-days DAYS]-
Count how many people get through a series of steps in order, one row per step. A person reaches a step when they have that event at or after the moment they reached the step before. See
octa --funnel.--funnel-who COL- The column naming a person or customer. Required.
--funnel-event COL- The column saying what happened in each row. Required.
--funnel-steps A,B,C- The event values that make up the funnel, in order. Two or more, each once. Required.
--funnel-when COL- The date or timestamp column. Without it the rows count in file order.
--funnel-within-days DAYS- Count a later step only within this many days of the first step.
Needs
--funnel-when.
--resample COL FILE --value-cols COLS [--interval I] [--agg A] [--group-by COLS]-
Group FILE into time buckets: one row per
--intervalof COL. The time column is cast withTRY_CAST, so a row that will not parse buckets as NULL instead of failing the whole run. Seeocta --resample.--value-cols COLS- The columns to aggregate. Required.
--interval Iminute,hour,day(default),week,month,quarteroryear.--agg Asum(default),mean,min,max,count,firstorlast.--group-by COLS- Extra grouping columns, giving one series per combination.
--rolling COL FILE --window N --order-by COL [--agg A] [--partition-by-cols COLS]-
Add a rolling aggregate of COL to FILE. See
octa --rolling.--window N- Rows in the frame, including the current row.
--order-by COL- Column that orders the frame. Required: a rolling aggregate over unordered rows is meaningless.
--agg Amean(default),sum,min,max,count,firstorlast.--partition-by-cols COLS- Restart the frame per group. Spelled that way because
--partition-byis the split-into-files action.
--overlaps FILE [--overlaps-start COL] [--overlaps-end COL] [--overlaps-lane COL] [--overlaps-label COL]-
Rows whose time spans overlap inside a lane (two bookings of one room). One row per pair on stdout; exits 1 when any is found. Spans that only touch do not overlap. Without
--overlaps-start/--overlaps-endthe first two date columns are used. Seeocta --overlaps.--overlaps-start COL,--overlaps-end COL- Start and end columns. No end makes every row a point.
--overlaps-lane COL- Only rows with the same value in COL can overlap.
--overlaps-label COL- A column shown beside each row of a pair.
--cell-history FILE --history-column COL (--history-key COLS --history-value VALUES | --history-row N) [--history-depth N]-
The commits that changed one cell of a file in a Git repository, newest first, following the row by key and the file through renames. See
octa --cell-history.--history-column COL- Column of the cell. Required.
--history-key COLS- Comma-separated key column(s) that identify the row.
--history-value VALUES- Comma-separated values of the row in each key column.
--history-row N- 1-based row number, when there is no key.
--history-depth N- How many commits to read, newest first. Default
50.
--relationships DIR [--recursive]- Rank the likely relationships between the tables in DIR and print
them best first: which column of which table lines up with which
column of which other table. Names take no part in the ranking; the
score comes from how much the values overlap, weighted by how
distinct each side is, so a status column cannot outrank a real
key. Each row also carries
orphans, the number of distinct values on the left with no partner on the right, which is what separates two candidates that overlap identically. Reads values, so it is capped at 30 files and at 10,000 rows per table. Unreadable files are noted on stderr. Always exits0: this is a report, not a gate. Add--recursiveto walk subdirectories. Seeocta --relationships.
Compare and check¶
--diff FILE_A FILE_B [--diff-mode MODE] [--diff-on COLS]-
Compare two files, or with
--diff-dba file and a live database table.--diff-modeselects the strategy; the output is a table tagged by a leadingstatuscolumn, and a summary line (per-mode counts) is written to standard error. Complements--compare-schemas, which diffs only the column metadata. Seeocta --diff.--diff-mode MODE- Comparison strategy (default
set):setcompares rows by whole-row content (every column, positionally) and prints rows unique to each side (only_in_a/only_in_b); the files should share the same column order.orderedlines up row i of A with row i of B, prints matched rows that differ aschanged(with achanged_columnscolumn) plus any trailingonly_in_a/only_in_brows.joinmatches rows on the--diff-onkey column(s) and prints added (only_in_b), removed (only_in_a), andchangedrows. --diff-on COLS- Key column(s) for
--diff-mode join, comma-separated (matched by name). Required when the mode isjoin; ignored otherwise. --diff-tolerance N- Numbers within this absolute difference count as the same. Ordered and join modes only; set mode refuses it.
--diff-tolerance-pct P- Numbers within this percentage of the larger value count as the same. A pair passes if it is within either number tolerance.
--diff-time-tolerance SECS- Dates and times at most this many seconds apart count as the same. A date counts as midnight.
--diff-ignore-case- Compare text without regard to upper and lower case, join keys included.
--diff-ignore-spaces- Compare text trimmed, with runs of spaces as one, join keys included.
--diff-ignore-columns COLS- Columns to leave out of the comparison, comma-separated or repeated. They still appear in the output.
--diff-db CONN- Compare against a live database table instead of a second file.
CONN names a saved database connection. With this set,
--difftakes a single file: that file is side A and the table is side B, soonly_in_ameans "in the file, not the table". Requires--diff-db-table. The table is read under the usual row cap. See Compare with a Database Table. --diff-db-table TABLE- Table to compare against on the
--diff-dbconnection, as SCHEMA.TABLE or CATALOG.SCHEMA.TABLE (the three-part form is for Trino, Snowflake, Databricks and BigQuery). An unqualified name uses the connection's own database.
--compare-schemas FILE_A FILE_B [--table-a NAME] [--table-b NAME]- Diff the column schemas of two files. Prints a four-column table
(
status/column/type_a/type_b).statusis one ofcommon,only_in_a,only_in_b,type_mismatch. Matching is by exact, case-sensitive column name. For multi-table sources, the table to read from each side is selected via--table-a/--table-b. Seeocta --compare-schemas. --compare-folders FOLDER FOLDER... [--no-recursive]-
Compare two or more folders file by file. Each FOLDER is a local path or a cloud URL (
s3://,az://,gs://,sftp://,davs://). Files are matched by their path inside each folder; copies of different sizes are different without being read, and copies of equal size are compared by a BLAKE3 hash of their contents. Prints one row per file with astatusofsame,differentormissing, the folders that have it and lack it, and the size, modified time and hash per folder. Each folder is listed up to the file limit from the settings (folder_compare_max_files, default 100,000); a folder cut short is named on stderr. Exit code is0when every file is the same everywhere and1when anything differs, is missing, or a folder hit the limit. Seeocta --compare-folders.--no-recursive- Compare only the top level of each folder.
--drift-report FILE_A FILE_B [--fail-on SPEC]-
Compare two versions of the same dataset and report how it moved. Columns are matched by name: one present on a single side is reported as added or removed, and every shared column gets its null rate, distinct count and, when numeric, its minimum, maximum and mean compared. Columns with few enough distinct values also list the category values that appeared and vanished. Every figure comes from the same Summary pass the Analyse -> Summary tab uses, so the two can never disagree. The report goes to stdout; the row counts, added and removed column names and the pass/fail summary go to stderr, so a pipe stays parseable. Exit code is
0unless--fail-onwas given and a gate was breached. Seeocta --drift-report.--fail-on SPEC- Turn the report into a CI gate. SPEC is a comma-separated
list of metric:change pairs, for example
null_rate:0.05,rows:0.1, where change is the largest relative move that still passes. A metric that never appears in the report is simply never applied. A baseline of zero that moved at all counts as an unbounded change, so a null rate going from0to0.5breaches any gate. Metric names arerows,null_rate,distinct_count,min,maxandmean.
--schema-drift DIR [--recursive] [--ignore-case]- Scan DIR and report which files disagree about their columns.
Files are grouped by schema, largest group first, so the answer to
a folder of 500 parts is "497 look like this, 3 look like that".
The report table goes to stdout; the per-variant file lists, any
unreadable files and the drifting column names go to stderr, so a
pipe stays parseable. Exit code is
0when every file agrees and1otherwise, which is CI-pipeable. Add--recursiveto walk subdirectories (depth 8) and--ignore-caseto treat column names differing only in case as the same column. Seeocta --schema-drift. --validate-schema FILE --expect-schema SCHEMA_FILE [--table NAME]-
Check FILE's column schema against a JSON Schema. Exit code is
0on a clean match,1otherwise, which is CI-pipeable. Schemas produced by--export-schema -t json-schemaround-trip through this command. Seeocta --validate-schema.--expect-schema SCHEMA_FILE- Path to the expected JSON Schema. Required.
--check FILE --rules RULES.toml-
Check FILE's values against a rules file and report which rules failed. The report goes to stdout with one row per failing rule, its failure count and up to three offending values; the summary line goes to stderr. Exit code is
1on any violation and on any rule that could not run, because a rules file whose columns have since been renamed would otherwise report a clean run over checks it silently skipped. The same rules file is written and read by the Data -> Data validation... dialog. Seeocta --check.--rules FILE-
The rules file. Required. It is TOML, one
[[rule]]table per check, naming its column and one of the kindsnot_null,unique,range(withminandmax),regex(withpattern) ormax_length(withmax_length). A rule without acolumnapplies to every column. Example:
--check-references PARENT --parent-column COL [--child-file FILE] --child-column COL-
List the child rows whose foreign key has no matching parent, one row per offending value (capped at 500 values; the counts in the summary on stderr stay exact). Exits 1 when there are any, so it works as a CI gate. A null or empty key is not an orphan: in every relational database it means "no parent", so those rows are counted separately and do not fail the gate. Keys are compared as trimmed text, so
1from a CSV matches1from a database.--table-a/--table-bpick the table on multi-table sources. Seeocta --check-references.--parent-column COL- The parent's key column. Required.
--child-file FILE- The child file. Omit it for a self-reference, such as a
manager_idpointing atidin the same table. --child-column COL- The child's foreign-key column. Required.
Clean and transform¶
--dedupe FILE [--dedupe-on COLS] [--dedupe-keep WHICH]-
Remove duplicate rows from FILE and print the result to stdout. See
octa --dedupe.--dedupe-on COLS- Comma-separated key columns. Without it the whole row is the key.
--dedupe-keep WHICH- Which occurrence survives:
first(default) orlast.
--impute COL=STRATEGY FILE- Fill missing or empty cells of a column of FILE. Repeatable.
Strategies:
mean,median,mode,ffill,bfill,const:VALUE. Seeocta --impute. --anonymize SPEC FILE- Mask or scramble sensitive columns of FILE per the JSON SPEC
file and print the sanitised table to stdout. The input file is
never modified. The spec lists per-column rules (
hash/partial_mask/redact/fake) plus an optional sharedsalt; columns are named. The same value plus the same salt always maps the same way, so duplicates stay linked and a re-run re-joins to an earlier export. Seeocta --anonymize. --hash-columns COL,COL,... FILE [--hash-algo ALGO] [--hash-delimiter TEXT] [--hash-null TEXT] [--hash-trim] [--hash-upper] [--hash-name NAME]-
Append a column holding a hash of the named columns and print the table to stdout. The input file is never modified. The columns are joined in the order given, with the delimiter between them, and every value is turned into text first, whatever its type. The hash is lowercase hex. See
octa --hash-columns.--hash-algo ALGOmd5(default),sha256orsha512.--hash-delimiter TEXT- Put between the values (default
|). May be empty:--hash-delimiter "". --hash-null TEXT- Stands in for a NULL cell (default empty).
--hash-trim- Strip whitespace from each value before hashing it.
--hash-upper- Upper-case each value before hashing it.
--hash-name NAME- Name of the new column (default
hash_<columns>). It must not exist yet.
--calculate KIND FILE [--calc-column COL] [--order-by COL] [--partition-by-cols COLS] [--calc-descending | --calc-ascending] [--calc-name NAME] [--calc-offset ROWS] [--calc-gap MINUTES] [--abc-a PERCENT] [--abc-b PERCENT]-
Add a calculated column and print the table to stdout. The input file is never modified. KIND is
rank,dense_rank,row_number,running_total,percent_of_total,diff_prev,pct_change_prev,previous,next,sessionorabc. Seeocta --calculate.--calc-column COL- The column to calculate on. Not used by
row_number. --order-by COL- The column that sets the row order. Without it the file order is used.
--partition-by-cols COLS- Comma-separated columns that restart the calculation for each group.
--calc-descending- Order largest (or latest) first.
--calc-ascending- Order smallest first. A rank then gives the smallest value 1. Ranks default to largest first, the other kinds to ascending.
--calc-name NAME- Name of the new column (default
<column>_<kind>). It must not exist yet. --calc-offset ROWS- For
previousandnext: how many rows away (default 1). --calc-gap MINUTES- For
session: a pause longer than this starts a new visit (default 30).--calc-columnnames the timestamps,--partition-by-colsthe user. --abc-a PERCENT,--abc-b PERCENT- For
abc: class A ends at the first running share of the total, class B at the second, the rest is C (default 80 and 95).
--classify QUESTION --classify-columns COLS FILE [--classify-category NAME[=DESCRIPTION]]... [--classify-levels LEVELS] [--classify-name NAME]-
Ask TypeSafe AI's Jev model QUESTION about every row and print the table to stdout with the answer and its certainty as two new columns. The input file is never modified. This sends the cells of the chosen columns to TypeSafe AI, whose servers are in the United States only, so it is refused until switched on: in Settings, with
enabled = trueunder[jev]insettings.toml, or withOCTA_JEV_ENABLED=1. With--classify-categorythe answer is one of the categories, with--classify-levelsa grade on that scale, with neither yes or no. Each distinct combination of values is sent once. Seeocta --classify.--classify-columns COLS- Comma-separated columns whose cells are sent. Required.
--classify-category NAME[=DESCRIPTION]- One category the answer may be, with an optional description of what belongs there. Repeat it for each category, 2 to 255.
--classify-levels LEVELS- Comma-separated levels of a scale, lowest first, 2 to 10. Not
together with
--classify-category. --classify-name NAME- Name of the answer column (default
category,answerorscore). It must not exist yet.
--recipe RECIPE FILE [--recipe-out FILE]-
Replay a recipe (a
.ocpfile, short for Octa reCiPe, recorded in the GUI) on FILE. Every step runs by column name. When any step cannot run, nothing is written, the skipped steps go to stderr and the exit code is1. Seeocta --recipe.--recipe-out FILE- Write the result to FILE instead of stdout.
--test-data FILE... [--test-data-rows N] [--seed N] [--test-data-out PATH] [--test-data-rename-categories]-
Generate new rows shaped like each FILE: the same columns, numbers and dates from the real spread, fake names, emails, IBANs and IDs, empty cells at the real rate. Several files are generated together so links between them still join. The plan goes to stderr, with a note for every small category column that keeps its real values. See
octa --test-data.--test-data-rows N- Rows per table (default: as many as the real one).
--test-data-out PATH- Output file for one input, or an existing folder for several
(written as
<name>_test.<ext>). Without it, one table goes to stdout. --test-data-rename-categories- Replace real category values with
value_1,value_2, ...
Combine and split¶
--union FILE --union-file FILE [--union-drop COL] [--union-cast COL=TYPE] [--union-ignore-case]-
Stack FILE plus every
--union-fileinto one table (at least two files). Seeocta --union.--union-file FILE- Another source. Repeatable.
--union-drop COL- Column to omit from the output. Repeatable.
--union-cast COL=TYPE- Override a column's target Arrow type. Repeatable.
--union-ignore-case- Treat column names differing only in case as one column. Off by default; the first spelling encountered names the output column.
--join FILE --join-file FILE --join-on COLS [--join-type TYPE]-
Join FILE plus every
--join-fileon the--join-onkey(s). Seeocta --join.--join-file FILE- Another source. Repeatable.
--join-on COLS- Key column(s), comma-separated or repeated. Required.
--join-type TYPEleft(default),inner,right,full,semi(rows of the first file with a partner),anti(rows without one) orasof(the last--join-onkey matches the nearest earlier value).
--fuzzy-join FILE --fuzzy-join-file FILE --fuzzy-on LEFT=RIGHT [--fuzzy-method NAME] [--fuzzy-threshold N] [--fuzzy-block LEFT=RIGHT] [--fuzzy-join-type TYPE] [--fuzzy-max-rows N]-
Join FILE to each
--fuzzy-join-fileon how similar the values are rather than on exact equality, for tables that name the same thing differently (Mueller GmbHagainstMueller Gmbh.). Each left row keeps its single best partner. The output gainsmatch_score_Nandambiguous_Nper step;ambiguousmeans the runner-up scored nearly as well, so that match is the one to check. The per-step report goes to stderr. Seeocta --fuzzy-join.--fuzzy-join-file FILE- The table to join against. Repeat it to join several in turn.
--fuzzy-on LEFT=RIGHT- The columns to compare. May be repeated, in which case the scores are averaged.
--fuzzy-method NAMEedit_ratio(default),jaro_winklerortoken_set.--fuzzy-threshold N- The minimum average score in
0.0..=1.0(default0.85). --fuzzy-block LEFT=RIGHT- Compare only rows that agree exactly on these columns, which is what makes a large join feasible.
--fuzzy-join-type TYPEinner,left(default),rightorfull.--fuzzy-max-rows N- Cap on the rows considered per side (default
20000).
--spatial-join FILE --spatial-layer FILE... [--spatial-op inside|nearest] [--within-km N]-
Join by location: each point of FILE gets the columns of the layer polygon it lies in, or of the nearest layer point with its distance. See
octa --spatial-join.--spatial-layer FILE- A table to join against. Repeat it for several layers. At least one is required.
--spatial-op inside|nearest- The operation. Default
inside. --within-km N- With
--spatial-op nearest: points farther than this stay empty.
--merge FILE FILE... [--merge-original FILE] [--merge-key COLS] [--merge-prefer N] [--merge-out FILE] [--merge-format EXT]-
Merge two or more versions of a table, per row and per cell. With
--merge-original, a change made in one version is taken and only different changes to one cell, or a row deleted in one version and edited in another, conflict; without it, every cell where the versions differ conflicts. Rows are matched by--merge-key, or by position without one. While a conflict is open nothing is written, the conflicts are printed on stdout and the exit code is1, which makes it usable as a git merge driver:octa --merge %A %B --merge-original %O --merge-key id --merge-out %A --merge-format %P. Seeocta --merge.--merge-original FILE- The table every version was edited from. Optional.
--merge-key COLS- Key column(s), comma-separated or repeated.
--merge-prefer N- Settle every conflict in favour of version N (1 = the first
file given to
--merge). --merge-out FILE- Write the result to FILE instead of stdout.
--merge-format EXT- Format of the files, for files without an extension. An
extension (
csv) or a file name to take it from (git's%P).
--harmonise-schema DIR (--out-dir DIR | --combine --out FILE) [--target-file FILE] [--recursive] [--ignore-case] [--overwrite]-
Rewrite every file in DIR to one common set of columns, writing harmonised copies into
--out-dir. The originals are never modified. The target schema is the shape most files already have, or the schema of--target-filewhen given. A column missing from a file is added as nulls; a column not in the target is dropped and named in the report. A file whose values cannot be cast to a target type is refused rather than written with nulls in place of those values, because a harmonised folder of silently emptied cells looks clean and is not. Two inputs that would write the same output name are both refused rather than one being renamed. The report goes to stdout; refusals and dropped columns go to stderr. Exit code is0when nothing was refused and1otherwise. Add--recursive,--ignore-case, and--overwriteto replace existing files in the output folder. See Harmonise Schemas.--target-file FILE- Take the target schema from this file instead of the shape most files already have.
--combine- Fold the folder into ONE file, written to
--out FILE, instead of writing a harmonised copy of each. Asource_filecolumn says which file every row came from (suffixed, assource_file_2, if the data already has one). Nothing is cast, so nothing is refused: columns only some files have are kept and left empty for the others, as--uniondoes. A file that cannot be read is named, skipped and counted. Asking for it without--outis refused rather than guessed at.
--partition-by COL --out-dir DIR FILE [--partition-format EXT] [--partition-layout LAYOUT]-
Split FILE into one file per distinct value of COL, written into
--out-dir. Combines with--split-rows/--split-sizeto cap each piece as well. Seeocta --partition-by.--partition-format EXT- Output extension (default: the source's).
--partition-layout LAYOUT- How the pieces are named.
flat(default) writes<value>.<ext>side by side;folderwrites<value>/part-0001.<ext>;hivewrites<column>=<value>/data.<ext>;hive-partswrites<column>=<value>/part-0001.<ext>. All four hold the same rows and all four reopen as one table, since the partition column is written into every file. Onlyflatloses information in the name: it sanitises and lowercases the value into a file stem, so values differing only in case or punctuation collide and gain_2,_3. The folder layouts keep the value as it is, replacing only characters that cannot appear in a path.hiveis what Spark, Athena, DuckDB and pandas expect from a partitioned dataset.
--split-rows N | --split-size SIZE --out-dir DIR FILE [--partition-by COL]-
Split FILE into pieces of at most N rows or SIZE bytes each, written into
--out-dir. Works alone (splits the whole table) or with--partition-by(splits each group). Every file then gets a part number:name_part_0001.ext, orpart-0001.extinside a folder. Seeocta --partition-by.--split-rows N- At most N rows per output file.
--split-size SIZE- At most SIZE per output file, e.g.
25MB,500KB,1GB(1 MB = 1,000,000 bytes;MiBfor 1,048,576). Combines with--split-rows. Files land a little under the limit.
--to-workbook OUT.xlsx FILE...- Write every FILE into one Excel workbook, one worksheet per file.
Sheet names come from the file stems and are corrected to Excel's
rules automatically: at most 31 characters, no forbidden
punctuation, and duplicates numbered
_2,_3. Needs at least two inputs; for a single file use--convert. Prints a headerlessinput<TAB>sheet<TAB>rowslisting. Every input is read before anything is written, so an unreadable file fails the run instead of leaving a half-written workbook. See Saving.
Convert and SQL¶
--convert IN OUT [--sort-by COLS] [--password-env VAR] [--compression CODEC] [--row-group-size N]- Convert IN to OUT. Both formats are inferred from each path's
extension and routed through the shared format registry. Read-only
output formats (SAS, R datasets, HDF5, MATLAB, NetCDF, EPUB, GeoJSON) are
rejected with a clear error. Conversion is bounded by the
initial-load cap (2,000,000 rows by default); pass
--rows allto convert the full file. OUT may be-for standard output, with--tonaming the format, since a pipe has no name. Seeocta --convert. --batch-convert FILE... --out-dir DIR --to EXT [--overwrite] [--password-env VAR]- Convert every FILE into
--out-diras--to EXT. Output names are<stem>.<ext>; two inputs sharing a stem get_2,_3suffixes in input order, so a run cannot overwrite its own earlier output. Existing outputs are skipped unless--overwriteis given. One failed file does not stop the run. Output is a headerlessinput<TAB>output<TAB>statuslisting on stdout, with per-file errors and a summary on stderr. The exit code is1when any file failed. Seeocta --batch-convert. --sql [FILE] -q QUERY [--sql-table NAME=PATH ...] [--sql-attach ALIAS=PATH ...] [--sql-write-to PATH --sql-write-table TABLE [--sql-write-schema SCHEMA] [--sql-write-mode MODE]] [--stream] [--explain]-
Run a SQL query against FILE, which DuckDB sees as a table called data, and against the saved libraries. FILE may be left out when the query reads only libraries. Extra tables and whole DuckDB / SQLite databases can be added, so a single invocation can JOIN across formats, and the SELECT result can be persisted to a DuckDB or SQLite file. A saved library whose name a
--sql-tableor--sql-attachalready uses is left out of that run. Mutations (INSERT / UPDATE / DELETE) ondataitself do not persist back to FILE, since the in-memory DuckDB connection is discarded at exit. Use--converton the post-mutation output if you need to persist. Seeocta --sql.-q QUERY,--query QUERY- The SQL query. Always reference the file's data as the table data.
--sql-table NAME=PATH- Register an extra file as a workspace table named NAME. Any supported format. Repeatable.
--sql-attach ALIAS=PATHATTACHa DuckDB or SQLite database under ALIAS. Repeatable. After attachment every inner table is queryable asalias.schema.tbl(DuckDB) oralias.tbl(SQLite, through DuckDB's sqlite add-on, downloaded on first use; without it every table is loaded asalias__table).--sql-write-to PATH- Persist the SELECT result to PATH instead of printing it. The
extension picks DuckDB (
.duckdb,.ddb) or SQLite (everything else). Created if missing. Requires--sql-write-table. A SQLite target stops at the row cap and warns on stderr;--rows alllifts it. --sql-write-table TABLE- Target table name for
--sql-write-to. --sql-write-schema SCHEMA- Target schema for
--sql-write-to. DuckDB only; defaults tomain. SQLite has no schemas; passmainor leave unset. --sql-write-mode MODEcreate(default; errors if the table already exists),replace(drop and recreate), orappend(INSERTinto the existing table; column count and order must match).--stream- Let DuckDB scan the file where it lies instead of loading its
rows. For a Parquet, CSV or JSON file this lets an aggregate
cover every row of a file far larger than memory: the primary
file is registered as a view named
datarather than as a loaded table, so--rowsno longer bounds what the query sees. Every other action needs the rows themselves and says so on stderr rather than ignoring the flag. A format DuckDB cannot scan also falls back to a normal read with a note. See Large files. --explain- Show the query plan instead of running the statement. Prints the
steps in plain words, numbered in the order the database works
through them; with
-f jsonor-f csv, one row per step. One statement. The plan is DuckDB's own (the local workspace). Nothing is executed. Also works with--db-query.
--export-schema FILE [-t TARGET]-
Render FILE's column schema as SQL DDL, a Pydantic model, a TypeScript interface, a JSON Schema document, or a Rust struct, and print it to standard output. Only the column list is read and no rows are serialised. Short form:
-e. Seeocta --export-schema.-t TARGET,--target TARGET- One of
postgres(default),mysql,sqlite,databricks,snowflake,pydantic,typescript,json-schema, orrust.
Databases¶
These actions work on a saved database connection, managed in
Settings -> Databases or with --add-connection. See
Databases. Two options are shared by the group:
--db CONNECTION- Saved connection name (case-insensitive) or id. Passwords stay in the system keyring.
--db-catalog NAME- Catalog (the top namespace level) for a three-level engine, used by
--db-tables,--db-write-tableand--db-export. Only Snowflake, Databricks and BigQuery have one; passing it to any other engine is an error. With--db-tablesand no catalog, the catalogs themselves are listed. --db-tables --db CONNECTION [--db-catalog NAME]- List every schema and table of the connection as a two-column
table. On Trino, Snowflake, Databricks and BigQuery, which have a
catalog level above the schema, the catalogs themselves are listed
unless
--db-catalognames one. --db-query SQL --db CONNECTION [--explain]-
Run one SQL statement on the connection, server-side and in the engine's native dialect. SELECT results print in
-f FORMAT; mutations report rows affected and are refused unless the connection's "Allow writes" switch is on. Results stop at the initial-load row cap; use--rowsto raise or lift it.--explain- Show the query plan instead of running the statement, as for
--sql. Works on PostgreSQL, MySQL / MariaDB, Databricks and BigQuery (BigQuery: the bytes it would read). Nothing is executed.
--db-write-table SCHEMA.TABLE --db CONNECTION FILE [--db-write-mode MODE] [--db-catalog NAME]-
Write FILE into the given server table. Refused unless the connection allows writes.
--db-write-mode MODEcreate(default; error if the table exists),append, orreplace.
--db-copy SCHEMA.TABLE --db CONNECTION --db-copy-to CONNECTION [--db-copy-target SCHEMA.TABLE] [--db-copy-target-catalog NAME] [--db-write-mode MODE]-
Copy a table from the
--dbconnection to another saved connection, server to server. Refused unless the target connection allows writes.--db-copy-to CONNECTION- Target connection, a saved connection name or id. Required.
--db-copy-target SCHEMA.TABLE- Target table. Defaults to the source schema and table.
--db-copy-target-catalog NAME- Target catalog on a three-level engine.
--db-write-mode MODEcreate(default),appendorreplace.
--db-export SCHEMA --db CONNECTION --out-dir DIR [--to EXT] [--db-export-tables T1,T2] [--overwrite]-
Export the tables of SCHEMA into
--out-dir, one file per table named after it.--topicksparquet(default),csv,tsvorjsonl. Each table is read page by page, so its size does not matter. A file that is already there is skipped unless--overwrite. One failed table does not stop the rest; the exit code is 1 if any failed. On a three-level engine name the catalog with--db-catalog.--db-export-tables T1,T2- Tables to export, comma separated. Default: every table of the schema.
--sync-sql FILE --db CONNECTION --sync-table SCHEMA.TABLE --sync-on COLS-
Print the SQL that would make a live database table match FILE, and write nothing. Reads the table, matches rows on
--sync-on, and prints one transaction to stdout: DELETEs for rows only on the server, full-row UPDATEs for rows whose values differ, INSERTs for rows only in the file. Counts go to stderr, so the script itself pipes cleanly to a file or topsql. For teams whose database changes must be reviewed as a script rather than applied by a tool.Numbers are compared as numbers, so a file's
120.50and anumeric(12,2)column's120.50are not a change. Columns present only in the file are reported on stderr and skipped: this never emitsALTER TABLE. Only the rows loaded under the initial-load cap are compared; use--rowsto raise it.--sync-table SCHEMA.TABLE- Target table. A three-part CATALOG.SCHEMA.TABLE is accepted for the engines that have catalogs. Required.
--sync-on COLS- Comma-separated key columns matching file rows to table rows. Required: without a key there is no way to tell an updated row from a delete plus an insert.
Cloud and web¶
The cloud actions take s3://, az://, gs://, sftp:// and
davs:// URLs. Credentials come from a saved connection covering the
URL, else the ambient chain. See Cloud CLI.
--cloud-ls URL [--recursive]- List a cloud bucket or prefix, one folder level by default. Add
--recursiveto flatten everything under the prefix. --cloud-get URL --out FILE- Download one cloud object to FILE.
--cloud-put FILE --to URL- Upload a local file to the cloud URL.
--cloud-copy URL --to URL- Copy a cloud object, or a whole prefix (source ending in
/), to the--toURL. Within one bucket the backend copies server-side (an SFTP server streams, having no copy of its own); across buckets, accounts or providers the object is streamed in blocks, so object size does not drive memory. At most 10,000 objects per run. --cloud-move URL --to URL- Like
--cloud-copy, then delete the source. Object stores have no rename. The delete runs only after every copy succeeded. --cloud-delete URL [--recursive]- Delete a cloud object, or a whole prefix with
--recursive. Cannot be undone unless the bucket has versioning enabled. --api CONNECTION [--api-path PATH]-
Read a saved REST/JSON API endpoint (Settings -> API endpoints) as a table. It takes the connection's name or id, never a URL: the host and its credential were chosen when the connection was saved. Its authentication is applied and its pagination is walked, so the result is every page's rows. Reading stops at the endpoint's last page, at the row cap (
--rows), or at a fixed page ceiling; stopping on a limit is noted on stderr. A next-page link pointing at a different host stops the read with an error rather than being followed. For a one-off address, give any read action anhttps://URL instead. Seeocta --api.--api-path PATH- Path under the endpoint's base URL, overriding the connection's own. It is always joined under that base URL, so it cannot move the request to another host.
Connections¶
--list-connections- Print the saved cloud and database connections (names and targets only, never secrets).
--add-connection SPEC [--secret-env VAR] [--hmac-env VAR]-
Add or update a saved connection from a
key=value,key=valuespec.kind=andname=are required. A connection with the same name (ignoring capitals) is replaced wholesale, keeping its id and stored secret, so re-running a provisioning script is idempotent; omitted keys revert to defaults. Unknown keys are an error. Cloud (kind=s3|azure|gcs): bucket, region, endpoint, prefix, account, profile, account_level, anonymous, allow_writes, force_path_style, allow_http, parallel (how many objects at once in a folder copy, move, delete, union or comparison; default the Settings value). Database (kind=postgres|mysql|mssql|oracle|redshift|clickhouse|exasol|trino|athena|snowflake|databricks|bigquery): host, port, database, user, allow_writes, query_timeout.query_timeoutis whole seconds (default 60) and is read only by the engines that poll over HTTP for their results (Trino, Athena, Snowflake, Databricks, BigQuery). PostgreSQL, Redshift and MySQL also takesslmode(disable|prefer|require|verify-ca|verify-full, or MySQL'sdisabled|preferred|required|verify_identity; defaultprefer),sslrootcert(a PEM CA file) andhostaddr(an IP address to dial instead ofhost, which then only names the certificate). File database (kind=duckdb|sqlite):file(the path, which must exist) andallow_writes; other keys and--secret-envare refused. Only password authentication can be expressed here; other methods need the Settings dialog.--secret-env VAR- Name of an environment variable holding the secret, so it never appears in argv. Database: the password. S3: ACCESS_KEY_ID:SECRET_ACCESS_KEY[:TOKEN]. Azure: the account key or a SAS token. GCS uses application-default credentials and takes no secret.
--hmac-env VAR- Name of an environment variable holding a GCS connection's HMAC key pair as ACCESS_ID:SECRET. Only Delta and Iceberg tables in a library use it: DuckDB reaches Google Cloud Storage with HMAC keys alone. Refused for any other kind.
--remove-connection NAME- Remove a saved connection by name or id, and delete its stored secret. A name two saved connections share is refused and nothing is removed.
Libraries¶
A library gives a saved connection, a database, a schema, a table, a
local folder or file, or a cloud folder or object a name every SQL query
can use: --sql, the MCP run_sql tool and the app's SQL editors. A
single table is written by its bare name, a schema or folder as
library.table, a whole database with schemas as
library.schema.table. Nothing connects until a query names the
library, or --test-library runs. See Libraries.
--list-libraries- Print the saved libraries: name, kind, what each maps, how a query writes its tables, whether Fetch all is on, and the problem when a library cannot be used. Connects to nothing.
--add-library SPEC- Add or update a saved library from a
key=value,key=valuespec.name=is required, thenconnection=(a saved database or cloud connection, by name or id) orpath=(a local folder or file). Narrow a database withcatalog=,schema=andtable=; pick a cloud object or folder withkey=(a folder ends in/); pick one table of a multi-table file withtable=.fetch_all=truelifts the row limit for tables the library has to copy.subfolders=says how a folder library reads the folders below it:off(the default, only its own files),files(every file, its folder the schema),folders(each folder one table,key=valuefolder names as columns),names(files of one name one table, with afoldercolumn) orone_table(the whole folder, also a Delta, Iceberg or Lance table). A library with the same name is replaced, keeping its id. Only the name is checked (letters, digits and underscores, not starting with a digit, not an SQL keyword, unique); nothing connects. --remove-library NAME- Remove a saved library by name or id, and its cached tables.
--test-library NAME- Reach a saved library's source. A database is only logged in to and
a cloud folder asked for its first object (
Connection OK); a cloud file is looked up alone; a file or folder on this computer says how many tables it maps, or that its one table is there. Fetches no rows. The exit code is 1 when it cannot be reached.
MCP server¶
--mcp [--mcp-read-only] [--mcp-tools LIST] [--mcp-without LIST]-
Start a Model Context Protocol (MCP) server that speaks JSON-RPC on standard input / output, so an AI agent can read, query, compare and (unless read-only) write tabular data through Octa. The full tool list with descriptions is what the server returns for
tools/list; the MCP server guide has a page per tool. The tools come in groups:core(reading, describing, searching and SQL),quality(duplicates, outliers, PII, rules and correlations),compare(schemas, row-level differences and drift between two sources),combine(unions, joins, join keys and reconciling column names),reshape(pivot, resample, rolling windows, dedupe, impute, anonymise),databases(live database connections, their tables and queries),cloud(objects in S3, Azure and GCS) andwrite(writing files, editing tables, converting, charts and reports).The defaults (response row cap of 1000 rows, per-cell byte cap of 64 KiB, and file-loader cap of 2,000,000 rows) are configurable under Settings -> MCP and Settings -> Performance. They are read once at server startup; changes require a restart. Per call, pass
limit: 0to lift the response cap andunlimited: trueto lift the file-loader cap so the tool sees every row on disk. Parquet files with very many row groups fall back to a DuckDB-backed reader automatically. See Limits & truncation for the full mechanics.--mcp-read-only- Leave out every tool that writes: the
writegroup, thecloudtools other than the listing, and the two database writers. The server then exposes a read-only surface. See Read-only mode. --mcp-tools LIST- Advertise ONLY these tools, comma-separated. Takes group names
(above) and individual tool names, mixed freely:
--mcp-tools core,databasesor--mcp-tools read_table,run_sql. Without it every tool is advertised. A tool left out is also not callable. An unrecognised name is an error and the server does not start. This is the lever for an agent's context size: the client reads the tool list once and carries it in every request to its model, and all of Octa's tools together are roughly 48,000 tokens of description and schema. See Advertising fewer tools. --mcp-without LIST- Advertise everything except these, in the same spelling as
--mcp-tools. Applied after it, so the two combine:--mcp-tools core,write --mcp-without convert.
Common options¶
-f FORMAT,--format FORMAT-
Output format for every action that prints a table. It has no effect for
--convert(whose output format comes from the output path's extension),--export-schema(which emits source code chosen by-t), the plain listings--partition-by,--batch-convertand--to-workbookprint, or--mcp. FORMAT is one of:tsv(default): tab-separated values, one row per line, header row first. TAB and newline characters in cells are replaced with spaces, since TSV has no escape mechanism.json: pretty-printed JSON array of{column: value}objects. Numeric and boolean cells keep their native JSON types; dates, blobs and nested values become strings.csv: RFC 4180 CSV. Fields with comma, quote, or newline are properly quoted; embedded quotes are doubled.
--rows N|all- Override the initial-load row cap for this invocation. Streaming
formats (Parquet, CSV, TSV) honour a process-wide cap (default
2,000,000 rows). Pass a number (commas/underscores allowed) to
raise it or
allto disable the cap entirely. Applies to every action that reads a file. Most actions then warn on stderr when they stopped short.--tail,--check,--check-references,--diff,--drift-report,--convert,--batch-convert,--harmonise-schema,--partition-by,--split-rowsand--split-sizeread every row unless--rowssays otherwise, because stopping short would give a wrong answer or lose rows. A limited read is never written over its own file. --max-decompressed MB|unlimited- How large a
.gzor.zstinput may grow when unpacked, for this invocation or, given with--mcp, for the whole server (no tool call can raise it). Megabytes, 1 MB = 1,000,000 bytes, commas allowed.unlimitedremoves the limit. Without it, the decompression limit in Settings -> Performance applies (read fromsettings.toml), else 4,295 MB (4 GiB). A file that would unpack past the limit is refused, which guards against a tiny archive that unpacks to terabytes. -n N,--lines N- Row count for
--head,--tail, and--sample. Default 20. --seed N- Seed for
--sampleand--test-data, for reproducible output. Default 0. --sort-by COLS- Sort the rows of
--heador--convertby these columns, first key first (comma-separated or repeated). Sorts the rows that were read, up to the row cap: add--rows allto sort a whole large file. With--headthe sort happens before the first N rows are taken. --sort-desc COLS- The
--sort-bycolumns that sort high to low. --natural- Sort text naturally (file2 before file10) instead of letter by letter, the default.
--table NAME- For
--describe,--validate-schema,--unique-columns: the table to read from FILE when the source is multi-table. --table-a NAME,--table-b NAME- For
--compare-schemas,--compare-distributionsand--check-references: the table to read from each side when the source is multi-table (SQLite, DuckDB, GeoPackage). --out-dir DIR- Output directory for
--partition-by,--split-rows,--split-size,--batch-convert,--harmonise-schemaand--db-export(required; created if absent). --out FILE- Output file for
--cloud-getand for--harmonise-schema --combine. --to EXT|URL- The target extension for
--convert IN -(no leading dot, e.g.csv,parquet,json),--batch-convertand--db-export; the cloud URL for--cloud-put,--cloud-copyand--cloud-move. --overwrite- Replace existing outputs in
--batch-convert,--harmonise-schemaand--db-export, which skip them otherwise. --recursive- Walk subdirectories for
--schema-drift,--relationshipsand--harmonise-schema. For--cloud-lsit flattens the listing; for--cloud-deleteit is the required confirmation that a folder delete is meant. --ignore-case- Treat column names differing only in case as the same column
(
--schema-drift,--harmonise-schema). --password-env VAR- With
--convert, write only a password-protected AES-256 zip (out.csvbecomesout.csv.zip); with--batch-convert, write every output as its own zip (a.csvbecomesa.csv.zip). The passphrase is taken from environment variable VAR, never from argv. --compression CODEC- Compression codec for the written file:
uncompressed,snappy,zstd,gziporlz4. Applies to--convertand--batch-convert; Parquet targets only, ignored by other formats. An unknown name is rejected before any file is written. Omitted, the codec saved in Settings -> Saving files -> Write options is used, orzstdwhen nothing is saved. --row-group-size N- Rows per Parquet row group for
--convertand--batch-convert. Larger groups scan faster; smaller groups let readers skip more precisely. Omitted means the writer's own default. --completions SHELL- Print a shell completion script for SHELL to standard output and
exit. One of
bash,zsh,fish,powershell,elvish. The script is generated from Octa's own argument list, so it completes every flag this page documents. Wire it into the running shell witheval "$(octa --completions zsh)", or letinstall.shwrite the files under the install prefix. See--completions. -h,--help- Print the flag list and exit.
-hand--helpproduce the same output. --help-all- Print the flag list plus worked examples for every action, and exit. The examples are behind their own flag because printing them by default buried the flag list under something the size of this manual page.
--version- Print the Octa version and exit.
Output¶
Tabular data is written to stdout. Status messages, warnings,
and errors are written to stderr. This means
octa --sql FILE -q QUERY -f json | jq ... is safe even when an
error occurs, since the data stream stays clean.
--batch-convert, --harmonise-schema, --partition-by, --db-copy
and --db-export report progress on stderr while they run, on a
single line that rewrites itself ([137/500] file.csv ETA 1:12). The
line appears only when stderr is a terminal, so redirected output and
CI logs are unchanged.
Exit status¶
0- Success.
1-
Any error: invalid arguments, file not found, parse failure, write rejection, and so on. These actions also exit
1on a finding, so CI pipelines can gate on them directly:Action Exits 1 when --validate-schemaThe schemas differ. --schema-driftThe files disagree about their columns. --checkA rule failed or could not run. --check-referencesChild rows have no parent. --compare-foldersA file differs or is missing, or a folder hit the file limit. --drift-reportA --fail-ongate was breached.--overlapsOverlapping spans were found. --mergeA conflict is open. --recipeA step could not run. --harmonise-schemaA file was refused. --batch-convertAn input failed. --db-exportA table failed.
Examples¶
Look at a file¶
Open multiple files in the GUI:
Print the schema of a Parquet file:
Print the first 5 rows of a CSV as JSON:
Print the last rows / a reproducible random sample:
One-shot file snapshot:
Analyse¶
Find primary-key candidates:
Did a column's distribution move between two files?
octa --compare-distributions sales.csv --dist-column amount --dist-column-b amount_last_year
octa --compare-distributions q2.parquet --dist-column price --dist-file-b q3.parquet
Compare and check¶
Diff two schemas:
octa --compare-schemas v1.parquet v2.parquet
octa --compare-schemas a.sqlite b.sqlite --table-a users --table-b users -f json
Diff two files' rows:
octa --diff v1.csv v2.csv
octa --diff v1.csv v2.csv --diff-mode ordered
octa --diff v1.csv v2.csv --diff-mode join --diff-on id
octa --diff a.parquet b.parquet -f json
Validate a file against a JSON Schema in CI:
octa --export-schema sales.parquet -t json-schema > sales.schema.json
octa --validate-schema sales.parquet --expect-schema sales.schema.json
Find orders whose customer does not exist:
octa --check-references customers.csv --parent-column id \
--child-file orders.csv --child-column customer_id
Clean and transform¶
Add a stable key built from several columns:
octa --hash-columns customer_id,order_date orders.parquet -f csv > keyed.csv
octa --hash-columns first,last,birth --hash-algo sha256 --hash-trim --hash-upper people.csv
Combine and split¶
One workbook from several tables:
Fold a folder of parts into one file:
Convert and SQL¶
Convert formats:
Group-by aggregation:
Read every row of a huge file:
octa --sql huge.parquet -q 'SELECT count(*) FROM data' --rows all
octa --head huge.parquet -n 100 --rows 10,000,000
Pipe a SQL result through jq:
JOIN across formats:
octa --sql sales.parquet \
--sql-table customers=customers.csv \
-q 'SELECT c.name, SUM(d.amount) FROM data d
JOIN customers c ON d.cid = c.cid GROUP BY c.name'
ATTACH a DuckDB warehouse and JOIN against it:
octa --sql sales.parquet \
--sql-attach wh=warehouse.duckdb \
-q 'SELECT count(*) FROM data d
JOIN wh.main.products p ON d.cid = p.cid'
Write a SQL result back to a DuckDB schema:
octa --sql sales.parquet -q 'SELECT region, SUM(amount) AS total
FROM data GROUP BY region' \
--sql-write-to analytics.duckdb \
--sql-write-schema reports --sql-write-table q4_summary
Export a schema as Snowflake DDL:
Databases¶
Browse a live database connection:
octa --db-tables --db warehouse
octa --db-tables --db warehouse --db-catalog sales_prod
octa --db-query "SELECT * FROM public.users LIMIT 10" --db prod
Review a change as SQL before it touches the server:
Copy a table between two servers, replacing the target:
Cloud and web¶
octa --cloud-ls s3://bucket/prefix/
octa --cloud-ls s3://bucket/ --recursive
octa --cloud-get s3://bucket/data.parquet --out ./data.parquet
octa --cloud-put ./data.parquet --to s3://bucket/data.parquet
octa --cloud-copy s3://a/data/ --to gs://b/backup/
octa --cloud-move s3://a/old.csv --to s3://a/archive/old.csv
octa --cloud-delete s3://a/old.csv
octa --cloud-delete s3://a/scratch/ --recursive
# A saved REST/JSON endpoint, every page of it
octa --api Orders
octa --api Orders --api-path /customers -f csv > customers.csv
Connections¶
octa --list-connections
export S3_KEY='AKIAEXAMPLE:wJalrXUtnFEMI'
octa --add-connection 'kind=s3,name=prod,bucket=my-bucket,region=eu-central-1,allow_writes=true' \
--secret-env S3_KEY
octa --add-connection 'kind=postgres,name=warehouse,host=db.internal,database=analytics,user=reader' \
--secret-env PGPASSWORD
octa --remove-connection warehouse
octa --add-library 'name=sales,connection=warehouse,schema=sales'
octa --add-library "name=raw,path=$HOME/exports"
octa --sql -q 'SELECT r.*, s.region FROM raw.orders r JOIN sales.customers s USING (customer_id)'
MCP server¶
Start the MCP server:
Pipelines¶
- stands for standard input as a FILE, and for standard output as
the --convert target, so octa fits in the middle of a shell
pipeline.
# Read a table from a pipe: the format is sniffed from the bytes
curl -s https://example.org/sales.csv | octa --schema -
# Query it without ever writing a file
cat sales.csv | octa --sql - -q "SELECT city, SUM(amount) FROM data GROUP BY city"
# Convert on the way through; --to says what to write, since a pipe has no name
cat sales.csv | octa --convert - - --to json | jq '.[0]'
Reports and counts go to stderr, so what reaches the next command in the pipeline is exactly the data. Piped input is buffered to a temporary file first: every reader needs to seek (a Parquet footer is at the end of the file), so a pipe cannot be streamed straight through.
Reading from a URL¶
Anywhere a FILE is accepted, a URL works too.
# A plain web address: downloaded to a temp file, no configuration needed
octa --schema https://example.org/exports/sales.csv
octa --sql https://example.org/exports/sales.csv -q "SELECT * FROM data LIMIT 5"
# Cloud object storage resolves through the saved connections instead
octa --schema s3://bucket/sales.parquet
The format comes from the URL's path, ignoring any query string, so a
signed link ending sales.csv?token=... still reads as CSV; a URL
with no extension falls back to content sniffing. Both forms are
read-only, and a non-2xx response is an error naming the status code
rather than a file, so a 404 HTML page is never parsed as a one-column
table.
Tool-supplied URLs are restricted. When the address comes from an
agent (the MCP server or the in-app assistant) rather than from you,
Octa resolves the host first and refuses anything that is not globally
routable: loopback, private ranges, link-local (which includes the
cloud metadata endpoint at 169.254.169.254), and unique-local IPv6.
Redirects are not followed on that path either, since a redirect is
how a check on the first hop gets bypassed. Addresses you type
yourself, on the command line or in File > Open URL, are not
restricted: reading from localhost:8000 is a normal thing to ask
for.
Environment¶
OCTA_CONFIG_DIR- Directory holding
settings.toml, used verbatim on every platform and taking precedence overXDG_CONFIG_HOME/HOME/APPDATA. Required in containers, which usually set none of those; without it Octa reports that it has no config directory rather than silently running without settings. OCTA_DEBUG- Set to 1 to force debug mode on for one run without changing the saved setting: verbose logging, plus one log line per mouse press and release recording its position, whether it counted as a click, and which layer of the interface it reached. Intended for diagnosing the GUI itself, when the Settings dialog is the thing misbehaving and its checkbox cannot be reached. A build from source additionally outlines every clickable area on screen; release binaries cannot, since the toolkit compiles that drawing out. See Diagnostics.
OCTA_JEV_ENABLED,OCTA_JEV_MODEL,TYPESAFE_API_KEY- For
--classifyand the MCP toolclassify_rows.OCTA_JEV_ENABLED=1allows sending data to TypeSafe AI without the Settings switch,OCTA_JEV_MODELnames the model for one run, andTYPESAFE_API_KEYis the key, taking precedence over the one saved in Settings. See Classify with Jev. OCTA_NO_KEYRING- Set to 1 to skip the OS keyring entirely, so secrets are read from
and written to
settings.toml(chmod 0600). Secrets already fall back to the file when the keyring errors; this avoids the lookup on systems where it can never work, such as a container with no D-Bus. AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,AZURE_STORAGE_ACCOUNT,GOOGLE_APPLICATION_CREDENTIALS- Ambient cloud credentials, used when no saved connection covers a URL.
Files¶
$XDG_CONFIG_HOME/octa/settings.toml- Linux. User settings. Created on first launch with defaults. See Settings reference for every key.
$HOME/Library/Application Support/Octa/settings.toml- macOS. Same purpose.
%APPDATA%\Octa\settings.toml- Windows. Same purpose.
See Also¶
man(1), jq(1), duckdb(1), parquet-tools(1)
octa --help-allfor worked examples of every action.- Project homepage: https://github.com/thorstenfoltz/octa
- Online documentation: https://thorstenfoltz.github.io/octa/
- Common tasks covers worked CLI workflows (CSV to Parquet pipelines, JSON-line filtering, etc.).
Bugs / Feedback¶
Report bugs at https://github.com/thorstenfoltz/octa/issues.
Author¶
Thorsten Foltz and contributors.
Copyright¶
Copyright (c) 2026 Thorsten Foltz. Licensed under the MIT license.