Cdir
An interactive console.dir() for node.js similar to console.dir() in webkit.
Install / Use
/learn @heapwolf/CdirREADME
Synopsis
An interactive representation of an object for the CLI similar to that of console.dir() in webkit.
Motivation
Reading big object dumps is a waste of time. Progressive disclosure helps.
Features
- Searchable/Repeat search
- Handles cyclical references
- Expand and collapse nodes
Usage
Install
Do npm install cdir -g and then require the module in your program like this console.dir = require('cdir').
Navigate
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
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) /.
Quit
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" : [
"console",
"debug",
"debugging",
"json",
"interacive",
"prompt"
],
"foo": function() {
return "node tests/test.js"
}
};
console.dir(stuff);
The output looks something like this.
<img src="https://github.com/hij1nx/cdir/raw/master/screenshot.png"/>Related Skills
node-connect
342.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
85.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
342.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
342.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
