This package has been deprecated

Author message:

@sanity/import-cli is now part of @sanity/import

@sanity/import-cli

3.37.2 • Public • Published

@sanity/import-cli

CLI tool that imports documents from an ndjson file or URL

Installation

npm install -g @sanity/import-cli

Usage

  CLI tool that imports documents from an ndjson file or URL

  Usage
    $ sanity-import -p <projectId> -d <dataset> -t <token> sourceFile.ndjson

  Options
    -p, --project <projectId> Project ID to import to
    -d, --dataset <dataset> Dataset to import to
    -t, --token <token> Token to authenticate with
    --asset-concurrency <concurrency> Number of parallel asset imports
    --replace Replace documents with the same IDs
    --missing Skip documents that already exist
    --allow-failing-assets Skip assets that cannot be fetched/uploaded
    --replace-assets Skip reuse of existing assets
    --skip-cross-dataset-references Skips references to other datasets
    --help Show this help

  Examples
    # Import "./my-dataset.ndjson" into dataset "staging"
    $ sanity-import -p myPrOj -d staging -t someSecretToken my-dataset.ndjson

    # Import into dataset "test" from stdin, read token from env var
    $ cat my-dataset.ndjson | sanity-import -p myPrOj -d test -

  Environment variables (fallbacks for missing flags)
    --token = SANITY_IMPORT_TOKEN

License

MIT-licensed. See LICENSE.

Package Sidebar

Install

npm i @sanity/import-cli

Weekly Downloads

859

Version

3.37.2

License

MIT

Unpacked Size

11.7 kB

Total Files

5

Last publish

Collaborators

  • armandocerna
  • daniel.malmer
  • jordanl17
  • tambet
  • jtpetty
  • drewsanity
  • refiito
  • sergeisarviro
  • ash
  • indrek.karner
  • cngonzalez-sanity
  • rdunk
  • rneatherway-sanity
  • ricokahler
  • pedro-sanity
  • jonabc
  • kenjonespizza
  • pauloborgesf
  • binoy14
  • simen.svale
  • svirs
  • josh_sanity_io
  • joneidejohnsen
  • nina.andal
  • rankers
  • snorreeb
  • mattcraig
  • vincentquigley
  • stipsan
  • michael-sanity
  • rubioz
  • tonina
  • ritasdias
  • simeonsanity
  • kmelve
  • bjoerge
  • rexxars
  • skogsmaskin
  • robinpyon
  • mariuslundgard
  • sanity-io
  • evenw
  • radhe_sanity
  • rbotten
  • judofyr
  • obliadp
  • dcilke
  • fredcarlsen
  • hermanw
  • sgulseth
  • atombender