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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@currents/cmd

v1.6.9

Published

Currents CLI tools

Downloads

72,545

Readme

@currents/cmd

CLI tool for Currents - a cloud platform for debugging, troubleshooting, and analyzing CI tests.

Installation

npm install @currents/cmd --save-dev

Upload test results

  • Generate test results with one of the supported reporters
  • Upload the results
npx currents upload --project-id=xxx --key=yyy

ℹ️ Get familiar with CI Build ID 📖 before using currents in CI. It is important to set the CI Build ID explicitly using --ci-build-id option, if you are using CI sharding or multiple CI machines to parallelize your tests. If not set explicitly, the CI Build ID will be set to a random value.

Notes

Obtain --project-id and --key from https://app.currents.dev to identify the project and associate the results with your organization.

currents will upload the results, as follows:

  • use process.env.CURRENTS_REPORT_DIR or --reportDir to read the results previously generated by one of supported reporters, otherwise
  • use the most recently created directory named as .currents/[timestamp]-[uuidv4()] in the current working directory

Configuration

Please note that all options apart from --project-id and --key are optional.

| Property | Type | Description | Environment variable | Default | | ---------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------- | ---------------------- | | -k, --key | string | The record key to record the results to Currents. Read more: https://currents.dev/readme/guides/record-key | CURRENTS_RECORD_KEY | - | | -p, --project-id | string | The id of the project for reporting | CURRENTS_PROJECT_ID | - | | --machine-id | string | Unique identifier of the machine running the tests. If not provided, it will be generated automatically. See: https://currents.dev/readme/readme?q=machineId | CURRENTS_MACHINE_ID | [random-string] | | --report-dir | string | The directory containing the test results created with one of the supported reporters | CURRENTS_REPORT_DIR | .currents/* | | --ci-build-id | string | The id of the build to record the test run. Read more: https://currents.dev/readme/guides/ci-build-id | CURRENTS_CI_BUILD_ID | auto:[random-string] | | --debug | boolean | Enable debug logs | DEBUG="currents,currents:*" | false | | -t, --tag | string | Comma-separated tag(s) for recorded runs in Currents | CURRENTS_TAG | - | | --disable-title-tags | boolean | Disable extracting tags from test title, e.g. Test name @smoke would not be tagged with smoke | CURRENTS_DISABLE_TITLE_TAGS | false | | --remove-title-tags | boolean | Remove tags from test names in Currents, e.g. Test name @smoke becomes Test name in the dashboard | CURRENTS_REMOVE_TITLE_TAGS | false |

The configuration is also available by running the CLI command with the --help argument.

Use Currents API

  • Retrieve information about Currents resources in JSON format

ℹ️ Please note that the command is experimental and was primarily built to obtain test run data in CI. Its functionality might be extended in the future.

ℹ️ The command requires the --project-id and --api-key from Currents to authenticate the request and provide the required data. Alternatively, you can set the CURRENTS_PROJECT_ID and CURRENTS_API_KEY environment variables.

Supported operations:

  • Obtain run data using the CI Build ID 📖 by running the following command:

    npx currents api get-run --ci-build-id <ci-build-id> --output path/to/save/run.json
  • Obtain the last completed run data, filtered by --branch and/or --tag, by running the following command:

    npx currents api get-run --branch <branch> --tag <tag-1,tag-2,...tag-n>

For more examples and usage options, run npx currents api --help.

Cache test artifacts

The currents cache command allows you to archive files from specified locations and save them under an ID in Currents storage. It also stores a meta file with configuration data. You can provide the ID manually or it can be generated based on CI environment variables (only GitHub, GitLab, and Circle CI are supported).

To cache files, use the following command:

npx currents cache set --key <record-key> --id <id> --path <path-1,path-2,...path-n>

To download files, use the following command:

npx currents cache get --key <record-key> --id <id>

For more examples and usage options, run npx currents cache --help.

Troubleshooting

Run the CLI command with the --debug argument or prefix it with DEBUG="currents,currents:*" to obtain detailed information about the command execution process.