Skip to main content

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​

CommandTitleDescription
promptRegistry.viewBundleView Bundle DetailsView detailed information about a bundle
promptRegistry.updateBundleUpdate BundleUpdate a specific bundle to the latest version
promptRegistry.uninstallBundleUninstall BundleRemove an installed bundle
promptRegistry.checkBundleUpdatesCheck for Bundle UpdatesCheck if updates are available for a bundle
promptRegistry.updateAllBundlesUpdate All BundlesUpdate all installed bundles to their latest versions
promptRegistry.manualCheckForUpdatesCheck for Updates (Manual)Manually trigger an update check
promptRegistry.enableAutoUpdateEnable Auto-UpdateEnable automatic updates for a bundle
promptRegistry.disableAutoUpdateDisable Auto-UpdateDisable automatic updates for a bundle
CommandTitleDescription
promptRegistry.searchPrimitivesSearch PrimitivesSearch indexed prompts, instructions, chat modes, agents, and skills
promptRegistry.rebuildPrimitiveIndexRebuild Primitive IndexRebuild 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.

CommandTitleDescription
promptRegistry.moveToRepositoryCommitMove to Repository (Commit)Move a user-scoped bundle to repository scope, tracked in Git
promptRegistry.moveToRepositoryLocalOnlyMove to Repository (Local Only)Move a user-scoped bundle to repository scope, excluded from Git
promptRegistry.moveToUserMove to UserMove a repository-scoped bundle to user scope
promptRegistry.switchToLocalOnlySwitch to Local OnlyChange a repository bundle from commit to local-only mode
promptRegistry.switchToCommitSwitch to CommitChange a repository bundle from local-only to commit mode
promptRegistry.cleanupStaleLockfileEntriesClean Up Stale Repository BundlesRemove 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 control
  • promptRegistry.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:

  1. Scans the lockfile for bundles with missing files
  2. Shows a confirmation dialog with the count of stale entries
  3. Removes confirmed stale entries from the lockfile

Source Management​

CommandTitleDescription
promptRegistry.addSourceAdd SourceAdd a new bundle source
promptRegistry.editSourceEdit SourceModify an existing source configuration
promptRegistry.removeSourceRemove SourceDelete a source from the registry
promptRegistry.syncSourceSync SourceSynchronize bundles from a specific source
promptRegistry.syncAllSourcesSync All SourcesSynchronize bundles from all configured sources
promptRegistry.toggleSourceToggle Source Enabled/DisabledEnable or disable a source

Profile Management​

CommandTitleDescription
promptRegistry.createProfileCreate New ProfileCreate a new bundle profile
promptRegistry.editProfileEdit ProfileModify an existing profile
promptRegistry.activateProfileActivate ProfileActivate a profile to install its bundles
promptRegistry.deactivateProfileDeactivate ProfileDeactivate a profile
promptRegistry.deleteProfileDelete ProfileRemove a profile
promptRegistry.exportProfileExport ProfileExport a profile to a file
promptRegistry.importProfileImport ProfileImport a profile from a file
promptRegistry.listProfilesList All ProfilesDisplay all available profiles
promptRegistry.toggleProfileViewToggle Favorites ViewSwitch between profile views
promptRegistry.toggleProfileFavoriteToggle FavoriteMark or unmark a profile as favorite

Hub Management​

CommandTitleDescription
promptregistry.importHubImport HubImport a hub configuration
promptregistry.listHubsList HubsDisplay all configured hubs
promptregistry.syncHubSync HubSynchronize with a hub
promptregistry.deleteHubDelete HubRemove a hub configuration
promptregistry.switchHubSwitch HubSwitch to a different hub
promptregistry.exportHubConfigExport Hub ConfigurationExport hub configuration to a file
promptregistry.openHubRepositoryOpen Hub RepositoryOpen the hub's repository in a browser

Hub Profile Management​

CommandTitleDescription
promptregistry.listHubProfilesList Hub ProfilesDisplay profiles from a hub
promptregistry.browseHubProfilesBrowse Hub ProfilesBrowse available hub profiles
promptregistry.viewHubProfileView Hub ProfileView details of a hub profile
promptregistry.activateHubProfileActivate Hub ProfileActivate a hub profile
promptregistry.deactivateHubProfileDeactivate Hub ProfileDeactivate a hub profile
promptregistry.showActiveProfilesShow Active Hub ProfilesDisplay currently active hub profiles
promptregistry.checkForUpdatesCheck Hub Profile for UpdatesCheck for updates to a hub profile
promptregistry.viewProfileChangesView Hub Profile ChangesView changes in a hub profile
promptregistry.syncProfileNowSync Hub Profile NowImmediately sync a hub profile
promptregistry.reviewAndSyncProfileReview and Sync Hub ProfileReview changes before syncing
promptregistry.viewSyncHistoryView Hub Profile Sync HistoryView synchronization history
promptregistry.rollbackProfileRollback Hub ProfileRevert to a previous profile state
promptregistry.clearSyncHistoryClear Hub Profile Sync HistoryClear the sync history

Collection & Validation​

CommandTitleDescription
promptRegistry.createCollectionCreate New CollectionCreate a new prompt collection
promptRegistry.validateCollectionsValidate CollectionsValidate collection YAML files including file references and duplicate detection
promptRegistry.validateApmValidate APM PackageValidate an APM package
promptRegistry.listCollectionsList All CollectionsDisplay all collections

Scaffolding & Resources​

CommandTitleDescription
promptRegistry.scaffoldProjectScaffold ProjectCreate a new project from a template
promptRegistry.addResourceAdd ResourceAdd 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​

CommandTitleDescription
promptRegistry.exportSettingsExport SettingsExport extension settings to a file
promptRegistry.importSettingsImport SettingsImport extension settings from a file
promptRegistry.openSettingsOpen SettingsOpen extension settings

Authentication & Access​

CommandTitleDescription
promptregistry.forceGitHubAuthForce GitHub AuthenticationForce re-authentication with GitHub

Utilities​

CommandTitleDescription
promptregistry.openItemRepositoryOpen RepositoryOpen an item's repository in a browser
promptRegistry.resetFirstRunReset First RunReset first-run state to re-trigger hub selection dialog

See Also​