This is a set of my idea tools
npm install dummie-toolsA collection of useful command-line utilities built with TypeScript.
``bash`
npm install -g dummie-tools
Or you can use it directly with npx:
`bash`
npx dummie-tools [command] [options]
Display a directory tree structure with customizable depth.
`bash`
dummie strucview [options]
Options:
- -l, --level : Maximum depth level to display (default: "3")-d, --dir
- : Directory to scan (default: ".")-s, --skip
- : Directory name to skip (can be used multiple times)-n, --no-interactive
- : Disable interactive prompts for directories
Use la as the level to display all levels:
`bash`
dummie strucview --level la
Example with skip option:
`bashSkip both 'node_modules' and 'dist' directories
dummie strucview --skip node_modules --skip dist
By default, you'll be prompted interactively for each common directory (node_modules, .git, etc.) and any directories you choose to skip will be completely excluded from the output:
`
Skip directory "node_modules"? (y/n): y
Skip directory ".git"? (y/n): y
`If you want to disable the interactive prompts:
`bash
Disable interactive prompts
dummie strucview --no-interactiveShorthand version
dummie strucview -n
`Example output:
`
face-recognition-server
├── __pycache__
│ ├── api.cpython-312.pyc
│ ├── db.cpython-312.pyc
│ ├── main.cpython-312.pyc
└── ws.cpython-312.pyc
├── .git
│ └── [...]
├── static
│ ├── index.html
│ ├── script.js
└── style.css
├── test-app
│ ├── .github
│ │ └── [...]
│ ├── node_modules
│ │ └── [...]
│ ├── public
│ │ └── [...]
└── src
├── tests
│ ├── __pycache__
│ ├── images
└── test_main.py
├── venv
│ ├── Include
│ ├── Lib
│ ├── Scripts
└── pyvenv.cfg
├── .env
├── .gitignore
├── api.py
├── db.py
├── main.py
├── README.md
├── requirements.txt
└── ws.py
`The tool automatically collapses large directories and shows a directory-first structure, making it easy to understand project layouts.
$3
Translate text between languages using Google Translate API with a Puppeteer fallback mechanism.
`bash
dummie translate [options]
`Options:
-
-f, --from : Source language code (default: "en")
- -t, --to : Target language code (default: "vi")Examples:
`bash
From French to English
dummie translate "Bonjour le monde" --from fr --to en
Output: Hello world
From English to French
dummie translate "Hello, how are you today?" --from en --to fr
Output: Bonjour, comment vas-tu aujourd'hui?
From Vietnamese to English
dummie translate "Vô lý" --from vi --to en
Output: Unreasonable
`The translation feature uses a reliable HTTP API first and falls back to a browser-based method if the API fails, ensuring robust translations even during API limitations.
$3
Display information about your system and environment.
`bash
dummie info
`This command shows:
- Current dummie-tools version
- Node.js version
- Operating system details
- NPM version
- Installation location
$3
Check if you're running the latest version of dummie-tools.
`bash
dummie version-check
`$3
Detect browser installations for the translation feature.
`bash
dummie browser-detect
`This command helps you configure the Chrome browser path for the translation feature's fallback mechanism. It will scan common installation locations and provide instructions for setting the
CHROME_PATH environment variable.Example output:
`
Detecting browsers for translation feature...
✅ Found Chrome at: C:/Program Files/Google/Chrome/Application/chrome.exeTo use this browser for translations, set the CHROME_PATH environment variable:
setx CHROME_PATH "C:/Program Files/Google/Chrome/Application/chrome.exe"
`Global Options
These options are available with all commands:
-
-d, --debug: Enable debug mode
- -q, --quiet: Suppress output
- -V, --version: Output the version number
- -h, --help`: Display help information- Directory-first sorting in tree views
- Automatic collapsing of large directories like node_modules
- Customizable depth for directory traversal
- Text translation with fallback mechanism
- System diagnostics and version checking
Feel free to open issues for this pkg.
MIT © Doan Nam Son