A Node.js CLI for file-processing chores, tabular data workflows, rename automation, and Codex-assisted tasks.
Stable release scope in v0.1.1:
- interactive mode + nested CLI commands, including
Escexit on command menus doctorcapability checks- CSV / TSV / JSON conversion and preview workflows, including explicit headerless preview support
data extractfor shaped-table materialization across delimited, SQLite, and Excel inputs- DuckDB-backed query, reviewed header-mapping, source-shape replay, and Parquet preview workflows
md to-docxviapandoc- preview-first rename flows
ffmpeg-backed video wrappers, including GIF quality modes and profiles
Install globally from npm:
npm install -g cdx-choresRecommended first check after install:
cdx-chores doctorShow command help:
cdx-chores --helpStart interactive mode (default when no args are provided in a TTY):
cdx-choresRuntime requirement:
- Node.js
>= 22.5.0
| Command group | Important subcommands | Purpose | Capability notes |
|---|---|---|---|
doctor |
doctor, doctor --json |
Inspect current tool and feature readiness | Run this first on a new machine or after environment changes |
data |
preview, extract, query, query codex, parquet preview, duckdb doctor, duckdb extension install, (conversion actions) |
Tabular conversion, preview, extraction, DuckDB-backed SQL query, and Codex SQL drafting | lightweight csv / tsv / json preview and conversion stay on the in-memory PapaParse-backed path; extract is best suited to shaping one clean table, especially from awkward Excel inputs, while query is the more expressive lane for nontrivial filtering, projection, and output selection |
md |
to-docx, frontmatter-to-json |
Markdown conversion and metadata extraction | to-docx requires pandoc |
rename |
file, batch, cleanup, apply |
Safe rename previews, cleanup flows, and replayable apply runs | Codex analyzer routes are optional, not required for standard rename usage |
video |
convert, resize, gif |
ffmpeg-backed video wrappers |
Requires ffmpeg |
interactive |
interactive or no args |
Guided menu flow for supported command groups | Requires a TTY |
Data notes:
- conversion actions are
json-to-csv,json-to-tsv,csv-to-json,csv-to-tsv,tsv-to-csv, andtsv-to-json data extractmaterializes one shaped table from one input file to.csv,.tsv, or.json; inv0.1.1its strongest shaping surface is Excel-oriented cleanup, where it can target a sheet or range, set--header-rowand--body-start-row, and replay reviewed source-shape or header-mapping artifacts for awkward header bands or merged-cell layoutsdata queryis the current general-purpose lane when you need richer filtering or transformation logic thandata extractexposes without SQL
The npm package installs the CLI and its Node.js dependencies, but not every command is fully self-contained. Some workflows depend on machine-level tools or environment state outside the main CLI package.
Use cdx-chores doctor before relying on a command in a script, a CI job, or a fresh machine setup.
| Area | What ships with cdx-chores |
Additional requirement | How to verify or repair |
|---|---|---|---|
md to-docx |
Markdown-to-DOCX command wrapper | pandoc must be installed on PATH |
Run cdx-chores doctor |
video convert, video resize, video gif |
Video command wrappers | ffmpeg must be installed on PATH |
Run cdx-chores doctor |
data extract, data query for csv, tsv, parquet |
Extract and query command surfaces plus DuckDB integration | DuckDB runtime must be available in the current install/runtime | Run cdx-chores doctor |
data extract, data query for sqlite, excel |
Extract and query command surfaces | Required DuckDB extension must be loadable for the current DuckDB runtime | Run cdx-chores doctor, then cdx-chores data duckdb doctor or cdx-chores data duckdb extension install <name> |
data extract reviewed suggestions, data query codex |
Codex-assisted source shaping, semantic header review, and natural-language SQL drafting | Codex support must be configured and an auth/session signal must be available | Run cdx-chores doctor |
For automation or machine-readable checks, use:
cdx-chores doctor --jsonText output:
cdx-chores doctorJSON output:
cdx-chores doctor --jsonJSON to CSV:
cdx-chores data json-to-csv -i ./input.json -o ./output.csvJSON to TSV:
cdx-chores data json-to-tsv -i ./input.json -o ./output.tsvCSV to JSON:
cdx-chores data csv-to-json -i ./input.csv -o ./output.json --prettyCSV to TSV:
cdx-chores data csv-to-tsv -i ./input.csv -o ./output.tsvTSV to CSV:
cdx-chores data tsv-to-csv -i ./input.tsv -o ./output.csvTSV to JSON:
cdx-chores data tsv-to-json -i ./input.tsv -o ./output.json --prettyPreview CSV, TSV, or JSON as a bounded table:
cdx-chores data preview ./input.csv --rows 20
cdx-chores data preview ./input.tsv --rows 20Preview a headerless CSV with generated column_n names:
cdx-chores data preview ./input.csv --no-headerInteractive lightweight conversion groups these formats under:
data -> convert
Extract one shaped table from an Excel sheet:
cdx-chores data extract ./input.xlsx --source Sheet1 --header-row 2 --body-start-row 3 -o ./output.tsvExtract from a messier Excel range with explicit body rows:
cdx-chores data extract ./messy.xlsx --source Report --range A1:Z200 --header-row 4 --body-start-row 6 -o ./output.csvPreview Parquet through DuckDB:
cdx-chores data parquet preview ./input.parquet --rows 20Run a SQL query against one input file:
cdx-chores data query ./input.csv --sql "select * from file limit 20"Draft SQL from natural-language intent:
cdx-chores data query codex ./input.csv --intent "show the top 10 rows with the highest revenue"Inspect or repair DuckDB extension state for query inputs such as SQLite or Excel:
cdx-chores data duckdb doctor
cdx-chores data duckdb extension install sqliteMarkdown to DOCX:
cdx-chores md to-docx -i ./notes.md -o ./notes.docxMarkdown frontmatter to JSON:
cdx-chores md frontmatter-to-json -i ./notes.md --prettyBatch rename preview:
cdx-chores rename batch ./images --prefix gallery --dry-runSingle-file rename preview:
cdx-chores rename file ./images/IMG_1024.JPG --prefix gallery --dry-runCleanup an existing filename by normalizing a matched timestamp:
cdx-chores rename cleanup ./captures/'Screenshot 2026-03-02 at 4.53.04 PM.png' --hint timestamp --style slug --dry-runCleanup a directory with mixed hint families and recursive traversal:
cdx-chores rename cleanup ./captures --hint date,serial,uid --recursive --max-depth 1 --dry-runCodex-assisted batch rename preview:
cdx-chores rename batch ./images --prefix gallery --codex --dry-runApply an exact dry-run snapshot later:
cdx-chores rename apply ./rename-plan-20260225T214012Z-a1b2c3d4.csvRecursive image rename with depth limit:
cdx-chores rename batch ./photos --recursive --max-depth 1 --ext jpg,png,webp --dry-runCustom filename template:
cdx-chores rename batch ./images --prefix trip --pattern "{date}-{stem}-{serial}" --dry-runUID-backed template example:
cdx-chores rename file ./images/IMG_1024.JPG --pattern "{uid}-{stem}" --dry-runTemplate notes:
- available placeholders include
{prefix},{timestamp},{timestamp_local},{timestamp_utc},{timestamp_local_iso},{timestamp_utc_iso},{timestamp_local_12h},{timestamp_utc_12h},{date},{date_local},{date_utc},{stem},{uid}, and{serial...} --prefixis optional--codexis the common smart-routing flag for CLI mode--codex-imagesand--codex-docsare explicit analyzer overrides{uid}renders a deterministicuid-<token>fragment{serial...}enables serial controls--serial-widthuses a digit count such as2or4, not#
Timestamp placeholder notes:
{timestamp}uses UTC as the backward-compatible default{timestamp_local}uses local time explicitly{timestamp_utc}uses UTC explicitly{timestamp_local_iso}uses local time with a numeric offset such as+0800{timestamp_utc_iso}uses UTC withZ{timestamp_local_12h}and{timestamp_utc_12h}use compact12hroutput withAMorPM--timestamp-timezone local|utcoverrides{timestamp}only
Route A examples:
cdx-chores rename file ./images/IMG_1024.JPG --pattern "{timestamp_utc_iso}-{stem}" --dry-run
cdx-chores rename batch ./images --pattern "{timestamp_local_12h}-{stem}" --dry-runCleanup notes:
rename cleanup <path>accepts either a single file or a directory--hintis the canonical flag and--hintsis accepted as an alias- supported hint families are
date,timestamp,serial, anduid - cleanup applies multiple hint families in this order:
timestamp, thendate, thenserial, thenuid --styledefaults topreserve; supported values arepreserveandslug--timestamp-action keep|removeapplies only when--hint timestampis active--conflict-strategycurrently supportsskip,number, anduid-suffix
Cleanup option comparison:
| Surface | Current role | Current values / scope |
|---|---|---|
--hint |
Choose fragment families to clean | date, timestamp, serial, uid |
--style |
Format surviving text after cleanup | preserve, slug |
--timestamp-action |
Keep or remove matched timestamp text | keep, remove with --hint timestamp |
--conflict-strategy |
Resolve collisions only when the cleaned target conflicts | skip, number, uid-suffix |
Video to GIF:
cdx-chores video gif -i ./clip.mp4 -o ./clip.gif --width 480 --fps 10Video to GIF with explicit quality mode:
cdx-chores video gif -i ./clip.mp4 -o ./clip-quality.gif --mode quality --width 480 --fps 10Video to GIF with a quality profile:
cdx-chores video gif -i ./clip.mp4 -o ./clip-screen.gif --gif-profile screen --width 480 --fps 10Video to GIF with explicit look tuning:
cdx-chores video gif -i ./clip.mp4 -o ./clip-vibrant.gif --mode quality --gif-profile video --gif-look vibrant --width 480 --fps 10Video resize with aspect-ratio-preserving scale:
cdx-chores video resize -i ./clip.mp4 -o ./clip-small.mp4 --scale 0.5Video resize with explicit dimensions override:
cdx-chores video resize -i ./clip.mp4 -o ./clip-720p.mp4 --width 1280 --height 720Rename:
docs/guides/rename-common-usage.mddocs/guides/rename-timestamp-format-matrix.mddocs/guides/rename-scope-and-codex-capability-guide.md
Data:
docs/guides/data-preview-usage.mddocs/guides/data-extract-usage.mddocs/guides/data-schema-and-mapping-usage.mddocs/guides/data-query-usage.mddocs/guides/data-duckdb-usage.mddocs/guides/data-query-codex-usage.md
Video:
docs/guides/video-gif-usage-and-quality-modes.mddocs/guides/video-resize-usage-and-ux.md
Install dependencies:
bun installBuild the package:
bun run buildRun the built CLI locally:
bun run cli --helpThis project is licensed under the MIT License. See the LICENSE file for details.