registryflow
v0.1.16
Published
A professional CLI tool for managing RegistryFlow projects, components, and registries
Maintainers
Readme
RegistryFlow CLI
A CLI tool for registry flow. Visit registryflow.com for more information.
Installation
Install globally using npm:
npm install -g registryflowOr using pnpm:
pnpm add -g registryflowOr using yarn:
yarn global add registryflowFeatures
🔐 Authentication
RegistryFlow CLI supports two authentication methods:
- Browser-based authentication: Interactive login flow with automatic token management
- Username/Password authentication: Direct login with email and password
⚙️ Configuration Management
Flexible configuration system with global and project-level settings:
- Global Configuration: Stored at
~/.registryflow/config(user-wide settings) - Project Configuration: Stored at
.registryflow/config(project-specific settings) - Nested Properties: Support for nested configuration using dot notation (e.g.,
user.name,user.email) - Override Priority: Project config automatically overrides global config values
- Multi-Server Support: Manage multiple servers with automatic token storage and restoration
- Interactive Server Selection: Easy server switching with an interactive list interface
🎨 Shadcn Integration
RegistryFlow CLI integrates seamlessly with Shadcn CLI for component management:
- Automatic Package Manager Detection: Automatically detects and uses npm, pnpm, or yarn based on your project's lock files
- Auto-Installation: Prompts to install Shadcn if not found in your project
- Unified Interface: All Shadcn commands are available through RegistryFlow CLI with consistent error handling
- Project Type Support: Initialize both Registry Flow and Shadcn projects from a single command
📦 Default Configuration
On installation, a default global configuration file is automatically created with:
{
"server": "https://www.registryflow.com",
"token": ""
}Usage
After installation, you can use the registryflow command from anywhere:
registryflow [command]Commands
init
Initialize a new project. Supports both Registry Flow and Shadcn project types.
registryflow initThis will:
- Prompt you to select a project type (Registry Flow Project or Shadcn Project)
- Initialize the selected project type with the appropriate configuration
- Install necessary dependencies
add
Add a component to your project using Shadcn CLI.
registryflow add [components...]Examples:
# Add a single component
registryflow add button
# Add multiple components
registryflow add button card dialog
# Add with specific options
registryflow add button --overwriteThis command:
- Automatically detects your package manager (npm, pnpm, or yarn)
- Executes the Shadcn
addcommand with the specified components - Prompts to install Shadcn if not found
diff
Check for updates against the registry using Shadcn CLI.
registryflow diff [component]Examples:
# Check all components for updates
registryflow diff
# Check a specific component
registryflow diff buttonview
View items from the registry using Shadcn CLI.
registryflow view <items...>Examples:
# View a component
registryflow view button
# View multiple items
registryflow view button cardsearch / list
Search items from registries using Shadcn CLI.
registryflow search [registries...]
# or
registryflow list [registries...]Examples:
# Search all registries
registryflow search
# Search specific registries
registryflow search registry1 registry2migrate
Run a migration using Shadcn CLI.
registryflow migrate [migration]Examples:
# Run all migrations
registryflow migrate
# Run a specific migration
registryflow migrate v1-to-v2info
Get information about your project using Shadcn CLI.
registryflow infoDisplays project information including:
- Installed components
- Configuration details
- Version information
build
Build components for a registry using Shadcn CLI.
registryflow build [registry]Examples:
# Build for default registry
registryflow build
# Build for specific registry
registryflow build my-registrymcp
MCP server and configuration commands using Shadcn CLI.
registryflow mcpregistry:build
Builds the registry [EXPERIMENTAL] using Shadcn CLI.
registryflow registry:build [registry]Examples:
# Build default registry
registryflow registry:build
# Build specific registry
registryflow registry:build my-registryregistry:mcp
Starts the registry MCP server [DEPRECATED] using Shadcn CLI.
registryflow registry:mcpNote: This command is deprecated and may be removed in future versions.
login
Login to your RegistryFlow account. Supports two authentication methods:
Browser-based authentication (default):
registryflow loginThis will:
- Generate an authentication ID
- Display a URL to open in your browser
- Automatically poll for authentication completion
- Save the authentication token to your global config
Username/Password authentication:
registryflow login "[email protected]"This will:
- Prompt for your password (hidden input)
- Authenticate with the server
- Save the session token and user information to your global config
config
Manage configuration settings for RegistryFlow CLI.
View configuration:
# View global configuration
registryflow config --view --global
# View local/project configuration
registryflow config --view --local
# View global configuration (short form)
registryflow config --globalSet configuration values:
# Set global server URL
registryflow config --global server "https://www.registryflow.com"
# Set global token
registryflow config --global token "your-token-here"
# Set nested properties (e.g., user information)
registryflow config --global user.name "Your Name"
registryflow config --global user.email "[email protected]"
# Set project-local configuration (overrides global)
registryflow config --local server "https://custom-server.com"Configuration file locations:
- Global:
~/.registryflow/config - Project:
.registryflow/config(in your project root)
Nested properties: The config command supports dot notation for nested properties. For example:
user.namecreates:{ "user": { "name": "..." } }user.emailcreates:{ "user": { "email": "..." } }
Both properties will be merged into the same user object.
Server management:
# List all saved servers
registryflow config --list-servers
# Delete a server from the list
registryflow config --delete-server "https://server.com"create
Create new projects or registry items.
registryflow createInteractive mode: When run without arguments, prompts you to select what to create:
- Project: Create a new project from scratch
- Registry Item: Create a new registry item for publishing
create registry-item
Create a new registry item for publishing to the registry.
registryflow create registry-itemThis command:
- Prompts you to select a registry (remote or local, or create a new one)
- Prompts you to select an item type:
- Block: Complex components with multiple files
- Component: Simple components
- Lib: Libraries and utilities
- Hook: React hooks
- UI: UI components and single-file primitives
- Page: Page or file-based routes
- File: Miscellaneous files
- Style: Registry styles
- Theme: Themes
- Item: Universal registry items
- Prompts for the item name (validated: alphanumeric with "-" or "_" separators)
- Creates a git branch for the item (e.g.,
registryflow_item,registryflow_item_v1) - Creates a local configuration file (
.registryflow/config) with registry and item information
Registry selection:
- Select from existing remote registries (if authenticated)
- Select from existing local registries
- Create a new remote registry
- Create a new local registry
Item name validation:
- Must contain only letters and numbers
- Can be separated by "-" or "_"
- Must start and end with alphanumeric characters
- Duplicate names are checked against the selected registry
Example:
# Interactive creation
registryflow create registry-item
# The command will guide you through:
# 1. Registry selection
# 2. Item type selection
# 3. Item name input
# 4. Git branch creationpush
Push projects or registry items to registries.
registryflow pushpush registry-item
Push a registry item from a git branch to a registry.
registryflow push registry-itemThis command:
- Lists all git branches starting with
registryflow_item(sorted alphabetically) - If no matching branches found, uses the current branch (if it exists)
- Prompts you to select which branch to push
- Scans for altered files since the initial commit
- Creates a diff of changes
- Validates that
components.jsonexists in the project - Pushes the item to the selected registry (local or remote)
Requirements:
- Must be run in a project directory with a
components.jsonfile - Must have a git repository initialized
- Must have at least one branch (either
registryflow_item*or current branch)
Workflow:
- Create a registry item using
registryflow create registry-item - Make changes to your files
- Commit changes to the git branch
- Push the item using
registryflow push registry-item
Example:
# After creating and editing a registry item
registryflow push registry-item
# Select the branch to push from the list
# The command will:
# 1. Scan for changed files
# 2. Create a diff
# 3. Push to the registry specified in .registryflow/configservers
List and interactively select a server from your saved servers.
registryflow serversThis command provides an interactive interface to:
- View the current server (if set) with its token status
- Browse all saved servers in an interactive list
- Select a server using arrow keys or by entering a number
- Automatically restore the authentication token for the selected server (if available)
Features:
- Interactive selection using inquirer with numbered options
- Shows token status for each server (masked for security)
- Automatically restores tokens when switching to previously used servers
- Current server is clearly marked in the list
- Cancel option available
Example output:
📍 Current Server: https://www.registryflow.com
Token: ***xyz9
? Select a server (enter number):How servers are saved: Servers are automatically added to the servers list when you:
- Switch between different servers using
config --global server - Login to a server (the server and token are saved together)
Configuration Examples
Setting up your server
registryflow config --global server "https://www.registryflow.com"Setting user information
registryflow config --global user.name "John Doe"
registryflow config --global user.email "[email protected]"Project-specific configuration
# In your project directory
registryflow config --local server "https://staging.registryflow.com"Learn More
Visit registryflow.com to learn more about RegistryFlow.
