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

harvest-er

v1.2.0

Published

Node integration with Harvest

Readme

harvest-er: Harvest Automation Server

NPM version Dependency Status code-style License NPM downloads

Getting Started

Harvester requires Node.js and npm, which can both be installed by following the instructions on https://nodejs.org/. Installing Node.js also installs npm.

Installing with npm

npm install harvest-er

Installing from source

git clone https://github.com/sbolel/harvest-er - clone the source code

npm install - install node dependencies

npm run debug - start the application using Supervisor with debug messages enabled

Usage

Start the application using Supervisor with npm run debug. The Harvest data will be downloaded and saved to Dropbox each time the server runs. To re-run this download, execute rs in Supervisor.

Setting up Harvest

  1. Add the admin users email/password to your environment

    export HARVESTER_SUBDOMAIN="thinkcrazy"
    export HARVESTER_ADMIN_EMAIL="[email protected]"
    export HARVESTER_ADMIN_TOKEN="abc-def-123-456"
  2. Set your Harvest subdomain in server/harvester.js and the email/password for the admin user:

    var harvester = new Harvest({
        subdomain: process.env.HARVESTER_SUBDOMAIN,  // your harvest subdomain
        email: process.env.HARVESTER_ADMIN_EMAIL,
        password: process.env.HARVESTER_ADMIN_TOKEN
    }),

Getting Today's Expense and Time Entries data from Harvest (see app.js)

  1. Require harvest and harvester
const Harvest = require('harvest');
const Harvester = require('./harvester');
  1. Initialize Harvester and download the data using a promise array
function getTodaysData(){
  const harvest = new Harvest({
    subdomain: process.env.HARVESTER_SUBDOMAIN, 
    email: process.env.HARVEST_ADMIN_EMAIL,
    password: process.env.HARVEST_ADMIN_TOKEN
  });
  const harvester = new Harvester(harvest);
  const tasks = [];
  harvester.loaded().then(function(teamData){
    tasks.push(harvester.getExpenses());
    tasks.push(harvester.getTimesheets());
    Q.all(tasks).then(function(results){
      debug(harvester.val());
    });
  });
}

Future work

Setting up Dropbox

  1. Create a new Dropbox app at https://www.dropbox.com/developers/apps/create

    • Go to the settings for your new Dropbox app
    • Take note of the App key and App secret
    • Click "Generate" to get a Generated access token
  2. Add the admin users email/password to your environment

    export HARVESTER_DROPBOX_KEY=2abcdef1234t53e
    export HARVESTER_DROPBOX_SECRET=vn5aaf3bb5dd3qt
    export HARVESTER_DROPBOX_TOKEN=rUY9dxaAABBCCDDeeXJctUSUA_c8SuvABfzNwDAdFmTACAa6mUrpAAmcc7Gg7Qch
  3. Set your Dropbox credentials in server/dropboxer.js:

const client = new Dropbox.Client({
  key: process.env.HARVESTER_DROPBOX_KEY,
  secret: process.env.HARVESTER_DROPBOX_SECRET,
  token: process.env.HARVESTER_DROPBOX_TOKEN
});