JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 8
  • Score
    100M100P100Q39065F
  • License MIT

A fast, temporary CLI runtime for JavaScript projects. Run commands without polluting your project.

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> and fwd uninstall <pkg> directly β€” βœ”οΈ
  • ⚑️ Remote execution UX: support fwd dist <github_repo> to fetch & run a repo temporarily β€” coming soon