npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@qri-io/qri-node

v0.0.3

Published

A node wrapper for Qri CLI

Downloads

6

Readme

qri-node

A nascent nodejs wrapper for Qri CLI.

Usage

You should have qri CLI already installed. You should have also run qri setup to create a username and a local qri repo.

All methods take a flags argument as an object which will be converted into CLI flags. Use qri [command] --help for a list of flags.

const qri = require('@qri-io/qri-node')

// save a dataset version
qri.save('me/some-cool-dataset', {
  body: 'full/path/to/body.csv',
  file: [
    'full/path/to/meta.json',
    'full/path/to/readme.md',
    'full/path/to/structure.json'
  ]
})

// push a dataset version to a remote/qri.cloud
qri.push('me/some-cool-dataset')

// get the dataset body as a string
qri.get('me/some-cool-dataset', 'body')

// push a dataset to qri.cloud
qri.push('me/some-cool-dataset')

// list the datasets in the current qri repo
const datasets = qri.list()

Tests

Run tests with yarn test

Methods

setup(flags)

'setup' sets up a new qri repo and identity

Parameters

| Name | Type | Description | | | ---- | ---- | ----------- | -------- | | flags | string | - CLI flags for 'qri setup' |   |

Returns
  • Promise

init(path, flags)

'init' creates a new dataset, links it to the provided directory, and creates starter files for the dataset's components

Parameters

| Name | Type | Description | | | ---- | ---- | ----------- | -------- | | path | string | - the path to create the new dataset in (relative to pwd) |   | | flags | string | - CLI flags for 'qri init' |   |

Returns
  • Promise

save(dsRef, flags)

'save' saves a dataset version

Parameters

| Name | Type | Description | | | ---- | ---- | ----------- | -------- | | dsRef | string | - The dataset reference to save |   | | flags | string | - CLI flags for 'qri save' |   |

Returns
  • Promise

get(dsRef, component, flags)

'get' a dataset or a specific component from a dataset

Parameters

| Name | Type | Description | | | ---- | ---- | ----------- | -------- | | dsRef | string | - The dataset reference to save |   | | component | string | - The component to get (body, readme, structure, meta) |   | | flags | string | - CLI flags for 'qri get' |   |

Returns
  • Promise

remove(dsRef, flags)

'remove' removes a Dataset

Parameters

| Name | Type | Description | | | ---- | ---- | ----------- | -------- | | dsRef | string | - The dataset reference to save |   | | flags | string | - CLI flags for 'qri remove' |   |

Returns
  • Promise

push(dsRef, flags)

'push' pushes a Dataset to a qri remote

Parameters

| Name | Type | Description | | | ---- | ---- | ----------- | -------- | | dsRef | string | - The dataset reference to push |   | | flags | string | - CLI flags for 'qri push' |   |

Returns
  • Promise

Documentation generated with doxdox. (use doxdox lib/qri-node.js --layout markdown --output DOCUMENTATION.md)