"Error: Firebase config variables are missing" running Cloud Functions shell

I've just updated to Cloud Functions 1.0 and am getting "Error: Firebase config variables are missing" when I run

firebase functions:shell

I was originally getting "Error: functions.config() is not available. Please use the Firebase CLI to deploy, or manually add a config.json to your functions directory." error but got around this by using following (https://firebase.google.com/docs/functions/local-emulator indicates that .runtimeconfig.json should be used instead but that didn't seem to work).

firebase functions:config:get > config.json  

Looking at source code it appears that the "Firebase config variables are missing" is caused by lack of firebase node in json (from firebase-functions/lib/config.js)? The config.json generated above just contains gcloud node.

   try {
        loaded = require('../../../config.json');
    }
    catch (e) {
        throw new Error('functions.config() is not available. '
            + 'Please use the Firebase CLI to deploy, or manually '
            + 'add a config.json to your functions directory.');
    }
    if (!_.has(loaded, 'firebase')) {
        throw new Error('Firebase config variables are missing.');
    }