Flowscripter IO CLI Flowscripter
winget install --id=Flowscripter.flowscripter-io-cli -e CLI for the pluggable-io-framework
winget install --id=Flowscripter.flowscripter-io-cli -e CLI for the pluggable-io-framework
> CLI for the > pluggable-io-framework, > built on > dynamic-cli-framework
NOTE: The binaries are 10's of megabytes in size as the entire Bun runtime is included.
Via Homebrew:
brew install flowscripter/tap/flowscripter-io-cli
In a terminal:
curl -fsSL https://raw.githubusercontent.com/flowscripter/flowscripter-io-cli/main/script/install.sh | sh
Via Winget:
winget install Flowscripter.flowscripter-io-cli
You can download and extract the binary zip files from the releases page.
Every command addresses data through a location argument: --source and
--dest for copy/move, and --location for the other commands. A
location has a protocol and one group of fields per installed protocol:
--location.protocol=file selects the protocol. The allowed values are
the protocols of the installed provider plugins.--location.file.path=/data and the other fields of the selected protocol
are taken from that protocol's provider plugin, and are validated against
it.file (and other protocols with folders), a location with a
filename addresses one file, one with a pattern (a glob such as
*.txt) addresses the matching files in path, and one with neither
addresses the whole path folder.flowscripter-io-cli --help lists the fields of every installed
protocol.
list --location [--recursive] [--regex] - list a folder, or the files
matching a pattern location, one JSON line per itemget-properties --location - print a file or folder's properties as JSONset-properties --location [--last-modified] [--content-type] [--properties..] - set properties: last modified time and
content type apply to every protocol, and --properties holds one group
per protocol for its own settable properties (e.g.
--properties.file.mode=384)delete --location - delete a file or foldercopy --source --dest [--payload-kind] - copy a file, a folder, or the
files matching a pattern, using a direct provider copy when possible, with
a progress bar for a single file. Prints the negotiated transfer path,
e.g. path: file/js -> file/js, directmove --source --dest [--payload-kind] - move, with the same behaviour as
copyhash --location [--algorithm] [--payload-kind] - hash a file by reading
its stream directly, outside the framework's transfer path. --algorithm
is one of sha1, sha256 (the default, using a native hasher), sha384,
sha512 or md5Common behaviour:
--payload-kind is auto (the default, letting the registry choose),
js or native. An unavailable kind fails with the kinds that are
installed.list, copy, move or hash, the first Ctrl-C stops gracefully and
reports the result as stopped, and a second Ctrl-C cancels.list over https) fail with
a "not supported by protocol" error.ArgumentPrompterService.This package has no dependency on any provider plugin. Install one or more
through the CLI's own plugin management (provided by
dynamic-cli-framework's
plugin commands). They are discovered at startup through
dynamic-plugin-framework's
NpmPluginRepository, and several protocols, or several implementations of
one protocol, can be installed side by side:
flowscripter-io-cli plugin:add @flowscripter/io-plugin-filesystem
Once installed (see Installation):
flowscripter-io-cli plugin:add @flowscripter/io-plugin-filesystem
flowscripter-io-cli list --location.protocol=file --location.file.path=.
flowscripter-io-cli copy \
--source.protocol=file --source.file.path=. --source.file.filename=a.txt \
--dest.protocol=file --dest.file.path=. --dest.file.filename=b.txt
flowscripter-io-cli copy \
--source.protocol=file --source.file.path=. --source.file.pattern='*.txt' \
--dest.protocol=file --dest.file.path=backup
flowscripter-io-cli hash --location.protocol=file --location.file.path=. \
--location.file.filename=a.txt --algorithm sha256
Install dependencies:
bun install
Test:
bun test
Format:
bunx oxfmt
Lint:
bunx oxlint index.ts src/ tests/
Refer to functional_tests/README.md
Refer to pluggable-io-framework, pluggable-io-framework-api and io-plugin-filesystem for the contracts and orchestration this CLI is built on.
MIT © Flowscripter