Skip to content
🚧 Hey! You're using FNPM Beta 🎉 | ⚠️ Monorepo support coming soon! Stay tuned 🔜

Getting Started with FNPM

Installation

First things first, let’s get FNPM installed on your system. It’s as easy as pie (and less messy)!

Terminal window
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/ideascoldigital/fnpm/refs/heads/main/install.sh)"

Project Setup

Once FNPM is installed, you can set it up in your project. This is where the magic begins! 🪄

Terminal window
fnpm setup

This command will prompt you to choose your preferred package manager (npm, yarn, or pnpm). Don’t worry - your choice won’t affect your teammates. That’s the whole point!

Basic Commands

Installing Dependencies

To install all project dependencies:

Terminal window
fnpm install

To install a specific package:

Terminal window
fnpm install lodash
# or
fnpm add lodash

Running Scripts

To view all available scripts in your package.json:

Terminal window
fnpm run

To execute a specific script:

Terminal window
fnpm run <script-name>
# Example: fnpm run dev

Adding Dependencies

Add packages as dependencies with these commands:

Terminal window
fnpm add lodash express axios

Removing Dependencies

To remove packages:

Terminal window
fnpm remove lodash

How It Works

FNPM creates a unified workflow by:

  1. Local Configuration: Creates a .fnpm directory in your project to store user-specific settings
  2. Lock File Management: Maintains consistent lock files regardless of which package manager is used
  3. Shell Integration: Sets up helpful aliases to prevent accidental use of direct package manager commands

Best Practices

For Teams

  1. Exclude .fnpm from Version Control: Add .fnpm to your .gitignore as it contains user-specific preferences
  2. Commit Lock Files: Always commit the generated lock files to maintain dependency consistency
  3. Use CI/CD Integration: FNPM works seamlessly with CI/CD pipelines

For Developers

  1. Use Your Preferred Tool: Feel free to use your favorite package manager - FNPM handles the rest
  2. Trust the Process: Let FNPM manage lock files and dependency states
  3. Keep It Updated: Regularly update FNPM to get the latest features and improvements

Common Questions

Why does FNPM exist?

Because life’s too short for package manager drama! FNPM lets developers use their preferred tools while maintaining project consistency.

Will it affect my existing projects?

Nope! FNPM works alongside your existing package manager setup. It just makes everything play nice together.

What about my CI/CD pipeline?

FNPM works great with CI/CD! It ensures consistent builds regardless of which package manager is used in the pipeline.

Next Steps

Now that you’re up and running with FNPM, check out these resources:

Welcome to the peaceful world of package management! 🕊️