Thin by design

Use the fs methods you already know.

fscli maps terminal commands directly to Node fs. Install it globally for daily use, or run it locally through npx and bunx when it lives in your current project.

What it does

Shell-first access to Node's file system methods.

The command name is the method name. Arguments are passed in method order, either positionally or through generated flags such as --path, --options, and --data.

true / false numbers JSON arrays JSON objects quoted JSON strings
How to run it

Global first, local when needed.

Global installation is the cleanest daily workflow. If fscli is listed in the current project's package.json, npx fscli and bunx fscli work as expected too.

npm install -g @fscli/fscli

npm install --save-dev @fscli/fscli
npx fscli readFile ./package.json '{"encoding":"utf8"}'
bunx fscli readFile ./package.json '{"encoding":"utf8"}'
Input model

JSON input without extra wrappers.

fscli decodes booleans, numbers, arrays, objects, and quoted JSON strings before invoking Node. That keeps option objects close to the JavaScript you would already write.

fscli mkdir ./tmp/cache '{"recursive":true}'
fscli writeFile ./data.json '{"ok":true}' '{"encoding":"utf8"}'
fscli readdir . '{"withFileTypes":true}'
Output model

Minimal printing, no extra protocol.

  • Strings are written directly to stdout.
  • Uint8Array results are written as raw bytes.
  • Everything else is printed with Node's default console formatting.
Reference

Current command surface

This table reflects fscli running on Node v22.14.0. The package is positioned as Node fs for your terminal, while the current command list follows the Promise-based file system exports available in the runtime you use. Different versions and runtimes can vary. Run fscli or fscli --help to see the live list on your machine.

Command Parameters Generated flags
access path, mode -P / --path
-M / --mode
appendFile path, data, options -P / --path
-D / --data
-O / --options
chmod path, mode -P / --path
-M / --mode
chown path, uid, gid -P / --path
-U / --uid
-G / --gid
copyFile src, dest, mode -S / --src
-D / --dest
-M / --mode
cp src, dest, options -S / --src
-D / --dest
-O / --options
glob pattern, options -P / --pattern
-O / --options
lchmod path, mode -P / --path
-M / --mode
lchown path, uid, gid -P / --path
-U / --uid
-G / --gid
link existingPath, newPath -E / --existingPath
-N / --newPath
lstat path, options -P / --path
-O / --options
lutimes path, atime, mtime -P / --path
-A / --atime
-M / --mtime
mkdir path, options -P / --path
-O / --options
mkdtemp prefix, options -P / --prefix
-O / --options
open path, flags, mode -P / --path
-F / --flags
-M / --mode
opendir args -A / --args
readFile path, options -P / --path
-O / --options
readdir path, options -P / --path
-O / --options
readlink path, options -P / --path
-O / --options
realpath path, options -P / --path
-O / --options
rename oldPath, newPath -O / --oldPath
-N / --newPath
rm path, options -P / --path
-O / --options
rmdir path, options -P / --path
-O / --options
stat path, options -P / --path
-O / --options
statfs path, options -P / --path
-O / --options
symlink target, path, type_ -T / --target
-P / --path
-Y / --type_
truncate path, len -P / --path
-L / --len
unlink path -P / --path
utimes path, atime, mtime -P / --path
-A / --atime
-M / --mtime
watch filename, options -F / --filename
-O / --options
writeFile path, data, options -P / --path
-D / --data
-O / --options