npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cf-plugins/cf-targets-plugin

v2.1.1

Published

Cloud Foundry CLI plugin for managing multiple API targets with easy switching and saving

Readme

CF Targets Plugin

Build Status

Easily manage multiple Cloud Foundry API targets with seamless switching and saving.

This plugin simplifies working with multiple CF environments by allowing you to save, switch, and manage different API targets effortlessly. Perfect for developers working across development, staging, and production environments.

✨ Features

  • Save Multiple Targets: Store unlimited CF API targets with custom names
  • Quick Switching: Switch between environments with a single command
  • Smart Diff Display: See exactly what changes when switching targets
  • Cross-Platform: Works on Linux, macOS, and Windows (Intel & ARM)
  • Secure: Redacts sensitive tokens in diff output
  • Easy Installation: One-command npm installation with automatic CF CLI registration

🚀 Quick Start

1. Install the Plugin

npm install -g @cf-plugins/cf-targets-plugin

2. Save Your First Target

cf api https://api.your-dev-environment.com
cf login
cf save-target development

3. Save Additional Targets

cf api https://api.your-prod-environment.com  
cf login
cf save-target production

4. Switch Between Targets

cf set-target development
cf set-target production

That's it! You're now managing multiple CF environments like a pro.

📖 Usage Examples

Save Current Target

# Save with a custom name
cf save-target my-dev-env

# Update existing target (with confirmation)
cf save-target production -f

Switch Targets

# Switch to saved target
cf set-target production

# Force switch (discards unsaved changes)
cf set-target development -f

List All Targets

cf targets

Output:

development
production (current)
staging

Delete Unused Targets

cf delete-target old-environment

📋 Commands Reference

| Command | Usage | Description | |---------|-------|-------------| | targets | cf targets | List all saved targets | | save-target | cf save-target [-f] [NAME] | Save current target | | set-target | cf set-target [-f] NAME | Switch to saved target | | delete-target | cf delete-target NAME | Delete saved target |

Command Options

  • -f, --force: Override confirmations and force the operation

🔧 Installation Options

Option 1: NPM (Recommended)

npm install -g @cf-plugins/cf-targets-plugin

The plugin automatically registers with CF CLI during installation.

Option 2: Manual Binary Installation

  1. Download binary from Releases
  2. Make executable: chmod +x cf-targets-plugin-*
  3. Install: cf install-plugin /path/to/binary -f

Option 3: Build from Source

git clone https://github.com/Amit-A2Z/cf-targets-plugin.git
cd cf-targets-plugin
make build
cf install-plugin cf-targets-plugin -f

🛠 Troubleshooting

Plugin Not Showing in cf plugins

# Check if plugin is installed
cf plugins | grep cf-targets

# If not found, manually register
cf install-plugin ~/.nvm/versions/node/*/lib/node_modules/@cf-plugins/cf-targets-plugin/bin/cf-targets-plugin -f

# Verify installation
cf plugins

Permission Denied Errors

# Make binary executable
chmod +x ~/.nvm/versions/node/*/lib/node_modules/@cf-plugins/cf-targets-plugin/bin/cf-targets-plugin

CF CLI Not Found During Installation

  1. Install CF CLI: https://docs.cloudfoundry.org/cf-cli/install-go-cli.html
  2. Reinstall plugin: npm install -g @cf-plugins/cf-targets-plugin

🏗 Building from Source

Requirements

  • Go 1.25 or later
  • Cloud Foundry CLI

Build Commands

# Build for current platform
make build

# Build for all platforms
make release-all

# Install locally
make install

🌍 Supported Platforms

| Platform | Architecture | Status | |----------|-------------|---------| | Linux | AMD64 | ✅ Supported | | Linux | ARM64 | ✅ Supported | | macOS | Intel (AMD64) | ✅ Supported | | macOS | Apple Silicon (ARM64) | ✅ Supported | | Windows | AMD64 | ✅ Supported | | Windows | ARM64 | ✅ Supported |

🤝 Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

📄 License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Note: This software is provided "AS IS" without warranty of any kind. Use at your own discretion.


Need help? Check out the Issues page or create a new issue for support.