cli
Command-line interface usage and commands
Pass and access Node.js command line arguments with process.argv. Examples for positional args, path resolution, validation, and when to use minimist or yargs.
Pretty-print JSON in shell scripts using jq, Python's json.tool, php or json_pp. One-line examples for bash, curl, NDJSON and safe in-place file updates.
Create a Git commit with a separate title and body from the CLI. Use multiple -m flags, -F file input, or commit templates for consistent commit messages.
Fix 'context deadline exceeded' when uploading large files (~4GB) to MinIO using mc cp. Tune multipart part-size (64-128MiB), parallelism, proxy timeouts (Nginx 30m), and server configs for reliable uploads.
Handle SIGINT gracefully in Node.js TypeScript CLI apps using Commander.js. Finish database updates, per-item calculations, flush stdout/stderr logs, and ensure shell prompt returns only after complete shutdown—no more lost logs or early prompts.
Learn efficient methods to split a cli::array<Byte>^ in C++/CLI into the first 16 bytes and remaining bytes using Array::Copy, ArraySegment, or pin_ptr.
Improve C++/CLI code for Base64 encoding in Visual Studio. Refactor repetitive code, enhance readability, and boost efficiency. Best practices included.