CLI reference#
Every battinfo command, generated from the CLI itself (so it cannot drift). All commands and options:
Usage:
$ battinfo [OPTIONS] COMMAND [ARGS]...
Options:
--help: Show this message and exit.
Commands:
validate: Validate a BattINFO record (JSON Schema +…init: Create a minimal workspace scaffold with…map: Map canonical JSON to JSON-LD for a target.push: Publish battery data to Zenodo in one…query: Query BattINFO resources.create: Create BattINFO resources.publish: Publish BattINFO resolver artifacts.index: Build and inspect BattINFO indexes.save: Save canonical BattINFO resources locally.template: Generate starter templates.library: Manage reusable BattINFO library records.editorial: Validate and promote battinfo-records…workspace: Author BattINFO workspaces on disk.notebook: Notebook runtime recovery helpers.demo: Scaffold and verify end-to-end BattINFO…ingest: Register typed resource instances from…registry: Manage registry tenants, workspaces, and…dataset: Contribute measurement datasets: init ->…batch: Scaffold and manage multi-cell batch…config: Manage user preferences (creator, license,…properties: Browse valid spec property names and their…
battinfo validate#
Validate a BattINFO record (JSON Schema + semantic + SHACL) or a raw JSON profile document.
Usage:
$ battinfo validate [OPTIONS] {input_path}
Arguments:
input_path: [required]
Options:
--profile <str>: JSON Schema profile (used only for raw JSON, not full records). [default: cell-spec]--policy <str>: Validation policy: default|strict|publisher|ingest. [default: default]--format <str>: Output format: text|json. [default: text]--source-root <directory>: Canonical source root for cross-reference validation.--shacl / --no-shacl: Run SHACL shapes validation (cell-spec records only). [default: shacl]--help: Show this message and exit.
battinfo init#
Create a minimal workspace scaffold with an example JSON file.
Usage:
$ battinfo init [OPTIONS] {workspace_dir}
Arguments:
workspace_dir: [required]
Options:
--profile <str>: Profile to scaffold. [default: cell-spec]--help: Show this message and exit.
battinfo map#
Map canonical JSON to JSON-LD for a target.
Usage:
$ battinfo map [OPTIONS] {input_path}
Arguments:
input_path: [required]
Options:
--target <str>: Mapping target (‘domain-battery’ or ‘batterypass’). [default: batterypass]--out <path>: Output JSON-LD path. [required]--help: Show this message and exit.
battinfo push#
Publish battery data to Zenodo in one command.
Accepts three layouts: battinfo push ./flat_files/ –cell-spec “Energizer CR2032” # groups by filename battinfo push ./cell_folders/ –cell-spec “Energizer CR2032” # one subdir per cell battinfo push ./my_batch/ # existing batch.yaml
One-time setup: battinfo config set creator “Family, Given; Institution” battinfo config set zenodo_token <token>
Usage:
$ battinfo push [OPTIONS] {folder}
Arguments:
folder: Folder containing raw data files or an existing batch. [required]
Options:
-t, --cell-spec <str>: Cell type, e.g. ‘Energizer CR2032’. Required for unstructured folders.-n, --cells <int>: Number of cells (auto-detected from filenames if omitted).--batch-id <str>: Batch / lot identifier.--lab <str>: Lab name.--operator <str>: Operator name.-c, --creator <str>: Creator: “Family, Given; Affiliation”. Falls back to config.--token <str>: Zenodo API token. Falls back to config / ZENODO_API_TOKEN.--sandbox: Upload to sandbox.zenodo.org instead of production.--community <str>: Zenodo community. Default: from config.--no-community: Skip community submission.-y, --yes: Skip confirmation prompt.--dry-run: Package only — do not upload.--staging <path>: Override staging directory.--json: Emit machine-readable JSON to stdout.--help: Show this message and exit.
battinfo query#
Query BattINFO resources.
Usage:
$ battinfo query [OPTIONS] COMMAND [ARGS]...
Options:
--help: Show this message and exit.
Commands:
cell-spec: Query canonical cell types.cell-instance: Query canonical cell instances.dataset: Query canonical dataset records.test-protocol: Query canonical test protocols.test-spec: Query canonical test protocols.tests: Query canonical tests.
battinfo query cell-spec#
Query canonical cell types.
Usage:
$ battinfo query cell-spec [OPTIONS]
Options:
--id <str>: Filter by canonical cell-spec IRI.--manufacturer <str>: Filter by manufacturer.--chemistry <str>: Filter by chemistry.--cell-format <str>: Filter by cell form factor.--model-name-contains <str>: Filter by model name substring.--nominal-capacity-min <float>: Filter minimum nominal capacity.--nominal-capacity-max <float>: Filter maximum nominal capacity.--nominal-voltage-min <float>: Filter minimum nominal voltage.--nominal-voltage-max <float>: Filter maximum nominal voltage.--source-root <path>: Records root to search (default: ./examples).--include-packaged-examples: Also search BattINFO’s bundled example records.--limit <int range>: Maximum rows. [default: 50; x>=1]--offset <int range>: Start offset. [default: 0; x>=0]--format <str>: Output format: table|json. [default: table]--help: Show this message and exit.
battinfo query cell-instance#
Query canonical cell instances.
Usage:
$ battinfo query cell-instance [OPTIONS]
Options:
--id <str>: Filter by canonical cell IRI.--cell-spec-id <str>: Filter by canonical cell-spec IRI.--short-id <str>: Filter by short-id prefix.--serial-number <str>: Filter by serial metadata.--has-dataset <str>: Filter by dataset presence: true|false.--dataset-id <str>: Filter by linked dataset IRI.--source-type <str>: Filter by source type.--source-root <path>: Records root to search (default: ./examples).--include-packaged-examples: Also search BattINFO’s bundled example records.--limit <int range>: Maximum rows. [default: 50; x>=1]--offset <int range>: Start offset. [default: 0; x>=0]--format <str>: Output format: table|json. [default: table]--help: Show this message and exit.
battinfo query dataset#
Query canonical dataset records.
Usage:
$ battinfo query dataset [OPTIONS]
Options:
--id <str>: Filter by canonical dataset IRI.--title-contains <str>: Filter by title substring.--related-cell-id <str>: Filter by related cell IRI.--related-test-id <str>: Filter by related test IRI.--source-type <str>: Filter by source type.--data-format <str>: Filter by dataset format.--license <str>: Filter by license.--source-root <path>: Records root to search (default: ./examples).--include-packaged-examples: Also search BattINFO’s bundled example records.--limit <int range>: Maximum rows. [default: 50; x>=1]--offset <int range>: Start offset. [default: 0; x>=0]--format <str>: Output format: table|json. [default: table]--help: Show this message and exit.
battinfo query test-protocol#
Query canonical test protocols.
Usage:
$ battinfo query test-protocol [OPTIONS]
Options:
--id <str>: Filter by canonical test-protocol IRI.--kind <str>: Filter by protocol kind.--name-contains <str>: Case-insensitive substring filter on protocol name.--source-type <str>: Filter by source type.--source-root <path>: Records root to search (default: ./examples).--include-packaged-examples: Also search BattINFO’s bundled example records.--limit <int range>: Maximum rows. [default: 50; x>=1]--offset <int range>: Start offset. [default: 0; x>=0]--format <str>: Output format: table|json. [default: table]--help: Show this message and exit.
battinfo query test-spec#
Query canonical test protocols.
Usage:
$ battinfo query test-spec [OPTIONS]
Options:
--id <str>: Filter by canonical test-protocol IRI.--kind <str>: Filter by protocol kind.--name-contains <str>: Case-insensitive substring filter on protocol name.--source-type <str>: Filter by source type.--source-root <path>: Records root to search (default: ./examples).--include-packaged-examples: Also search BattINFO’s bundled example records.--limit <int range>: Maximum rows. [default: 50; x>=1]--offset <int range>: Start offset. [default: 0; x>=0]--format <str>: Output format: table|json. [default: table]--help: Show this message and exit.
battinfo query tests#
Query canonical tests.
Usage:
$ battinfo query tests [OPTIONS]
Options:
--id <str>: Filter by canonical test IRI.--cell-id <str>: Filter by related cell-instance IRI.--dataset-id <str>: Filter by linked dataset IRI.--kind <str>: Filter by test kind.--source-type <str>: Filter by source type.--source-root <path>: Records root to search (default: ./examples).--include-packaged-examples: Also search BattINFO’s bundled example records.--limit <int range>: Maximum rows. [default: 50; x>=1]--offset <int range>: Start offset. [default: 0; x>=0]--format <str>: Output format: table|json. [default: table]--help: Show this message and exit.
battinfo create#
Create BattINFO resources.
Usage:
$ battinfo create [OPTIONS] COMMAND [ARGS]...
Options:
--help: Show this message and exit.
Commands:
cell-instance: Create a canonical cell-instance record.
battinfo create cell-instance#
Create a canonical cell-instance record.
Usage:
$ battinfo create cell-instance [OPTIONS]
Options:
--cell-spec-id <str>: Canonical cell-spec IRI.--cell-spec <file>: Path to cell-spec JSON (alternative to –cell-spec-id).--model-name <str>: Resolve type by model name.--manufacturer <str>: Resolve type by manufacturer.--chemistry <str>: Resolve type by chemistry.--cell-format <str>: Resolve type by cell format.--serial-number <str>: Optional serial metadata.--dataset-id <str>: Optional linked dataset IRI.--source-type <str>: Source type: measurement|lab|bms|other. [default: measurement]--uid <str>: Optional 16-char UID (dashed or undashed).--source-root <path>: Records root for metadata type resolution (default: ./examples).--include-packaged-examples: Also match BattINFO’s bundled example records during type resolution.--out <path>: Optional output JSON path.--validate / --no-validate: Validate against schema. [default: validate]--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo publish#
Publish BattINFO resolver artifacts.
Usage:
$ battinfo publish [OPTIONS] COMMAND [ARGS]...
Options:
--help: Show this message and exit.
Commands:
cell-spec: Publish one cell type through the…record: Publish one record into resolver artifacts.batch: Publish a deterministic batch of records…
battinfo publish cell-spec#
Publish one cell type through the simplified BattINFO publish surface.
Usage:
$ battinfo publish cell-spec [OPTIONS]
Options:
--input <file>: Optional JSON draft or canonical cell-spec record to load.--manufacturer <str>: Cell manufacturer.--model <str>: Cell model.--cell-format <str>: Cell format, for example cylindrical or pouch.--chemistry <str>: Cell chemistry.--name <str>: Optional display name.--size-code <str>: Optional size code.--iec-code <str>: Optional IEC code.--country-of-origin <str>: Optional country of origin.--year <int>: Optional release or production year.--source-type <str>: Optional provenance source type.--source-file <str>: Optional provenance source file.--destination <str>: Publish destination: local|registry|battery-genome|staging|production. [default: local]--root <path>: Optional workspace root for generated artifacts.--force: Replace an existing generated workspace root.--validation-policy <str>: Validation policy: default|strict|publisher|ingest. [default: strict]--registry-url <str>: Optional registry base URL override.--api-key <str>: Optional registry API key override.--api-key-header <str>: Optional registry API key header.--platform-url <str>: Optional Battery Genome base URL override.--workspace-id <str>: Optional workspace id override.--publisher-id <str>: Optional publisher id override.--source-version <str>: Optional source version override.--format <str>: Output format: json|text. [default: json]--help: Show this message and exit.
battinfo publish record#
Publish one record into resolver artifacts.
Usage:
$ battinfo publish record [OPTIONS]
Options:
--input <file>: [required]--target-root <path>: Output artifact root directory. [default: .battinfo/resolver-site]--build-jsonld / --no-build-jsonld: Generate JSON-LD output. [default: build-jsonld]--build-html / --no-build-html: Generate HTML output. [default: build-html]--validate / --no-validate: Validate records before publishing. [default: validate]--validation-policy <str>: Validation policy: default|strict|publisher|ingest. [default: default]--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo publish batch#
Publish a deterministic batch of records into resolver artifacts.
Usage:
$ battinfo publish batch [OPTIONS]
Options:
--source-dir <directory>: One or more source directories. If omitted, API defaults are used.--target-root <path>: Output artifact root directory. [default: .battinfo/resolver-site]--glob <str>: File glob for batch inputs. [default: *.json]--build-jsonld / --no-build-jsonld: Generate JSON-LD output. [default: build-jsonld]--build-html / --no-build-html: Generate HTML output. [default: build-html]--validate / --no-validate: Validate records before publishing. [default: validate]--validation-policy <str>: Validation policy: default|strict|publisher|ingest. [default: default]--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo index#
Build and inspect BattINFO indexes.
Usage:
$ battinfo index [OPTIONS] COMMAND [ARGS]...
Options:
--help: Show this message and exit.
Commands:
build: Build an index from canonical example…stats: Show index statistics.
battinfo index build#
Build an index from canonical example resources.
Usage:
$ battinfo index build [OPTIONS]
Options:
--source-root <directory>: Root directory containing cell-spec, cell-instances, and dataset subdirectories. [default: examples]--out <path>: Output index JSON path. [default: .battinfo/index.json]--glob <str>: File glob to include in index build. [default: *.json]--validate / --no-validate: Validate records while indexing. [default: no-validate]--validation-policy <str>: Validation policy: default|strict|publisher|ingest. [default: default]--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo index stats#
Show index statistics.
Usage:
$ battinfo index stats [OPTIONS]
Options:
--index <file>: Path to index JSON built bybattinfo index build. [default: .battinfo/index.json]--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo save#
Save canonical BattINFO resources locally.
Usage:
$ battinfo save [OPTIONS] COMMAND [ARGS]...
Options:
--help: Show this message and exit.
Commands:
record: Save one canonical BattINFO record from JSON.batch: Save a deterministic batch of canonical…cell-spec: Save a cell-spec using either –input JSON…cell-instance: Save a cell-instance using either –input…dataset: Save a dataset using either –input JSON…test-protocol: Save a reusable test protocol using either…test-spec: Save a reusable test protocol using either…test: Save a test using either –input JSON or…
battinfo save record#
Save one canonical BattINFO record from JSON.
Usage:
$ battinfo save record [OPTIONS]
Options:
--input <file>: [required]--source-root <path>: Root directory containing cell-spec, cell-instances, and dataset. [default: examples]--mode <str>: Save mode: create_only|upsert. [default: create_only]--duplicate-policy <str>: Duplicate handling: error|return_existing. [default: error]--resolve-references / --no-resolve-references: Best-effort reference checks at save time; full link integrity is enforced by batch/index validation. [default: resolve-references]--publish / --no-publish: Publish resolver artifacts after saving. [default: no-publish]--publish-root <path>: Resolver artifact root. [default: .battinfo/resolver-site]--build-jsonld / --no-build-jsonld: Publish JSON-LD artifact. [default: build-jsonld]--build-html / --no-build-html: Publish HTML artifact. [default: build-html]--validate / --no-validate: Validate record before saving. [default: validate]--validation-policy <str>: Validation policy: default|strict|publisher|ingest. [default: default]--dry-run: Preview save without writing files.--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo save batch#
Save a deterministic batch of canonical JSON records.
Usage:
$ battinfo save batch [OPTIONS]
Options:
--source-dir <directory>: One or more source directories. If omitted, API defaults are used.--source-root <path>: Root directory containing canonical resources for save targets. [default: examples]--glob <str>: File glob for batch inputs. [default: *.json]--mode <str>: Save mode: create_only|upsert. [default: create_only]--duplicate-policy <str>: Duplicate handling: error|return_existing. [default: error]--resolve-references / --no-resolve-references: Allow deferred writes, then validate the resulting source tree as a set. [default: resolve-references]--publish / --no-publish: Publish resolver artifacts after saving. [default: no-publish]--publish-root <path>: Resolver artifact root. [default: .battinfo/resolver-site]--build-jsonld / --no-build-jsonld: Publish JSON-LD artifact. [default: build-jsonld]--build-html / --no-build-html: Publish HTML artifact. [default: build-html]--validate / --no-validate: Validate records before saving. [default: validate]--validation-policy <str>: Validation policy: default|strict|publisher|ingest. [default: default]--dry-run: Preview save without writing files.--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo save cell-spec#
Save a cell-spec using either –input JSON or inline draft fields.
Usage:
$ battinfo save cell-spec [OPTIONS]
Options:
--input <file>: Draft or canonical JSON.--manufacturer <str>: Manufacturer name (required when –input omitted).--model-name <str>: Model name (required when –input omitted).--chemistry <str>: Chemistry label. [default: unknown]--cell-format <str>: Cell format. [default: unknown]--size-code <str>: Optional size code.--country-of-origin <str>: Optional country of origin.--year <int>: Optional model or release year.--source-file <str>: Source file label for provenance (recorded only when given).--source-url <str>: Optional source URL.--uid <str>: Optional 16-char UID (dashed or undashed).--specs <file>: Optional specs JSON object.--source-root <path>: Save source root. [default: examples]--mode <str>: Save mode: create_only|upsert. [default: create_only]--duplicate-policy <str>: Duplicate handling: error|return_existing. [default: error]--publish / --no-publish: Publish resolver artifacts after saving. [default: no-publish]--publish-root <path>: Resolver artifact root. [default: .battinfo/resolver-site]--validate / --no-validate: Validate record before saving. [default: validate]--validation-policy <str>: Validation policy: default|strict|publisher|ingest. [default: default]--dry-run: Preview save without writing files.--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo save cell-instance#
Save a cell-instance using either –input JSON or inline draft fields.
Usage:
$ battinfo save cell-instance [OPTIONS]
Options:
--input <file>: Draft or canonical JSON.--cell-spec-id <str>: Canonical cell-spec IRI (required when –input omitted).--serial-number <str>: Optional serial metadata.--dataset-id <str>: Optional linked dataset IRI. Repeat for multiple.--source-type <str>: Source type: measurement|lab|bms|other. [default: measurement]--uid <str>: Optional 16-char UID (dashed or undashed).--source-root <path>: Save source root. [default: examples]--mode <str>: Save mode: create_only|upsert. [default: create_only]--duplicate-policy <str>: Duplicate handling: error|return_existing. [default: error]--resolve-references / --no-resolve-references: Resolve linked IDs against source_root. [default: resolve-references]--publish / --no-publish: Publish resolver artifacts after saving. [default: no-publish]--publish-root <path>: Resolver artifact root. [default: .battinfo/resolver-site]--validate / --no-validate: Validate record before saving. [default: validate]--validation-policy <str>: Validation policy: default|strict|publisher|ingest. [default: default]--dry-run: Preview save without writing files.--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo save dataset#
Save a dataset using either –input JSON or inline draft fields.
Usage:
$ battinfo save dataset [OPTIONS]
Options:
--input <file>: Draft or canonical JSON.--title <str>: Dataset title (required when –input omitted).--description <str>: Dataset description.--license <str>: Dataset license.--data-format <str>: Dataset format string.--access-url <str>: Dataset access URL.--source-type <str>: Source type: measurement|lab|simulation|external|other. [default: other]--related-cell-id <str>: Related cell IRI. Repeat for multiple.--related-test-id <str>: Related test IRI. Repeat for multiple.--checksum-algorithm <str>: Checksum algorithm (sha256|sha512|md5|other).--checksum-value <str>: Checksum value.--uid <str>: Optional 16-char UID (dashed or undashed).--source-root <path>: Save source root. [default: examples]--mode <str>: Save mode: create_only|upsert. [default: create_only]--duplicate-policy <str>: Duplicate handling: error|return_existing. [default: error]--resolve-references / --no-resolve-references: Resolve linked IDs against source_root. [default: resolve-references]--publish / --no-publish: Publish resolver artifacts after saving. [default: no-publish]--publish-root <path>: Resolver artifact root. [default: .battinfo/resolver-site]--validate / --no-validate: Validate record before saving. [default: validate]--validation-policy <str>: Validation policy: default|strict|publisher|ingest. [default: default]--dry-run: Preview save without writing files.--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo save test-protocol#
Save a reusable test protocol using either –input JSON or inline draft fields.
Usage:
$ battinfo save test-protocol [OPTIONS]
Options:
--input <file>: Draft or canonical JSON.--name <str>: Protocol name (required when –input omitted).--kind <str>: Test kind. [default: other]--description <str>: Optional protocol description.--version <str>: Optional protocol version.--protocol-url <str>: Optional protocol URL.--source-type <str>: Source type: manual|lab|simulation|other. [default: manual]--uid <str>: Optional 16-char UID (dashed or undashed).--source-root <path>: Save source root. [default: examples]--mode <str>: Save mode: create_only|upsert. [default: create_only]--duplicate-policy <str>: Duplicate handling: error|return_existing. [default: error]--resolve-references / --no-resolve-references: Resolve linked IDs against source_root. [default: resolve-references]--publish / --no-publish: Publish resolver artifacts after saving. [default: no-publish]--publish-root <path>: Resolver artifact root. [default: .battinfo/resolver-site]--validate / --no-validate: Validate record before saving. [default: validate]--validation-policy <str>: Validation policy: default|strict|publisher|ingest. [default: default]--dry-run: Preview save without writing files.--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo save test-spec#
Save a reusable test protocol using either –input JSON or inline draft fields.
Usage:
$ battinfo save test-spec [OPTIONS]
Options:
--input <file>: Draft or canonical JSON.--name <str>: Protocol name (required when –input omitted).--kind <str>: Test kind. [default: other]--description <str>: Optional protocol description.--version <str>: Optional protocol version.--protocol-url <str>: Optional protocol URL.--source-type <str>: Source type: manual|lab|simulation|other. [default: manual]--uid <str>: Optional 16-char UID (dashed or undashed).--source-root <path>: Save source root. [default: examples]--mode <str>: Save mode: create_only|upsert. [default: create_only]--duplicate-policy <str>: Duplicate handling: error|return_existing. [default: error]--resolve-references / --no-resolve-references: Resolve linked IDs against source_root. [default: resolve-references]--publish / --no-publish: Publish resolver artifacts after saving. [default: no-publish]--publish-root <path>: Resolver artifact root. [default: .battinfo/resolver-site]--validate / --no-validate: Validate record before saving. [default: validate]--validation-policy <str>: Validation policy: default|strict|publisher|ingest. [default: default]--dry-run: Preview save without writing files.--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo save test#
Save a test using either –input JSON or inline draft fields.
Usage:
$ battinfo save test [OPTIONS]
Options:
--input <file>: Draft or canonical JSON.--cell-id <str>: Canonical cell-instance IRI (required when –input omitted).--name <str>: Test name (required when –input omitted).--kind <str>: Test kind. [default: other]--protocol-id <str>: Optional reusable test-protocol IRI.--status <str>: Optional test status.--protocol-name <str>: Optional protocol name.--protocol-url <str>: Optional protocol URL.--instrument-name <str>: Optional instrument name.--dataset-id <str>: Linked dataset IRI. Repeat for multiple.--source-type <str>: Source type: measurement|lab|simulation|manual|other. [default: measurement]--uid <str>: Optional 16-char UID (dashed or undashed).--source-root <path>: Save source root. [default: examples]--mode <str>: Save mode: create_only|upsert. [default: create_only]--duplicate-policy <str>: Duplicate handling: error|return_existing. [default: error]--resolve-references / --no-resolve-references: Resolve linked IDs against source_root. [default: resolve-references]--publish / --no-publish: Publish resolver artifacts after saving. [default: no-publish]--publish-root <path>: Resolver artifact root. [default: .battinfo/resolver-site]--validate / --no-validate: Validate record before saving. [default: validate]--validation-policy <str>: Validation policy: default|strict|publisher|ingest. [default: default]--dry-run: Preview save without writing files.--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo template#
Generate starter templates.
Usage:
$ battinfo template [OPTIONS] COMMAND [ARGS]...
Options:
--help: Show this message and exit.
Commands:
cell-spec: Generate a starter template for a…cell-spec-draft: Generate a starter authoring draft for a…cell-instance: Generate a starter template for a…dataset: Generate a starter template for a dataset…test-protocol: Generate a starter template for a reusable…test-spec: Generate a starter template for a reusable…test: Generate a starter template for a test…
battinfo template cell-spec#
Generate a starter template for a cell-spec record.
Usage:
$ battinfo template cell-spec [OPTIONS]
Options:
--manufacturer <str>: Manufacturer name. [default: ExampleManufacturer]--model-name <str>: Model name. [default: MODEL-001]--chemistry <str>: Chemistry label. [default: unknown]--cell-format <str>: Cell format. [default: unknown]--country-of-origin <str>: Optional country of origin.--year <int>: Optional model or release year.--uid <str>: Optional 16-char UID. [default: 0000000000000000]--out <path>: Optional output JSON path.--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo template cell-spec-draft#
Generate a starter authoring draft for a hand-edited cell-spec JSON file.
Usage:
$ battinfo template cell-spec-draft [OPTIONS]
Options:
--manufacturer <str>: Manufacturer name placeholder. [default: ExampleManufacturer]--model-name <str>: Model name placeholder. [default: MODEL-001]--chemistry <str>: Chemistry label placeholder. [default: unknown]--cell-format <str>: Cell format placeholder. [default: unknown]--size-code <str>: Optional size code placeholder.--iec-code <str>: Optional IEC code placeholder.--country-of-origin <str>: Optional country of origin placeholder.--year <int>: Optional model or release year placeholder.--positive-electrode-basis <str>: Optional positive electrode basis placeholder.--negative-electrode-basis <str>: Optional negative electrode basis placeholder.--datasheet-revision <str>: Optional datasheet revision placeholder.--out <path>: Optional output JSON path.--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo template cell-instance#
Generate a starter template for a cell-instance record.
Usage:
$ battinfo template cell-instance [OPTIONS]
Options:
--cell-spec-id <str>: Canonical cell-spec IRI. [default: https://w3id.org/battinfo/spec/0000-0000-0000-0000]--source-type <str>: Source type: measurement|lab|bms|other. [default: measurement]--uid <str>: Optional 16-char UID. [default: 0000000000000000]--out <path>: Optional output JSON path.--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo template dataset#
Generate a starter template for a dataset record.
Usage:
$ battinfo template dataset [OPTIONS]
Options:
--title <str>: Dataset title. [default: Example Dataset]--source-type <str>: Source type: measurement|lab|simulation|external|other. [default: other]--uid <str>: Optional 16-char UID. [default: 0000000000000000]--related-cell-id <str>: Related cell IRI. Repeat for multiple. [default: https://w3id.org/battinfo/cell/0000-0000-0000-0000]--related-test-id <str>: Related test IRI. Repeat for multiple.--out <path>: Optional output JSON path.--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo template test-protocol#
Generate a starter template for a reusable test-protocol record.
Usage:
$ battinfo template test-protocol [OPTIONS]
Options:
--name <str>: Human-readable protocol name. [default: Example Test Protocol]--kind <str>: Test kind. [default: other]--source-type <str>: Source type: manual|lab|simulation|other. [default: manual]--uid <str>: Optional 16-char UID. [default: 0000000000000000]--out <path>: Optional output JSON path.--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo template test-spec#
Generate a starter template for a reusable test-protocol record.
Usage:
$ battinfo template test-spec [OPTIONS]
Options:
--name <str>: Human-readable protocol name. [default: Example Test Protocol]--kind <str>: Test kind. [default: other]--source-type <str>: Source type: manual|lab|simulation|other. [default: manual]--uid <str>: Optional 16-char UID. [default: 0000000000000000]--out <path>: Optional output JSON path.--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo template test#
Generate a starter template for a test record.
Usage:
$ battinfo template test [OPTIONS]
Options:
--cell-id <str>: Canonical cell-instance IRI under test. [default: https://w3id.org/battinfo/cell/0000-0000-0000-0000]--name <str>: Human-readable test name. [default: Example Test]--kind <str>: Test kind. [default: other]--source-type <str>: Source type: measurement|lab|simulation|manual|other. [default: measurement]--uid <str>: Optional 16-char UID. [default: 0000000000000000]--dataset-id <str>: Linked dataset IRI. Repeat for multiple.--out <path>: Optional output JSON path.--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo library#
Manage reusable BattINFO library records.
Usage:
$ battinfo library [OPTIONS] COMMAND [ARGS]...
Options:
--help: Show this message and exit.
Commands:
build-rdf: Build domain-battery JSON-LD artifacts for…query: Query reusable library records.save: Save reusable BattINFO library records…template: Generate reusable library templates.
battinfo library build-rdf#
Build domain-battery JSON-LD artifacts for the reusable cell-spec library.
Usage:
$ battinfo library build-rdf [OPTIONS]
Options:
--input-dir <directory>: Directory containing reusable library cell-specification JSON files. [default: .battinfo/library/cell-spec]--output-jsonld-dir <path>: Directory for per-record domain-battery JSON-LD artifacts. [default: .battinfo/library-rdf/cell-spec]--aggregate-jsonld <path>: Path for the aggregated library JSON-LD file. [default: .battinfo/library/cell-spec.jsonld]--manifest-json <path>: Path for the generated library manifest JSON. [default: .battinfo/library-rdf/cell-spec.index.json]--glob <str>: File glob used to select library cell specifications. [default: *.json]--clean-output: Remove existing JSON-LD outputs before writing.--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo library query#
Query reusable library records.
Usage:
$ battinfo library query [OPTIONS] COMMAND [ARGS]...
Options:
--help: Show this message and exit.
Commands:
cell-spec: Query reusable library cell-spec…
battinfo library query cell-spec#
Query reusable library cell-spec specifications.
Usage:
$ battinfo library query cell-spec [OPTIONS]
Options:
--id <str>: Filter by reusable cell-spec IRI.--manufacturer <str>: Filter by manufacturer.--model-contains <str>: Filter by model substring.--chemistry <str>: Filter by chemistry.--cell-format <str>: Filter by cell form factor.--size-code <str>: Filter by size code.--positive-electrode-basis <str>: Filter by positive electrode basis.--negative-electrode-basis <str>: Filter by negative electrode basis.--nominal-capacity-min <float>: Filter minimum nominal capacity.--nominal-capacity-max <float>: Filter maximum nominal capacity.--nominal-voltage-min <float>: Filter minimum nominal voltage.--nominal-voltage-max <float>: Filter maximum nominal voltage.--library-dir <path>: Reusable library cell-specification directory. [default: .battinfo/library/cell-spec]--limit <int range>: Maximum rows. [default: 50; x>=1]--offset <int range>: Start offset. [default: 0; x>=0]--format <str>: Output format: table|json. [default: table]--help: Show this message and exit.
battinfo library save#
Save reusable BattINFO library records locally.
Usage:
$ battinfo library save [OPTIONS] COMMAND [ARGS]...
Options:
--help: Show this message and exit.
Commands:
cell-spec: Save a reusable library cell type from…
battinfo library save cell-spec#
Save a reusable library cell type from cell-specification JSON or inline fields.
Usage:
$ battinfo library save cell-spec [OPTIONS]
Options:
--input <file>: Draft or canonical cell-specification JSON.--manufacturer <str>: Manufacturer name (required when –input omitted).--model <str>: Model name (required when –input omitted).--chemistry <str>: Chemistry label. [default: unknown]--cell-format <str>: Cell format. [default: unknown]--positive-electrode-basis <str>: Positive electrode basis (required when –input omitted).--negative-electrode-basis <str>: Negative electrode basis (required when –input omitted).--size-code <str>: Optional size code.--source-type <str>: Source type label. [default: datasheet]--source-name <str>: Optional source name.--source-file <str>: Source file label for provenance (recorded only when given).--source-url <str>: Optional source URL.--uid <str>: Optional 16-char UID (dashed or undashed).--property <file>: Optional JSON object for cell-specification specification.property.--library-dir <path>: Reusable library cell-specification directory. [default: .battinfo/library/cell-spec]--packaged-dir <path>: Packaged reusable library cell-specification directory. [default: src/battinfo/data/library/cell-spec]--mode <str>: Save mode: create_only|upsert. [default: create_only]--duplicate-policy <str>: Duplicate handling: error|return_existing. [default: error]--validate / --no-validate: Validate cell specification before saving. [default: validate]--sync-packaged-copy / --no-sync-packaged-copy: Sync the saved cell specification into package data. [default: sync-packaged-copy]--build-rdf / --no-build-rdf: Build JSON-LD library artifacts after saving. [default: no-build-rdf]--output-jsonld-dir <path>: Directory for per-record domain-battery JSON-LD artifacts. [default: .battinfo/library-rdf/cell-spec]--aggregate-jsonld <path>: Path for the aggregated library JSON-LD file. [default: .battinfo/library/cell-spec.jsonld]--manifest-json <path>: Path for the generated library manifest JSON. [default: .battinfo/library-rdf/cell-spec.index.json]--clean-output: Clean existing JSON-LD outputs before rebuilding.--dry-run: Preview save without writing files.--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo library template#
Generate reusable library templates.
Usage:
$ battinfo library template [OPTIONS] COMMAND [ARGS]...
Options:
--help: Show this message and exit.
Commands:
cell-spec: Generate a starter reusable library…
battinfo library template cell-spec#
Generate a starter reusable library cell-spec specification.
Usage:
$ battinfo library template cell-spec [OPTIONS]
Options:
--manufacturer <str>: Manufacturer name. [default: ExampleManufacturer]--model <str>: Model name. [default: MODEL-001]--chemistry <str>: Chemistry label. [default: unknown]--cell-format <str>: Cell format. [default: unknown]--positive-electrode-basis <str>: Positive electrode basis. [default: unknown]--negative-electrode-basis <str>: Negative electrode basis. [default: unknown]--uid <str>: Optional 16-char UID. [default: 0000000000000000]--out <path>: Optional output JSON path.--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo editorial#
Validate and promote battinfo-records style staging drafts.
Usage:
$ battinfo editorial [OPTIONS] COMMAND [ARGS]...
Options:
--help: Show this message and exit.
Commands:
validate-staging-cell-spec: Validate one single-file staging cell-spec…validate-staging-cell-spec-batch: Validate all staging cell-spec drafts in a…promote-staging-cell-spec: Promote one staging cell-spec draft into…promote-staging-cell-spec-batch: Promote all staging cell-spec drafts into…validate-staging-dataset: Validate one staging dataset record and…validate-staging-dataset-batch: Validate all staging dataset records in a…promote-staging-dataset: Promote one staging dataset record into…promote-staging-dataset-batch: Promote all staging dataset records into…build-curated-cell-spec-submission: Build a registry publication package for…publish-curated-cell-spec: Publish one curated cell-spec record to…
battinfo editorial validate-staging-cell-spec#
Validate one single-file staging cell-spec draft and preview its canonical record.
Usage:
$ battinfo editorial validate-staging-cell-spec [OPTIONS]
Options:
--input <file>: Staging JSON draft. [required]--validation-policy <str>: Validation policy: default|strict|publisher|ingest. [default: default]--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo editorial validate-staging-cell-spec-batch#
Validate all staging cell-spec drafts in a directory.
Usage:
$ battinfo editorial validate-staging-cell-spec-batch [OPTIONS]
Options:
--input-dir <directory>: Directory of staging JSON drafts. [required]--glob <str>: Glob for staging drafts. [default: *.json]--validation-policy <str>: Validation policy: default|strict|publisher|ingest. [default: default]--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo editorial promote-staging-cell-spec#
Promote one staging cell-spec draft into records/cell-spec/<record-id>/record.json.
Usage:
$ battinfo editorial promote-staging-cell-spec [OPTIONS]
Options:
--input <file>: Staging JSON draft. [required]--curated-root <path>: Curated cell-spec root. [default: records/cell-spec]--record-id <str>: Override the curated record id.--validation-policy <str>: Validation policy: default|strict|publisher|ingest. [default: default]--dry-run: Preview promotion without writing files.--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo editorial promote-staging-cell-spec-batch#
Promote all staging cell-spec drafts into curated record.json directories.
Usage:
$ battinfo editorial promote-staging-cell-spec-batch [OPTIONS]
Options:
--input-dir <directory>: Directory of staging JSON drafts. [required]--curated-root <path>: Curated cell-spec root. [default: records/cell-spec]--glob <str>: Glob for staging drafts. [default: *.json]--validation-policy <str>: Validation policy: default|strict|publisher|ingest. [default: default]--dry-run: Preview promotion without writing files.--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo editorial validate-staging-dataset#
Validate one staging dataset record and preview its curated record id.
Usage:
$ battinfo editorial validate-staging-dataset [OPTIONS]
Options:
--input <file>: Staging dataset JSON record. [required]--validation-policy <str>: Validation policy: default|strict|publisher|ingest. [default: default]--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo editorial validate-staging-dataset-batch#
Validate all staging dataset records in a directory.
Usage:
$ battinfo editorial validate-staging-dataset-batch [OPTIONS]
Options:
--input-dir <directory>: Directory of staging dataset records. [required]--glob <str>: Glob for staging records. [default: *.json]--validation-policy <str>: Validation policy: default|strict|publisher|ingest. [default: default]--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo editorial promote-staging-dataset#
Promote one staging dataset record into records/dataset/<record-id>/record.json.
Usage:
$ battinfo editorial promote-staging-dataset [OPTIONS]
Options:
--input <file>: Staging dataset JSON record. [required]--curated-root <path>: Curated dataset root. [default: records/dataset]--record-id <str>: Override the curated record id.--validation-policy <str>: Validation policy: default|strict|publisher|ingest. [default: default]--dry-run: Preview promotion without writing files.--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo editorial promote-staging-dataset-batch#
Promote all staging dataset records into curated record.json directories.
Usage:
$ battinfo editorial promote-staging-dataset-batch [OPTIONS]
Options:
--input-dir <directory>: Directory of staging dataset records. [required]--curated-root <path>: Curated dataset root. [default: records/dataset]--glob <str>: Glob for staging records. [default: *.json]--validation-policy <str>: Validation policy: default|strict|publisher|ingest. [default: default]--dry-run: Preview promotion without writing files.--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo editorial build-curated-cell-spec-submission#
Build a registry publication package for one curated cell-spec record.
Usage:
$ battinfo editorial build-curated-cell-spec-submission [OPTIONS]
Options:
--input <file>: Curated cell-spec record.json or equivalent canonical JSON. [required]--workspace-id <str>: Registry workspace id. [required]--publisher-id <str>: Registry publisher id. [required]--source-version <str>: Registry source_version for this publication run. [required]--source-local-id <str>: Override source_local_id; defaults to the curated record id inferred from the path.--title <str>: Override submission title.--publication-mode <str>: Publication intent mode. [default: canonical-publication]--source-system <str>: Submission provenance source_system. [default: battinfo-records]--workflow-name <str>: Submission provenance workflow_name. [default: curated-cell-spec-publication]--validation-policy <str>: Validation policy: default|strict|publisher|ingest. [default: default]--out <path>: Optional path to write the generated submission package JSON.--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo editorial publish-curated-cell-spec#
Publish one curated cell-spec record to battinfo-registry.
Usage:
$ battinfo editorial publish-curated-cell-spec [OPTIONS]
Options:
--input <file>: Curated cell-spec record.json or equivalent canonical JSON. [required]--workspace-id <str>: Registry workspace id. [required]--publisher-id <str>: Registry publisher id. [required]--source-version <str>: Registry source_version for this publication run. [required]--registry-url <str>: Registry base URL, for example http://127.0.0.1:8000. [required]--api-key <str>: Registry submission API key. [required]--api-key-header <str>: Registry submission API key header. [default: X-Battinfo-API-Key]--source-local-id <str>: Override source_local_id; defaults to the curated record id inferred from the path.--title <str>: Override submission title.--publication-mode <str>: Publication intent mode. [default: canonical-publication]--source-system <str>: Submission provenance source_system. [default: battinfo-records]--workflow-name <str>: Submission provenance workflow_name. [default: curated-cell-spec-publication]--validation-policy <str>: Validation policy: default|strict|publisher|ingest. [default: default]--timeout-sec <float>: HTTP timeout in seconds. [default: 30.0]--out <path>: Optional path to write the generated submission package JSON before posting.--format <str>: Output format: table|json. [default: json]--help: Show this message and exit.
battinfo workspace#
Author BattINFO workspaces on disk.
Usage:
$ battinfo workspace [OPTIONS] COMMAND [ARGS]...
Options:
--help: Show this message and exit.
Commands:
init: Initialize a disk-backed BattINFO…validate: Validate a disk-backed BattINFO workspace…bundle: Bundle a disk-backed BattINFO workspace…
battinfo workspace init#
Initialize a disk-backed BattINFO workspace scaffold.
Usage:
$ battinfo workspace init [OPTIONS] {workspace_dir}
Arguments:
workspace_dir: [required]
Options:
--force: Overwrite an existing non-empty workspace directory.--format <str>: Output format: json|text. [default: json]--help: Show this message and exit.
battinfo workspace validate#
Validate a disk-backed BattINFO workspace and write dist/validation-report.json.
Usage:
$ battinfo workspace validate [OPTIONS] {workspace_dir}
Arguments:
workspace_dir: [required]
Options:
--policy <str>: Validation policy: default|strict|publisher|ingest. [default: strict]--format <str>: Output format: json|text. [default: json]--help: Show this message and exit.
battinfo workspace bundle#
Bundle a disk-backed BattINFO workspace into dist artifacts.
Usage:
$ battinfo workspace bundle [OPTIONS] {workspace_dir}
Arguments:
workspace_dir: [required]
Options:
--policy <str>: Validation policy: default|strict|publisher|ingest. [default: strict]--format <str>: Output format: json|text. [default: json]--help: Show this message and exit.
battinfo notebook#
Notebook runtime recovery helpers.
Usage:
$ battinfo notebook [OPTIONS] COMMAND [ARGS]...
Options:
--help: Show this message and exit.
Commands:
recover: Recover from a stuck VS Code notebook…
battinfo notebook recover#
Recover from a stuck VS Code notebook restart by stopping repo-local ipykernel processes.
Usage:
$ battinfo notebook recover [OPTIONS]
Options:
--workspace-root <directory>: [default: .]--venv-path <path>: Relative or absolute venv root. [default: .venv]--clear-local-runtime / --keep-local-runtime: Remove local .jupyter-runtime-test state after stopping kernels. [default: clear-local-runtime]--force-kill / --no-force-kill: Force-kill repo-local notebook kernels that do not exit after terminate(). [default: force-kill]--format <str>: Output format: json|text. [default: json]--help: Show this message and exit.
battinfo demo#
Scaffold and verify end-to-end BattINFO demos.
Usage:
$ battinfo demo [OPTIONS] COMMAND [ARGS]...
Options:
--help: Show this message and exit.
Commands:
setup: Author a BattINFO demo environment from…verify: Run the BattINFO demo pipeline through…
battinfo demo setup#
Author a BattINFO demo environment from Python objects and write a submission package.
Usage:
$ battinfo demo setup [OPTIONS] [root]
Arguments:
root: [default: .battinfo/demo-e2e]
Options:
--registry <str>: Registry tenant/workspace slug. [default: digibatt/hello-world]--publisher-id <str>: Publisher id used for the generated submission package. [default: demo-lab]--version <str>: Release version and submission source_version. [default: 1.0.0]--force: Replace the existing demo root before regenerating it.--format <str>: Output format: json|text. [default: json]--help: Show this message and exit.
battinfo demo verify#
Run the BattINFO demo pipeline through registry publication and optional platform verification.
Usage:
$ battinfo demo verify [OPTIONS] [root]
Arguments:
root: [default: .battinfo/demo-e2e]
Options:
--registry-url <str>: Registry base URL, for example http://127.0.0.1:8000. [required]--api-key <str>: Registry submission API key. [required]--platform-url <str>: Optional Battery Genome base URL, for example https://www.battery-genome.org.--registry <str>: Registry tenant/workspace slug. [default: digibatt/hello-world]--publisher-id <str>: Publisher id used for the generated submission package. [default: demo-lab]--version <str>: Release version and submission source_version. [default: 1.0.0]--api-key-header <str>: Registry submission API key header. [default: X-Battinfo-API-Key]--timeout-sec <float>: Timeout window for registry and platform checks. [default: 30.0]--poll-interval-sec <float>: Polling interval while waiting for responses. [default: 1.0]--force: Replace the existing demo root before regenerating it.--format <str>: Output format: json|text. [default: json]--help: Show this message and exit.
battinfo ingest#
Register typed resource instances from folder-based evidence.
Usage:
$ battinfo ingest [OPTIONS] COMMAND [ARGS]...
Options:
--help: Show this message and exit.
Commands:
inspect: Inspect one ingest folder and infer…init: Write battinfo.ingest.json so later…build: Create the linked ingest workspace from…publish: Build and publish one ingest workspace in…
battinfo ingest inspect#
Inspect one ingest folder and infer tests/datasets without writing any records.
Usage:
$ battinfo ingest inspect [OPTIONS] {ingest_root}
Arguments:
ingest_root: [required]
Options:
--resource-type <str>: Typed ingest subject. Today: cell-instance. [default: cell-instance]--type-record <path>: Curated type record path.--manifest <path>: Optional battinfo.ingest.json path.--resource-iri <str>: Existing BattINFO resource IRI to preserve.--resource-name <str>: Human-facing instance label.--workspace-id <str>: Workspace id used for bundling/publication.--publisher-id <str>: Publisher id used for bundling/publication.--source-version <str>: Submission source version.--license <str>: Dataset license to apply.--format <str>: Output format: json|text. [default: json]--help: Show this message and exit.
battinfo ingest init#
Write battinfo.ingest.json so later build/publish commands only need the folder path.
Usage:
$ battinfo ingest init [OPTIONS] {ingest_root}
Arguments:
ingest_root: [required]
Options:
--resource-type <str>: Typed ingest subject. Today: cell-instance. [default: cell-instance]--type-record <path>: Curated type record path.--manifest <path>: Where to write battinfo.ingest.json.--resource-iri <str>: Existing BattINFO resource IRI to preserve.--resource-name <str>: Human-facing instance label.--workspace-id <str>: Workspace id used for bundling/publication.--publisher-id <str>: Publisher id used for bundling/publication.--source-version <str>: Submission source version.--license <str>: Dataset license to apply.--force: Overwrite an existing manifest.--format <str>: Output format: json|text. [default: json]--help: Show this message and exit.
battinfo ingest build#
Create the linked ingest workspace from one evidence folder.
Usage:
$ battinfo ingest build [OPTIONS] {ingest_root}
Arguments:
ingest_root: [required]
Options:
--resource-type <str>: Typed ingest subject. Today: cell-instance. [default: cell-instance]--type-record <path>: Curated type record path.--manifest <path>: Optional battinfo.ingest.json path.--workspace-root <path>: Where to write the authored workspace.--resource-iri <str>: Existing BattINFO resource IRI to preserve.--resource-name <str>: Human-facing instance label.--workspace-id <str>: Workspace id used for bundling/publication.--tenant <str>: Optional tenant id recorded in the workspace manifest.--publisher-id <str>: Publisher id used for bundling/publication.--source-version <str>: Submission source version.--license <str>: Dataset license to apply.--artifact-base-url <str>: Optional public base URL for packaged artifact files.--force: Replace the existing workspace root before regenerating it.--bundle / --no-bundle: Also build the submission package after authoring the workspace. [default: bundle]--validation-policy <str>: Validation policy: strict|set|quick. [default: strict]--format <str>: Output format: json|text. [default: json]--help: Show this message and exit.
battinfo ingest publish#
Build and publish one ingest workspace in a single command.
Registry credentials and artifact storage are read from environment variables when not supplied as flags:
BATTINFO_REGISTRY_URL registry base URL BATTINFO_API_KEY publisher API key BATTINFO_STORAGE_BUCKET S3/R2 bucket name (enables artifact upload) BATTINFO_STORAGE_ENDPOINT_URL S3-compatible endpoint (for R2, Minio, etc.) BATTINFO_STORAGE_ACCESS_KEY_ID BATTINFO_STORAGE_SECRET_ACCESS_KEY BATTINFO_STORAGE_PUBLIC_BASE_URL public CDN base URL for artifact links
Usage:
$ battinfo ingest publish [OPTIONS] {ingest_root}
Arguments:
ingest_root: [required]
Options:
--registry-url <str>: Registry base URL. Env: BATTINFO_REGISTRY_URL.--api-key <str>: Registry submission API key. Env: BATTINFO_API_KEY.--resource-type <str>: Typed ingest subject. Today: cell-instance. [default: cell-instance]--type-record <path>: Curated type record path.--manifest <path>: Optional battinfo.ingest.json path.--workspace-root <path>: Where to write the authored workspace.--resource-iri <str>: Existing BattINFO resource IRI to preserve.--resource-name <str>: Human-facing instance label.--workspace-id <str>: Workspace id used for bundling/publication.--tenant <str>: Optional tenant id recorded in the workspace manifest.--publisher-id <str>: Publisher id used for publication.--source-version <str>: Submission source version.--license <str>: Dataset license to apply.--artifact-base-url <str>: Public base URL for packaged artifact files. Env: BATTINFO_STORAGE_PUBLIC_BASE_URL.--platform-url <str>: Optional Battery Genome base URL.--api-key-header <str>: Registry API key header. [default: X-Battinfo-API-Key]--timeout-sec <float>: Registry submission timeout in seconds. [default: 300.0]--force: Replace the existing workspace root before regenerating it.--validation-policy <str>: Validation policy: strict|set|quick. [default: strict]--process-artifacts: Convert timeseries CSVs to BDF and generate static/interactive plots. Requires battinfo.--format <str>: Output format: json|text. [default: json]--help: Show this message and exit.
battinfo registry#
Manage registry tenants, workspaces, and publishers.
Usage:
$ battinfo registry [OPTIONS] COMMAND [ARGS]...
Options:
--help: Show this message and exit.
Commands:
bootstrap: Idempotently create a tenant, workspace,…
battinfo registry bootstrap#
Idempotently create a tenant, workspace, and publisher on the registry.
Writes the publisher API key to –api-key-file (or BATTINFO_API_KEY_FILE) when a new publisher is created. Safe to re-run; existing resources return HTTP 409 and are silently accepted.
Required env vars (or pass as flags): BATTINFO_REGISTRY_URL registry base URL BATTINFO_ADMIN_TOKEN registry admin token
Usage:
$ battinfo registry bootstrap [OPTIONS]
Options:
--tenant-id <str>: Tenant id to create or verify. [default: battinfo]--tenant-name <str>: Tenant display name. [default: BattINFO]--workspace-id <str>: Workspace id to create or verify. [required]--workspace-name <str>: Workspace display name (defaults to workspace-id).--publisher-id <str>: Publisher id to create or verify. [required]--publisher-name <str>: Publisher display name (defaults to publisher-id).--api-key-file <path>: File to write the publisher API key to. Env: BATTINFO_API_KEY_FILE.--registry-url <str>: Registry base URL. Env: BATTINFO_REGISTRY_URL.--admin-token <str>: Registry admin token. Env: BATTINFO_ADMIN_TOKEN.--format <str>: Output format: json|text. [default: text]--help: Show this message and exit.
battinfo dataset#
Contribute measurement datasets: init -> process -> publish.
Usage:
$ battinfo dataset [OPTIONS] COMMAND [ARGS]...
Options:
--help: Show this message and exit.
Commands:
init: Create a new dataset contribution folder…process: Validate metadata, infer tests from data…publish: Publish the processed contribution folder.
battinfo dataset init#
Create a new dataset contribution folder with template and instructions.
After running this command:
Open battinfo.yaml and fill in the required fields.
Put your CSV data files in the data/ sub-folder. Name them: YYYY-MM-DD__testtype__temperature.csv e.g. 2026-03-05__ici__25degC.csv
Run: battinfo dataset process <folder>
Usage:
$ battinfo dataset init [OPTIONS] {output}
Arguments:
output: Path for the new contribution folder. [required]
Options:
-n, --cell-name <str>: Short label for this cell (e.g. serial number).--cell-spec-iri <str>: BattINFO cell-spec IRI.--lab <str>: Your institution or lab name.--license <str>: Data licence identifier. [default: CC-BY-4.0]--force: Overwrite an existing folder.--help: Show this message and exit.
battinfo dataset process#
Validate metadata, infer tests from data files, and build the submission package.
Accepts either a single cell folder (with battinfo.yaml) or a batch folder (with batch.yaml). When given a batch folder, all cell sub-folders are processed automatically.
Usage:
$ battinfo dataset process [OPTIONS] {folder}
Arguments:
folder: [required]
Options:
--force: Rebuild from scratch.--validation-policy <str>: strict|set|quick [default: strict]--json: Emit machine-readable JSON to stdout.--help: Show this message and exit.
battinfo dataset publish#
Publish the processed contribution folder.
Options: –zenodo Upload to Zenodo (creates a draft for your review) –sandbox Use the Zenodo sandbox for testing –token Your Zenodo personal access token (or set the ZENODO_API_TOKEN environment variable)
Get a Zenodo token at: https://zenodo.org/account/settings/applications/tokens/new/ Required scopes: deposit:write
Usage:
$ battinfo dataset publish [OPTIONS] {folder}
Arguments:
folder: [required]
Options:
--zenodo: Publish to Zenodo (creates a draft deposit).--sandbox: Use the Zenodo sandbox (for testing).--token <str>: Zenodo API token. Env: ZENODO_API_TOKEN (or legacy ZENODO_TOKEN).--community <str>: Zenodo community identifier. [default: battery-genome]--no-community: Skip community submission.--help: Show this message and exit.
battinfo batch#
Scaffold and manage multi-cell batch contributions.
Usage:
$ battinfo batch [OPTIONS] COMMAND [ARGS]...
Options:
--help: Show this message and exit.
Commands:
init: Scaffold a multi-cell batch directory.add: Add more cells to an existing batch…status: Show the current state of a batch at a…package: Build a flat Zenodo upload package from a…upload: Upload a staged Zenodo package to Zenodo…
battinfo batch init#
Scaffold a multi-cell batch directory.
Creates one sub-folder per cell, each with: battinfo.yaml <- pre-filled cell identity and provenance data/ <- drop raw CSV/data files here photos/ <- optional microscopy or label images
After running this command:
Drop data files into each cell’s data/ folder. Name them: YYYY-MM-DD__testtype__temperature.csv e.g. 2025-06-01__capacity_check__25degC.csv
Edit battinfo.yaml in each cell folder if you have more metadata.
Process each cell: battinfo dataset process <cell-folder>
Usage:
$ battinfo batch init [OPTIONS] {output_dir}
Arguments:
output_dir: Directory to create for this batch. [required]
Options:
-t, --cell-spec <str>: Cell type IRI or name, e.g. “Energizer CR2032”. [required]-n, --count <int>: Number of cells received. [required]--batch-id <str>: Batch / lot identifier.--lab <str>: Institution or lab name.--operator <str>: Person who operated the test equipment.--project <str>: Project name or ID this batch belongs to.--license <str>: SPDX licence identifier. [default: CC-BY-4.0]--iris <str>: Comma-separated list of pre-assigned BattINFO cell IRIs (one per cell).--serials <str>: Comma-separated serial numbers (one per cell, used as folder names).--force: Overwrite an existing output directory.--help: Show this message and exit.
battinfo batch add#
Add more cells to an existing batch directory.
Reads batch.yaml to inherit cell type, lab, operator, and project. New cells are numbered after the existing ones. Provide –batch-id / –operator / –project to override for the new cells. Updates the count in batch.yaml automatically.
Usage:
$ battinfo batch add [OPTIONS] {batch_dir}
Arguments:
batch_dir: Existing batch directory. [required]
Options:
-n, --count <int>: Number of additional cells to add. [required]--batch-id <str>: Override batch / lot ID for the new cells.--lab <str>: Override lab name for the new cells.--operator <str>: Override operator for the new cells.--project <str>: Override project for the new cells.--license <str>: Override SPDX licence for the new cells.--iris <str>: Comma-separated pre-assigned BattINFO cell IRIs for the new cells.--serials <str>: Comma-separated serial numbers for the new cells.--help: Show this message and exit.
battinfo batch status#
Show the current state of a batch at a glance.
Reports how many cells have data, how many are annotated, BDF conversion status, and what to run next.
Usage:
$ battinfo batch status [OPTIONS] {batch_dir}
Arguments:
batch_dir: Batch directory. [required]
Options:
--json: Emit machine-readable JSON to stdout.--help: Show this message and exit.
battinfo batch package#
Build a flat Zenodo upload package from a batch of cells.
Discovers all cell sub-folders, collects raw data files, and produces: staging/ battinfo.bundle.json <- harvest ingestion target battinfo.publish.jsonld <- full semantic graph ro-crate-metadata.json <- file inventory with placeholder URLs dataset-001.csv <- raw cycler files (canonical naming) dataset-001.bdf.parquet <- BDF converted (if present) …
After packaging, upload with: battinfo batch upload <staging-dir> –token $ZENODO_TOKEN –sandbox
Usage:
$ battinfo batch package [OPTIONS] {batch_dir}
Arguments:
batch_dir: Batch directory created bybatch init. [required]
Options:
-s, --staging <path>: Output directory for the Zenodo package. Default: <batch-dir>/staging/.-c, --creator <str>: Creator: “Family, Given; Affiliation”. Repeat for multiple. Falls back tobattinfo config set creator.--community <str>: Zenodo community. Default: value from config or battinfo-reference.--no-community: Skip community submission.--placeholder <str>: Placeholder token for Zenodo record ID in URLs. [default: ZENODO_RECORD_ID]--json: Emit machine-readable JSON to stdout.--help: Show this message and exit.
battinfo batch upload#
Upload a staged Zenodo package to Zenodo (or sandbox).
Workflow:
Creates an empty deposit to obtain the pre-reserved record ID.
Patches placeholder URLs in staged files with the real record ID.
Uploads all files to the deposit.
Sets metadata (title, keywords, community, creators).
Leaves as draft for review, or publishes if –publish is set.
The deposit URL is printed at the end – open it to review and publish.
Usage:
$ battinfo batch upload [OPTIONS] {staging_dir}
Arguments:
staging_dir: Staging directory produced bybatch package. [required]
Options:
--token <str>: Zenodo API token. Env: ZENODO_API_TOKEN.--sandbox: Use Zenodo sandbox (sandbox.zenodo.org).--community <str>: Zenodo community. Default: value from config or battinfo-reference.--no-community: Skip community submission.-c, --creator <str>: Creator: “Family, Given; Affiliation”. Repeat for multiple. Falls back tobattinfo config set creator.--publish: Publish immediately (default: leave as draft).--placeholder <str>: Placeholder token used in package. [default: ZENODO_RECORD_ID]--json: Emit machine-readable JSON to stdout.--help: Show this message and exit.
battinfo config#
Manage user preferences (creator, license, community).
Usage:
$ battinfo config [OPTIONS] COMMAND [ARGS]...
Options:
--help: Show this message and exit.
Commands:
set: Set a user preference that is applied as…show: Show current user preferences.
battinfo config set#
Set a user preference that is applied as the default across all commands.
Examples: battinfo config set creator “Clark, Simon; SINTEF” battinfo config set creator “Clark, Simon; SINTEF | Smith, Jane; NTNU” battinfo config set license CC-BY-4.0 battinfo config set community battinfo-reference
Usage:
$ battinfo config set [OPTIONS] {key} {value}
Arguments:
key: Config key: creator, license, community, zenodo_token. [required]value: Value to store. [required]
Options:
--help: Show this message and exit.
battinfo config show#
Show current user preferences.
Usage:
$ battinfo config show [OPTIONS]
Options:
--help: Show this message and exit.
battinfo properties#
Browse valid spec property names and their accepted units.
Usage:
$ battinfo properties [OPTIONS] COMMAND [ARGS]...
Options:
--help: Show this message and exit.
Commands:
list: List all valid spec property names with…show: Show valid units and an example entry for…
battinfo properties list#
List all valid spec property names with their accepted units.
Usage:
$ battinfo properties list [OPTIONS]
Options:
--category <str>: Filter by category (e.g. capacity, voltage, current).--format <str>: Output format: table|json. [default: table]--help: Show this message and exit.
battinfo properties show#
Show valid units and an example entry for a single spec property.
Usage:
$ battinfo properties show [OPTIONS] {name}
Arguments:
name: Spec property name (e.g. nominal_capacity). [required]
Options:
--format <str>: Output format: table|json. [default: table]--help: Show this message and exit.