Package Exports
- @bourgils/forward
- @bourgils/forward/src/cli/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@bourgils/forward) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
π forward (CLI: fwd
)
Isolated, throwaway runtime for modern frontend projects No
node_modules
, no pollution β just run, dev, and it disappears.
β¨ Features
- π§Ό Run any project without installing deps locally
- π§ͺ Use
vite
,react-scripts
,next
, etc. with hot reload - π Dependencies are installed in a temp session, never your project
- ποΈ When the server stops, everything is cleaned
- π§ Supports
install
,uninstall
, and custom commands
π Quick Start
npm install -g @bourgils/forward
Inside a project with a package.json
fwd init # Detect pipe & package manager (vite, npm, etc.)
fwd dev # β vite dev or next dev
fwd run build # β npm run build (in temp env)
fwd exec echo Hello
fwd add react react-dom
fwd remove react
fwd reset # Clean up session
π§ CLI Commands
Command | Alias | Description |
---|---|---|
fwd init |
Auto-detect pipe & pkg manager | |
fwd show |
Show current session info | |
fwd run <script> |
Run npm script from package.json | |
fwd exec <cli> [cmd [args...]] |
Execute any raw command in session | |
fwd use <pipe> |
Manually set runtime (vite, next...) | |
fwd reset |
Reset and delete current session | |
fwd <cmd> [args...] |
Run a command through the pipe, eg. fwd dev --debug |
|
fwd add |
Add a package | |
fwd remove |
Remove a package |
π How it works
- Creates a session in
~/.fwd/sessions/<hash>/
- Installs
node_modules
there - Optionally symlinks it into your project during runtime
- Launches your pipe (vite, next, etc.) with full hot reload support
- Cleans everything after Ctrl+C
π§ͺ Supported pipes (auto-detected)
- vite
- next
- nuxt
- react-scripts
- bun
- astro
Pipe not detected? Just use:
fwd use vite
π‘ Why?
Because node_modules
folders are huge.
And every time you clone a project, you run npm install
and forget to clean.
With fwd, you just run it and forget it β nothing is written in your project unless you want it.
π Dev mode
Want to test locally?
git clone https://github.com/bourgils/forward
cd
npm install
npm link
Then go into any project and run:
fwd init
fwd dev or fwd start
π«Ά Author
Made with β€οΈ by @bourgils
πΊοΈπ§ Roadmap
π§ Planned Features
- π§Ή Code cleanup & architecture: refactor into classes/services for better structure β coming soon
- π§ Session persistence: list and delete past sessions (
fwd sessions
,fwd sessions clear
) β coming soon - π¦ Package manager UX: support
fwd install <pkg>
andfwd uninstall <pkg>
directly β βοΈ - β‘οΈ Remote execution UX: support
fwd dist <github_repo>
to fetch & run a repo temporarily β coming soon