chainabit bit export
Published (2.2.0)
This command is not included in Published (2.2.0). It is available in Development (2.2.0).
Development (2.2.0)
Export a Bit as CSV
Synopsis
chainabit bit export <id> [options]Arguments
| Argument | Description | Default |
|---|---|---|
<id> | Required. | — |
Options
| Option | Description | Default |
|---|---|---|
--format <format> | Export format. Accepted values: csv. | "csv" |
--out <path> | Save to this path | — |
--force | Replace an existing file | — |
Options shared by every command are described in Global options and shared behavior.
Behavior
Exports one Bit as CSV. csv is the only format, and it is the default.
- Without
--out, the CSV is written to standard output, so you can redirect it in your shell. - With
--out <path>, the CSV is saved to that file instead. An existing file is never replaced unless you pass--force, and the command refuses to write through a link even with--force.
The CSV starts with a header row of column names, followed by the Bit's row.
The same command is also available as chainabit bits export.
Output
Without --out, prints the raw CSV; in an interactive terminal, control characters are removed first. With --out, prints the saved path. With --json, the output is a record with id, format and content (the CSV text), or, together with --out, id, format, path and sizeBytes.
Authentication and permissions
You must be signed in. The service decides whether you may export a given Bit; a refusal is shown as an error and nothing changes.
Examples
chainabit bit export 00000000-0000-4000-8000-000000000001
chainabit bit export 00000000-0000-4000-8000-000000000001 --out ./reference-bit.csv
chainabit bit export 00000000-0000-4000-8000-000000000001 --out ./reference-bit.csv --force