Two ways in.
Take the npm package if Node is already on the machine. Take the standalone binary if you would rather not carry a runtime around.
a · global npm package
npm install -g @iamgautamsuthar/fluxnpx @iamgautamsuthar/flux --helpRequires Node 18 or later. To update, run the same command again. To remove it, run npm uninstall -g @iamgautamsuthar/flux.
b · standalone binary
curl -fsSL https://raw.githubusercontent.com/callmegautam/flux/main/install.sh | shirm https://raw.githubusercontent.com/callmegautam/flux/main/install.ps1 | iexSelf contained, no Node needed. Linux and macOS take the curl script, Windows PowerShell takes irm. The Windows install is per user and needs no administrator rights. To remove it, delete the binary.
prebuilt targets
linux-x64Linux, Intel / AMD 64-bitlinux-arm64Linux, ARM 64-bitdarwin-x64macOS, Inteldarwin-arm64macOS, Apple siliconwindows-x64Windows, 64-bit
Every release carries these binaries next to a SHA256SUMS file, which both install scripts verify for you.
environment
- FLUX_CACHE_DIR
- Where downloaded tarballs are kept. Defaults to platform cache directory.
- FLUX_VERSION
- Read by both install scripts. Defaults to latest release.
- FLUX_INSTALL_DIR
- Where the standalone binary lands. Defaults to ~/.local/bin · %LOCALAPPDATA%\flux\bin.
Commands.
Listed roughly in the order you reach for them. Every alias is shown on the right. Run flux --help for the full set of flags.
- 01
initcreateCreate a package.json in the current directory.
- 02
install [package]addInstall one package and record it in package.json, or install every dependency already listed there.
- 03
uninstall [package]remove , rm , deleteRemove one package, or all of them, from the project and node_modules.
- 04
reinstall [package]re , re-iWipe and reinstall one package, or all of them.
- 05
update [package]upgradeFetch the latest published version of one package, or all of them.
- 06
listls , showPrint every dependency currently installed.
- 07
outdatedout , old , newCompare installed versions against what the registry publishes.
- 08
info <package>iShow registry metadata for a package.
- 09
run <script>rRun a script defined in package.json.
- 10
clearcDelete the download cache.
Pass --flux to install to resolve tarballs through the Flux registry instead of npm.
One cache directory. Nothing else to configure.
Downloaded tarballs are kept per user, in the place your platform expects them.
cache location
- Linux
$XDG_CACHE_HOME/flux, or ~/.cache/flux - macOS
~/Library/Caches/flux - Windows
%LOCALAPPDATA%\flux\Cache
Set FLUX_CACHE_DIR to put them somewhere else, and run flux clear to empty the cache.
What Flux does not do yet.
Written out plainly, so you can decide whether that is fine for what you are building.
- 01
Direct dependencies only
Flux installs what is listed in your package.json. It does not walk the dependency tree, so most real packages will not work end to end.
- 02
No lockfile
Installs are not reproducible. Two runs of the same project can resolve to different versions.
- 03
No semver range resolution
A range like ^1.2.3 is not resolved against. Flux installs whatever the registry currently publishes as latest.
- 04
No test suite
There is no automated coverage yet. Treat every release as unverified until you have tried it yourself.
What comes next.
Roughly in the order it matters. None of it is done yet, which is what the empty boxes mean.
- Full dependency tree resolution
- A lockfile, for reproducible installs
- Registry search from the CLI
- A dependency tree viewer
- Parallel installs
- Workspace support
- Vulnerability scanning
contributing
Open tasks and known bugs sit in the issues tab. Fork the repository, make your change, then run the type check and the build before you open a pull request. The contributing guide has the longer version.