⚠️ WARNING: This extension is in active development. While stable for production use, new features are regularly added. Please report any issues on the GitHub repository.
Overview
IBM Catalog Tools is a Visual Studio Code extension that provides a comprehensive set of tools for developing offerings in the IBM Cloud Catalog. Originally focused on JSON editing, this extension now offers enhanced capabilities including pre-release management, dependency handling, and IBM Cloud integration. The intuitive side panel visualizes the JSON structure in a tree format, facilitating easy navigation, editing, and seamless integration with IBM Cloud services.
Features
JSON Structure Management
- Auto-detection of
ibm_catalog.json
files in the workspace
- Create new catalog files with a default structure
- Real-time file system watching and synchronization
- Locate existing catalog files in the workspace
Tree View Navigation
- Color-coded hierarchical display of JSON structure
- Expandable/collapsible nodes for easy navigation
- Custom icons for different value types
- Tree state persistence across sessions
- Left-click interacts with elements, while double-click, Space, or Enter triggers the edit mode
- Delete Operations:
- Right-click context menu for element deletion
- Safety confirmation dialogs with detailed information
- Child element warnings for arrays and objects
- Clear display of affected elements before deletion
- Ability to cancel deletion operations
IBM Cloud Integration
- Secure API key management and authentication
- Login through the status bar or command palette
- Real-time catalog ID lookup when logged in
- Offering and flavors lookups with caching support
- Offline mode with cached data when available
Pre-release Management
- Dedicated pre-release panel in the side view
- GitHub integration for release management
- Automated version suggestion based on semantic versioning
- Support for both stable and preview releases
- IBM Cloud Catalog version import functionality
- Branch protection and validation
- Unpushed changes detection
- Multiple flavor support per release
- Automated release notes generation
Smart Editing and Dependency Management
- Catalog ID Interaction:
- Interactive catalog selection with real-time validation
- Offering list display based on selected catalog
- Dependencies Management:
- Add regular and swappable dependencies
- Guided prompts for catalog, offering, version, and flavor selection
- Inline editing of dependency properties
- Version selection with availability validation
- Multiple flavor support with context-aware suggestions
- Configuration Management:
- Property-based configuration field editing
- Guided configuration field addition
- Property deletion support
- Input Mapping:
- Support for version_input, dependency_input, dependency_output, and value mappings
- Context-aware mapping source and target selection
- Dependency output validation against offerings and flavors
- Configuration key mapping for version inputs
Performance Optimization
- Local caching of IBM Cloud data
- Debounced file system operations
- Background data fetching
- Cache management commands
- Configurable debug logging
Guided Prompts
The extension provides context-aware prompts to guide you through various operations. Each section below describes how to trigger the prompts and what they offer:
1. Dependency Management
Regular Dependencies
How to Access:
Add New: Click + icon next to "dependencies" array
Edit: Double-click or press Space/Enter on any dependency field
Delete: Right-click on dependency and select "Delete"
Catalog Selection (Triggered first when adding dependency)
- Browse public and private catalogs with descriptions
- Search by name or ID with real-time filtering
- View catalog metadata including owner and visibility
- Enter custom catalog ID with validation
- Recently used catalogs appear at the top
Offering Selection (After catalog selection)
- List of offerings from selected catalog with descriptions
- Filter by name, ID, or keywords
- Preview offering details including versions and flavors
- Quick select from recent offerings
- Manual ID entry with validation
Version Selection (After offering selection)
Predefined constraint options:
Latest Compatible (^1.2.3): Updates within major version
Patch Updates Only (~1.2.3): Updates patch version only
Greater Than or Equal (>=1.2.3): Always use newer versions
Version Range: Specify custom range (e.g., >=1.2.3 <2.0.0)
List of available versions with release dates
Custom version constraint with validation
Version range builder with visual feedback
Flavor Selection (Final step)
- Browse available flavors with detailed descriptions
- Multi-select support for multiple flavors
- Preview flavor capabilities and requirements
- Filter by compatibility and features
- Custom flavor name entry with validation
Swappable Dependencies
Adding New Mappings
How to Access:
New Mapping: Click + icon next to "input_mapping" array
Edit Existing: Double-click the respective field:
- version_input
- dependency_input
- dependency_output
- value
Direction: Double-click "reference_version" field
Mapping Types and Options:
Version Input Mapping
Maps configuration inputs to dependency
Direction options:
↑ Default (false): Dependency up to parent
↓ Parent down (true): Parent to dependency
↑ Explicit up (false): Force upward mapping
Source selection with validation
Configuration key suggestions
Dependency Input Mapping
- Available inputs from dependency's configuration
- Type validation and compatibility check
- Default value suggestions
- Reference version control
Dependency Output Mapping
- Lists available outputs from dependency
- Filtered by selected flavors
- Real-time validation against offering
- Output type information
Static Value Mapping
Supports multiple data types:
String: Text values with optional validation
Number: Integers or decimals with range checks
Boolean: True/false with toggle
Array: JSON array with structure validation
Object: JSON object with schema validation
Null: Explicit null value
Format validation and suggestions
Type conversion assistance
4. Pre-release Management
Available Elements
The following elements can be added and configured in your catalog:
Root Level Elements
name
: Catalog name
label
: Display label
short_description
: Brief description
catalog_id
: Unique identifier
tags
: Categorization tags
keywords
: Search keywords
provider
: Provider information
support
: Support contact details
Dependencies
- Regular Dependencies
catalog_id
: Source catalog
id
: Offering ID
version
: Version specification
flavors
: Supported flavors
- Swappable Dependencies
group_id
: Group identifier
default
: Default selection
alternatives
: Alternative options
Configuration
- Simple Values
string
: Text values
number
: Numeric values
boolean
: True/false values
- Complex Types
object
: Nested objects
array
: Value arrays
enum
: Predefined options
Input Mapping
version_input
: Version-specific inputs
dependency_input
: Dependency configuration
dependency_output
: Output mapping
value
: Static value mapping
Metadata
format_kind
: Format specification
offering_id
: Offering identifier
version_id
: Version identifier
flavor_id
: Flavor identifier
Installation
VS Code Marketplace
https://marketplace.visualstudio.com/items?itemName=DanielButler.ibm-catalog-json-editor
- Open VS Code
- Click the Extensions icon (
Cmd+Shift+X
or Ctrl+Shift+X
)
- Search for "IBM Catalog Tools"
- Click "Install"
Manual Installation
Download the .vsix
file from Releases
Install via command:
code --install-extension ibm-catalog-json-editor-x.x.x.vsix
Usage
Open or Create a Catalog
- Open existing
ibm_catalog.json
- Or create new via command palette
Navigate and Edit
- Use the IBM Catalog Explorer view
- Click elements to edit
- Use context menus for advanced options
Pre-release Management
- Open Pre-release panel
- Login to GitHub and IBM Cloud
- Follow guided workflow for releases
Dependency Management
- Add dependencies via + icon
- Configure through guided prompts
- Manage versions and flavors
Configuration and Mapping
- Edit configuration fields
- Set up input mappings
- Configure dependency relationships
Debugging
The extension provides comprehensive debugging support:
Log Levels
- Set via command palette
- DEBUG: Detailed operation logs
- INFO: General operation info
- WARN: Warning messages
- ERROR: Error details
Log Channels
- Main Channel: General extension logs
- Pre-release Channel: Pre-release operation logs
Cache Management
- Clear cache command
- Force refresh options
- Authentication reset
Support
For issues, questions, or feature requests:
License
This project is licensed under the Apache 2.0.