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

azprofile-cli

v2.0.2

Published

Azure CLI Profile Manager - Easy switching between multiple Azure accounts

Readme

azprofile-cli

Azure CLI Profile Manager - Easy switching between multiple Azure accounts

Installation

npm install -g azprofile-cli

Or install from source:

git clone https://github.com/O6lvl4/azprofile.git
cd azprofile
npm install -g .

Quick Setup (Recommended)

One-time setup to enable seamless profile switching:

# Setup shell integration
azprofile setup ~/.zshrc    # for zsh users
azprofile setup ~/.bashrc   # for bash users

# Restart your shell or run:
source ~/.zshrc

After setup, you can use azprofile use <profile> without source command!

Usage

1. Add Azure profiles

azprofile add work      # Add work profile
azprofile add personal  # Add personal profile

Each profile will prompt you to login to Azure and select subscription/tenant.

2. Switch profiles (After Setup)

# Simple profile switching - no source needed!
azprofile use work
az account show      # Shows work account info

azprofile use personal  
az account show      # Shows personal account info
azd up              # Uses personal profile

3. Other commands

# List all profiles
azprofile list

# Show current profile status  
azprofile current

# Execute single command with specific profile
azprofile exec work -- az account show
azprofile exec personal -- azd deploy

# Remove profile
azprofile remove work

Manual Usage (Without Setup)

If you haven't run the setup, you need to use source:

source azprofile use work
az account show  # Uses work profile

Example Workflow

# 1. One-time setup
azprofile setup ~/.zshrc
source ~/.zshrc

# 2. Add profiles for different Azure accounts
azprofile add work
# Login with work account, select work subscription

azprofile add personal
# Login with personal account, select personal subscription

# 3. Switch between profiles easily
azprofile use work
az resource list      # Lists work resources

azprofile use personal
azd up               # Deploy to personal subscription

# 4. Check current status
azprofile list       # See all profiles
azprofile current    # Show active profile info

Features

  • No dependency on Node.js at runtime (pure shell script)
  • Seamless profile switching with shell integration
  • Multiple Azure account management with isolated config directories
  • Works with both az and azd commands
  • Interactive profile creation with auto-login prompts
  • Persistent and temporary profile switching
  • Clean, colorful CLI interface
  • Cross-shell compatibility (bash, zsh)

How it works

azprofile manages separate Azure CLI configuration directories for each profile using the AZURE_CONFIG_DIR environment variable. This allows you to have completely isolated Azure authentication contexts.

Profile Storage

  • Profiles are stored in ~/.azure-profiles/<profile-name>/
  • Each profile contains independent Azure CLI configuration
  • Settings are saved in ~/.azure-profiles/config

Shell Integration

The azprofile setup command adds a wrapper function to your shell configuration that:

  • Intercepts azprofile use <profile> commands
  • Automatically sets AZURE_CONFIG_DIR environment variable
  • Passes through all other commands to the original azprofile binary

Requirements

  • Bash >= 3.0 or Zsh
  • Azure CLI (az) installed
  • Azure Developer CLI (azd) for azd commands (optional)

Troubleshooting

Profile switching not working

Make sure you've run the setup:

azprofile setup ~/.zshrc  # or ~/.bashrc
source ~/.zshrc           # restart shell

Parse errors in shell

Try reinstalling:

npm uninstall -g azprofile-cli
npm install -g azprofile-cli
azprofile setup ~/.zshrc

Environment variable not set

Check if setup was successful:

type azprofile              # Should show it's a function
azprofile use <profile>
echo $AZURE_CONFIG_DIR     # Should show profile path

License

MIT