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 🙏

© 2026 – Pkg Stats / Ryan Hefner

forge.commandline-nodejs

v1.0.0

Published

Node.js command line tool demonstrating the Forge API

Readme

build status Node.js npm Platforms License

Forge API: oAuth2 Data-Management OSS Model-Derivative Viewer

forge.commandline-nodejs

Note: For using this sample, you need a valid oAuth credential. Visit this page for instructions to get on-board.

Demonstrates the Autodesk Forge API authorisation and translation process using a Node.js console application.

  • both 2 legged and 3 legged
  • support both callback and promises

Description

This sample exercises the Node.js engine as a command line utility to demonstrate the Forge OAuth application authorisation process and the Model Derivative API mentioned in the Quick Start guide.

In order to make use of this sample, you need to register your consumer key, of course:

  • https://developer.autodesk.com > My Apps

This provides the credentials to supply while calling the Forge WEB service API endpoints.

Dependencies

Node.js and NPM

Setup/Usage Instructions

  1. Install Node.js on your computer.
  2. Download (fork, or clone) this project.
  3. Install Node.js dependency modules:
    npm install
  4. Request your consumer key/secret key from https://developer.autodesk.com.
  5. Set 2 environment variables FORGE_CLIENT_ID / FORGE_CLIENT_SECRET, or edit the forge-cb.js and forge-promise.js files and replace the placeholders by the consumer key/secret keys.
  6. Note for the 3 legged command: while registering your keys, make sure that the callback you define for your callback (or redirect_uri) match the one in the scripts (mycallback variable in forge-cb.js and forge-promise.js). Default is : http://localhost:3006/oauth

The 2 scripts provide quick help information for the commands and arguments. Use the --help to see it.

A typical workflow is (replace -cb by -promise if you want to use promises vs callbacks):

# Do authentication.
node forge-cb.js 2legged

# Create a bucket. Bucket name must be lower case and valid characters.
node forge-cb.js bucketCreate my_bucket_name

# Upload a model.
node forge-cb.js upload samples/Au.obj

# Register the model to get it translated.
node forge-cb.js translate Au.obj

# Wait until the translation completes.
# Translation is complete when it reaches 'success - 100%'
node forge-cb.js translateProgress Au.obj

# Retrieve preview image.
node forge-cb.js thumbnail Au.obj Au.png

# Create an HTML page with your URN and a read-only access token.
node forge-cb.js html Au.obj Au.html

Note your access token and bucket name are saved in the data folder to be used as default by the scripts, but you can edit them as you wish.

Bucket information (JSON replies) returned by the system are stored in the data folder as well.

thumbnail

License

This sample is licensed under the terms of the MIT License. Please see the LICENSE file for full details.

Written by

Cyrille Fauvel Forge Partner Development http://developer.autodesk.com/ http://around-the-corner.typepad.com