function readPkgs( files, clbk ) {
	var total;
	var out;
	var i;

	total = files.length;
	i = -1;
	out = [];

	return next();

	/**
	* Reads the next `package.json` file.
	*
	* @private
	*/
	function next() {
		i += 1;
		debug( 'Reading package %d of %d: %s', i+1, total, files[ i ] );
		readJSON( files[ i ], onRead );
	}

	/**
	* Callback invoked upon reading a `package.json` file.
	*
	* @private
	* @param {(Error|null)} error - error object
	* @param {Object} json - JSON object
	* @returns {void}
	*/
	function onRead( error, json ) {
		var keys;
		var j;
		var k;

		j = i + 1;
		if ( error ) {
			debug( 'Encountered an error reading file: %s (%d of %d). Error: %s', files[ i ], j, total, error.message );
			return done( error );
		}
		debug( 'Successfully read file: %s (%d of %d).', files[ i ], j, total );

		if ( isString( json.bin ) ) {
			debug( 'Resolved %s.', json.name );
			out.push( json.name );
		} else if ( hasOwnProp( json, 'bin' ) ) {
			debug( 'Resolving CLI commands...' );
			keys = objectKeys( json.bin );
			for ( k = 0; k < keys.length; k++ ) {
				debug( 'Resolved %s.', keys[ k ] );
				out.push( keys[ k ] );
			}
			debug( 'Finished resolving CLI commands.' );
		}
		if ( j < total ) {
			debug( 'Read %d of %d files.', j, total );
			return next();
		}
		debug( 'Successfully read all files.' );
		return done();
	}

	/**
	* Callback invoked upon reading all files.
	*
	* @private
	* @param {(Error|null)} error - error object
	* @returns {void}
	*/
	function done( error ) {
		if ( error ) {
			return clbk( error );
		}
		clbk( null, out );
	}
}
Reads `package.json` files and resolves command-line interface commands.

@private
@param {StringArray} files - list of `package.json` files
@param {Callback} clbk - callback to invoke upon completion
@returns {void}