Command Reference
This document lists all VS Code commands provided by the AI Primitives Hub extension.
Hub Replication (CLI)
ai-primitives-hub hub replicate --source-hub owner/repo --target-root https://artifactory.example/repo
Replication reads the source hub-config.yml at --source-ref and processes enabled type: github sources. A release is a candidate only when its name matches <collectionid>-vX.Y.Z, it contains one deployment-manifest.yml and one <collectionid>.bundle.zip (other differently named assets are allowed), and its manifest id/version match the release name. Noncompliant releases are excluded with warnings. Replication derives the stable ID <owner>-<repo>[-<manifest.id>] and accepts only SemVer versions. --mode latest (the default) selects the newest stable version for unpinned profile references, falling back to the highest prerelease only when no stable candidate exists; --mode all retains every verified release. A profile with any unresolved or unsupported bundle reference is excluded as a whole with a warning.
The command is metadata-only by default: it never downloads archives or publishes. Add --publish --review to opt into publication. Bundle objects and index-v1.json are written under <target-root>/sources/replicated and hub-config.yml at <target-root>; each object is checked with HEAD and SHA-256 before upload, and the write order is bundle objects, an immutable catalog generation, the compatibility index-v1.json, then hub-config.yml. The generated hub points to its exact catalog generation so overlapping runs cannot mix its profiles with another run's catalog. Existing objects with the same digest are resumed/skipped. Conflicting or unverifiable bundle objects fail closed by default. With --allow-unverified-existing, the CLI skips unverified bundles with warnings and omits them from the generated index. Any profile that references an unverified bundle is excluded as a whole. An unverifiable existing catalog generation still stops publication, with or without --allow-unverified-existing. Only the index and hub config may be refreshed after verified bundle publication: metadata creation uses If-None-Match and replacement requires a strong ETag with If-Match. Missing validators or concurrent-write precondition failures stop publication. GitHub reads retry transient failures with a bounded backoff; Artifactory uploads are not retried, so rerun the command to resume. When --request-budget is exhausted the command stops with a message to rerun with the same cache directory. Publication credentials are read from the environment variable named by --publisher-credential-ref (default ARTIFACTORY_PUBLISHER_TOKEN); --target-credential-ref only records the consumer reference in the generated hub config. Credentials never appear in logs, cache keys, URLs, or generated configuration.
--cache-dir, --workers, and --request-budget control persistent metadata/archive reuse, concurrency, and the GitHub request ceiling. Cache files are atomically written with directory mode 700 and file mode 600. No GitHub fallback client or gh CLI is used by production replication.
Bundle Management
| Command | Title | Description |
|---|---|---|
promptRegistry.viewBundle | View Bundle Details | View detailed information about a bundle |
promptRegistry.updateBundle | Update Bundle | Update a specific bundle to the latest version |
promptRegistry.uninstallBundle | Uninstall Bundle | Remove an installed bundle |
promptRegistry.checkBundleUpdates | Check for Bundle Updates | Check if updates are available for a bundle |
promptRegistry.updateAllBundles | Update All Bundles | Update all installed bundles to their latest versions |
promptRegistry.manualCheckForUpdates | Check for Updates (Manual) | Manually trigger an update check |
promptRegistry.enableAutoUpdate | Enable Auto-Update | Enable automatic updates for a bundle |
promptRegistry.disableAutoUpdate | Disable Auto-Update | Disable automatic updates for a bundle |
Index & Search
| Command | Title | Description |
|---|---|---|
promptRegistry.searchPrimitives | Search Primitives | Search indexed prompts, instructions, chat modes, agents, and skills |
promptRegistry.rebuildPrimitiveIndex | Rebuild Primitive Index | Rebuild the shared primitive index from enabled sources, with progress in a notification and the AI Primitives Hub output channel |
Primitive search reads only a pre-built local index. It does not synchronize sources or rebuild the index. Rebuild Primitive Index is the explicit lifecycle operation that may access configured sources; it reports harvest, indexing, and embedding milestones in the AI Primitives Hub output channel and shows a completion or failure notification.
Scope Management
Commands for managing bundle installation scope. These are available via context menu on installed bundles in the Registry Explorer.
| Command | Title | Description |
|---|---|---|
promptRegistry.moveToRepositoryCommit | Move to Repository (Commit) | Move a user-scoped bundle to repository scope, tracked in Git |
promptRegistry.moveToRepositoryLocalOnly | Move to Repository (Local Only) | Move a user-scoped bundle to repository scope, excluded from Git |
promptRegistry.moveToUser | Move to User | Move a repository-scoped bundle to user scope |
promptRegistry.switchToLocalOnly | Switch to Local Only | Change a repository bundle from commit to local-only mode |
promptRegistry.switchToCommit | Switch to Commit | Change a repository bundle from local-only to commit mode |
promptRegistry.cleanupStaleLockfileEntries | Clean Up Stale Repository Bundles | Remove lockfile entries where files no longer exist |
Move to Repository
Migrates a bundle from user scope to repository scope.
Commands:
promptRegistry.moveToRepositoryCommit— Files tracked in version controlpromptRegistry.moveToRepositoryLocalOnly— Files excluded via.git/info/exclude
Parameters:
bundleId— The ID of the bundle to move
Requirements: A workspace must be open.
Move to User
Migrates a bundle from repository scope to user scope.
Command: promptRegistry.moveToUser
Parameters:
bundleId— The ID of the bundle to move
The bundle becomes available across all workspaces after migration.
Switch Commit Mode
Changes how a repository-scoped bundle interacts with Git.
Commands:
promptRegistry.switchToLocalOnly— Exclude files from Git (adds to.git/info/exclude)promptRegistry.switchToCommit— Track files in Git (removes from.git/info/exclude)
Parameters:
bundleId— The ID of the bundle
Clean Up Stale Repository Bundles
Removes lockfile entries where the corresponding files no longer exist in the repository.
Command: promptRegistry.cleanupStaleLockfileEntries
This is useful when bundle files have been manually deleted but the lockfile still references them. The command:
- Scans the lockfile for bundles with missing files
- Shows a confirmation dialog with the count of stale entries
- Removes confirmed stale entries from the lockfile
Source Management
| Command | Title | Description |
|---|---|---|
promptRegistry.addSource | Add Source | Add a new bundle source |
promptRegistry.editSource | Edit Source | Modify an existing source configuration |
promptRegistry.removeSource | Remove Source | Delete a source from the registry |
promptRegistry.syncSource | Sync Source | Synchronize bundles from a specific source |
promptRegistry.syncAllSources | Sync All Sources | Synchronize bundles from all configured sources |
promptRegistry.toggleSource | Toggle Source Enabled/Disabled | Enable or disable a source |
Profile Management
| Command | Title | Description |
|---|---|---|
promptRegistry.createProfile | Create New Profile | Create a new bundle profile |
promptRegistry.editProfile | Edit Profile | Modify an existing profile |
promptRegistry.activateProfile | Activate Profile | Activate a profile to install its bundles |
promptRegistry.deactivateProfile | Deactivate Profile | Deactivate a profile |
promptRegistry.deleteProfile | Delete Profile | Remove a profile |
promptRegistry.exportProfile | Export Profile | Export a profile to a file |
promptRegistry.importProfile | Import Profile | Import a profile from a file |
promptRegistry.listProfiles | List All Profiles | Display all available profiles |
promptRegistry.toggleProfileView | Toggle Favorites View | Switch between profile views |
promptRegistry.toggleProfileFavorite | Toggle Favorite | Mark or unmark a profile as favorite |
Hub Management
| Command | Title | Description |
|---|---|---|
promptregistry.importHub | Import Hub | Import a hub configuration |
promptregistry.listHubs | List Hubs | Display all configured hubs |
promptregistry.syncHub | Sync Hub | Synchronize with a hub |
promptregistry.deleteHub | Delete Hub | Remove a hub configuration |
promptregistry.switchHub | Switch Hub | Switch to a different hub |
promptregistry.exportHubConfig | Export Hub Configuration | Export hub configuration to a file |
promptregistry.openHubRepository | Open Hub Repository | Open the hub's repository in a browser |
Hub Profile Management
| Command | Title | Description |
|---|---|---|
promptregistry.listHubProfiles | List Hub Profiles | Display profiles from a hub |
promptregistry.browseHubProfiles | Browse Hub Profiles | Browse available hub profiles |
promptregistry.viewHubProfile | View Hub Profile | View details of a hub profile |
promptregistry.activateHubProfile | Activate Hub Profile | Activate a hub profile |
promptregistry.deactivateHubProfile | Deactivate Hub Profile | Deactivate a hub profile |
promptregistry.showActiveProfiles | Show Active Hub Profiles | Display currently active hub profiles |
promptregistry.checkForUpdates | Check Hub Profile for Updates | Check for updates to a hub profile |
promptregistry.viewProfileChanges | View Hub Profile Changes | View changes in a hub profile |
promptregistry.syncProfileNow | Sync Hub Profile Now | Immediately sync a hub profile |
promptregistry.reviewAndSyncProfile | Review and Sync Hub Profile | Review changes before syncing |
promptregistry.viewSyncHistory | View Hub Profile Sync History | View synchronization history |
promptregistry.rollbackProfile | Rollback Hub Profile | Revert to a previous profile state |
promptregistry.clearSyncHistory | Clear Hub Profile Sync History | Clear the sync history |
Collection & Validation
| Command | Title | Description |
|---|---|---|
promptRegistry.createCollection | Create New Collection | Create a new prompt collection |
promptRegistry.validateCollections | Validate Collections | Validate collection YAML files including file references and duplicate detection |
promptRegistry.validateApm | Validate APM Package | Validate an APM package |
promptRegistry.listCollections | List All Collections | Display all collections |
Scaffolding & Resources
| Command | Title | Description |
|---|---|---|
promptRegistry.scaffoldProject | Scaffold Project | Create a new project from a template |
promptRegistry.addResource | Add Resource | Add a prompt, instruction, agent, or skill |
Cross-Platform Path Handling
The scaffold command normalizes path separators to forward slashes before checking for the templates/scaffolds directory, ensuring correct template resolution on Windows where backslash separators are used.
Settings & Configuration
| Command | Title | Description |
|---|---|---|
promptRegistry.exportSettings | Export Settings | Export extension settings to a file |
promptRegistry.importSettings | Import Settings | Import extension settings from a file |
promptRegistry.openSettings | Open Settings | Open extension settings |
Authentication & Access
| Command | Title | Description |
|---|---|---|
promptregistry.forceGitHubAuth | Force GitHub Authentication | Force re-authentication with GitHub |
Utilities
| Command | Title | Description |
|---|---|---|
promptregistry.openItemRepository | Open Repository | Open an item's repository in a browser |
promptRegistry.resetFirstRun | Reset First Run | Reset first-run state to re-trigger hub selection dialog |
See Also
- Settings Reference — Extension configuration options
- Getting Started — Installation and first steps