Skip to content
An interactive console.dir() for node.js similar to console.dir() in webkit.
Find file
Latest commit 223fe00 @0x00A 0x00A Merge pull request #29 from juliangruber/patch-1
fixed typo


An interactive representation of an object for the CLI similar to that of console.dir() in webkit.


Reading big object dumps is a waste of time. Progressive disclosure helps.


  • Searchable/Repeat search
  • Handles cyclical references
  • Expand and collapse nodes



Do npm install cdir -g and then require the module in your program like this console.dir = require('cdir').


Use console.dir(someobject) somewhere in your program and then hit tab, shift+tab or the arrow keys to cycle through the object's members. You can hit space, return or enter to expand a member.


Search by pressing the / key. This will display a / prompt. If you have already searched for something it will be displayed before the / prompt. For instance if you searched for "foobar" it would appear as (foobar) /.


Hit ctrl+c or q to quit!

Simple Example

There is a CLI version too if you want to use it. npm install cdir -g.

console.dir = require('cdir');

var stuff = { 
  "name" : "cdir", 
  "description" : "An interactive console.dir() for the terminal.",
  "tags" : [
  "foo": function() { 
    return "node tests/test.js"


The output looks something like this.

Something went wrong with that request. Please try again.