@vibesdotdev/cli 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -0
- package/SPEC.md +97 -0
- package/bin/vibes.ts +26 -0
- package/dist/api/client/factory.d.ts +29 -0
- package/dist/api/client/factory.d.ts.map +1 -0
- package/dist/api/client/factory.js +189 -0
- package/dist/api/client/factory.js.map +1 -0
- package/dist/api/schemas/common.d.ts +58 -0
- package/dist/api/schemas/common.d.ts.map +1 -0
- package/dist/api/schemas/common.js +48 -0
- package/dist/api/schemas/common.js.map +1 -0
- package/dist/api/schemas/types.d.ts +30 -0
- package/dist/api/schemas/types.d.ts.map +1 -0
- package/dist/api/schemas/types.js +2 -0
- package/dist/api/schemas/types.js.map +1 -0
- package/dist/api/services/api.d.ts +14 -0
- package/dist/api/services/api.d.ts.map +1 -0
- package/dist/api/services/api.js +110 -0
- package/dist/api/services/api.js.map +1 -0
- package/dist/api/types.d.ts +6 -0
- package/dist/api/types.d.ts.map +1 -0
- package/dist/api/types.js +5 -0
- package/dist/api/types.js.map +1 -0
- package/dist/bin.d.ts +28 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +73 -0
- package/dist/bin.js.map +1 -0
- package/dist/bootstrap.d.ts +14 -0
- package/dist/bootstrap.d.ts.map +1 -0
- package/dist/bootstrap.js +14 -0
- package/dist/bootstrap.js.map +1 -0
- package/dist/cli.plugin.d.ts +20 -0
- package/dist/cli.plugin.d.ts.map +1 -0
- package/dist/cli.plugin.js +170 -0
- package/dist/cli.plugin.js.map +1 -0
- package/dist/commands/completion/bash.d.ts +8 -0
- package/dist/commands/completion/bash.d.ts.map +1 -0
- package/dist/commands/completion/bash.js +60 -0
- package/dist/commands/completion/bash.js.map +1 -0
- package/dist/commands/completion/completion.descriptor.d.ts +10 -0
- package/dist/commands/completion/completion.descriptor.d.ts.map +1 -0
- package/dist/commands/completion/completion.descriptor.js +41 -0
- package/dist/commands/completion/completion.descriptor.js.map +1 -0
- package/dist/commands/completion/completion.impl.d.ts +12 -0
- package/dist/commands/completion/completion.impl.d.ts.map +1 -0
- package/dist/commands/completion/completion.impl.js +167 -0
- package/dist/commands/completion/completion.impl.js.map +1 -0
- package/dist/commands/completion/fig.d.ts +12 -0
- package/dist/commands/completion/fig.d.ts.map +1 -0
- package/dist/commands/completion/fig.js +71 -0
- package/dist/commands/completion/fig.js.map +1 -0
- package/dist/commands/completion/fish.d.ts +8 -0
- package/dist/commands/completion/fish.d.ts.map +1 -0
- package/dist/commands/completion/fish.js +38 -0
- package/dist/commands/completion/fish.js.map +1 -0
- package/dist/commands/completion/tree.d.ts +33 -0
- package/dist/commands/completion/tree.d.ts.map +1 -0
- package/dist/commands/completion/tree.js +75 -0
- package/dist/commands/completion/tree.js.map +1 -0
- package/dist/commands/completion/zsh-widget.d.ts +13 -0
- package/dist/commands/completion/zsh-widget.d.ts.map +1 -0
- package/dist/commands/completion/zsh-widget.js +39 -0
- package/dist/commands/completion/zsh-widget.js.map +1 -0
- package/dist/commands/completion/zsh.d.ts +9 -0
- package/dist/commands/completion/zsh.d.ts.map +1 -0
- package/dist/commands/completion/zsh.js +146 -0
- package/dist/commands/completion/zsh.js.map +1 -0
- package/dist/commands/profile/_utils.d.ts +21 -0
- package/dist/commands/profile/_utils.d.ts.map +1 -0
- package/dist/commands/profile/_utils.js +61 -0
- package/dist/commands/profile/_utils.js.map +1 -0
- package/dist/commands/profile/profile-group.descriptor.d.ts +4 -0
- package/dist/commands/profile/profile-group.descriptor.d.ts.map +1 -0
- package/dist/commands/profile/profile-group.descriptor.js +12 -0
- package/dist/commands/profile/profile-group.descriptor.js.map +1 -0
- package/dist/commands/profile/profile.create.descriptor.d.ts +4 -0
- package/dist/commands/profile/profile.create.descriptor.d.ts.map +1 -0
- package/dist/commands/profile/profile.create.descriptor.js +22 -0
- package/dist/commands/profile/profile.create.descriptor.js.map +1 -0
- package/dist/commands/profile/profile.create.impl.d.ts +10 -0
- package/dist/commands/profile/profile.create.impl.d.ts.map +1 -0
- package/dist/commands/profile/profile.create.impl.js +29 -0
- package/dist/commands/profile/profile.create.impl.js.map +1 -0
- package/dist/commands/profile/profile.delete.descriptor.d.ts +4 -0
- package/dist/commands/profile/profile.delete.descriptor.d.ts.map +1 -0
- package/dist/commands/profile/profile.delete.descriptor.js +29 -0
- package/dist/commands/profile/profile.delete.descriptor.js.map +1 -0
- package/dist/commands/profile/profile.delete.impl.d.ts +11 -0
- package/dist/commands/profile/profile.delete.impl.d.ts.map +1 -0
- package/dist/commands/profile/profile.delete.impl.js +50 -0
- package/dist/commands/profile/profile.delete.impl.js.map +1 -0
- package/dist/commands/profile/profile.info.descriptor.d.ts +4 -0
- package/dist/commands/profile/profile.info.descriptor.d.ts.map +1 -0
- package/dist/commands/profile/profile.info.descriptor.js +23 -0
- package/dist/commands/profile/profile.info.descriptor.js.map +1 -0
- package/dist/commands/profile/profile.info.impl.d.ts +10 -0
- package/dist/commands/profile/profile.info.impl.d.ts.map +1 -0
- package/dist/commands/profile/profile.info.impl.js +33 -0
- package/dist/commands/profile/profile.info.impl.js.map +1 -0
- package/dist/commands/profile/profile.list.descriptor.d.ts +4 -0
- package/dist/commands/profile/profile.list.descriptor.d.ts.map +1 -0
- package/dist/commands/profile/profile.list.descriptor.js +16 -0
- package/dist/commands/profile/profile.list.descriptor.js.map +1 -0
- package/dist/commands/profile/profile.list.impl.d.ts +10 -0
- package/dist/commands/profile/profile.list.impl.d.ts.map +1 -0
- package/dist/commands/profile/profile.list.impl.js +33 -0
- package/dist/commands/profile/profile.list.impl.js.map +1 -0
- package/dist/commands/profile/profile.use.descriptor.d.ts +4 -0
- package/dist/commands/profile/profile.use.descriptor.d.ts.map +1 -0
- package/dist/commands/profile/profile.use.descriptor.js +23 -0
- package/dist/commands/profile/profile.use.descriptor.js.map +1 -0
- package/dist/commands/profile/profile.use.impl.d.ts +10 -0
- package/dist/commands/profile/profile.use.impl.d.ts.map +1 -0
- package/dist/commands/profile/profile.use.impl.js +24 -0
- package/dist/commands/profile/profile.use.impl.js.map +1 -0
- package/dist/commands/runtime/_logging.d.ts +11 -0
- package/dist/commands/runtime/_logging.d.ts.map +1 -0
- package/dist/commands/runtime/_logging.js +40 -0
- package/dist/commands/runtime/_logging.js.map +1 -0
- package/dist/commands/runtime/codegen.command.descriptor.d.ts +15 -0
- package/dist/commands/runtime/codegen.command.descriptor.d.ts.map +1 -0
- package/dist/commands/runtime/codegen.command.descriptor.js +18 -0
- package/dist/commands/runtime/codegen.command.descriptor.js.map +1 -0
- package/dist/commands/runtime/codegen.command.impl.d.ts +4 -0
- package/dist/commands/runtime/codegen.command.impl.d.ts.map +1 -0
- package/dist/commands/runtime/codegen.command.impl.js +39 -0
- package/dist/commands/runtime/codegen.command.impl.js.map +1 -0
- package/dist/commands/runtime/codegen.d.ts +17 -0
- package/dist/commands/runtime/codegen.d.ts.map +1 -0
- package/dist/commands/runtime/codegen.js +65 -0
- package/dist/commands/runtime/codegen.js.map +1 -0
- package/dist/commands/runtime/index.d.ts +4 -0
- package/dist/commands/runtime/index.d.ts.map +1 -0
- package/dist/commands/runtime/index.js +8 -0
- package/dist/commands/runtime/index.js.map +1 -0
- package/dist/commands/runtime/plugin.d.ts +2 -0
- package/dist/commands/runtime/plugin.d.ts.map +1 -0
- package/dist/commands/runtime/plugin.js +7 -0
- package/dist/commands/runtime/plugin.js.map +1 -0
- package/dist/commands/runtime/runtime-group.descriptor.d.ts +4 -0
- package/dist/commands/runtime/runtime-group.descriptor.d.ts.map +1 -0
- package/dist/commands/runtime/runtime-group.descriptor.js +10 -0
- package/dist/commands/runtime/runtime-group.descriptor.js.map +1 -0
- package/dist/config.d.ts +17 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +11 -0
- package/dist/config.js.map +1 -0
- package/dist/core/index.d.ts +9 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +5 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/namespace/hook.d.ts +12 -0
- package/dist/core/namespace/hook.d.ts.map +1 -0
- package/dist/core/namespace/hook.js +15 -0
- package/dist/core/namespace/hook.js.map +1 -0
- package/dist/core/namespace/index.d.ts +18 -0
- package/dist/core/namespace/index.d.ts.map +1 -0
- package/dist/core/namespace/index.js +214 -0
- package/dist/core/namespace/index.js.map +1 -0
- package/dist/core/namespace/schemas/index.d.ts +25 -0
- package/dist/core/namespace/schemas/index.d.ts.map +1 -0
- package/dist/core/namespace/schemas/index.js +2 -0
- package/dist/core/namespace/schemas/index.js.map +1 -0
- package/dist/core/plugins/types.d.ts +81 -0
- package/dist/core/plugins/types.d.ts.map +1 -0
- package/dist/core/plugins/types.js +6 -0
- package/dist/core/plugins/types.js.map +1 -0
- package/dist/core/runtime/context.d.ts +25 -0
- package/dist/core/runtime/context.d.ts.map +1 -0
- package/dist/core/runtime/context.js +30 -0
- package/dist/core/runtime/context.js.map +1 -0
- package/dist/core/runtime/hooks.d.ts +12 -0
- package/dist/core/runtime/hooks.d.ts.map +1 -0
- package/dist/core/runtime/hooks.js +2 -0
- package/dist/core/runtime/hooks.js.map +1 -0
- package/dist/core/runtime/shared/context.d.ts +33 -0
- package/dist/core/runtime/shared/context.d.ts.map +1 -0
- package/dist/core/runtime/shared/context.js +51 -0
- package/dist/core/runtime/shared/context.js.map +1 -0
- package/dist/core/runtime/shared/options.d.ts +20 -0
- package/dist/core/runtime/shared/options.d.ts.map +1 -0
- package/dist/core/runtime/shared/options.js +61 -0
- package/dist/core/runtime/shared/options.js.map +1 -0
- package/dist/core/schemas/manifest.d.ts +24 -0
- package/dist/core/schemas/manifest.d.ts.map +1 -0
- package/dist/core/schemas/manifest.js +6 -0
- package/dist/core/schemas/manifest.js.map +1 -0
- package/dist/core/schemas/types.d.ts +7 -0
- package/dist/core/schemas/types.d.ts.map +1 -0
- package/dist/core/schemas/types.js +2 -0
- package/dist/core/schemas/types.js.map +1 -0
- package/dist/core/ui/interface.d.ts +12 -0
- package/dist/core/ui/interface.d.ts.map +1 -0
- package/dist/core/ui/interface.js +6 -0
- package/dist/core/ui/interface.js.map +1 -0
- package/dist/docs/cli.commands.docs.descriptor.d.ts +4 -0
- package/dist/docs/cli.commands.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/cli.commands.docs.descriptor.js +207 -0
- package/dist/docs/cli.commands.docs.descriptor.js.map +1 -0
- package/dist/docs/cli.groups.docs.descriptor.d.ts +4 -0
- package/dist/docs/cli.groups.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/cli.groups.docs.descriptor.js +330 -0
- package/dist/docs/cli.groups.docs.descriptor.js.map +1 -0
- package/dist/docs/cli.output.docs.descriptor.d.ts +4 -0
- package/dist/docs/cli.output.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/cli.output.docs.descriptor.js +442 -0
- package/dist/docs/cli.output.docs.descriptor.js.map +1 -0
- package/dist/docs/types.d.ts +19 -0
- package/dist/docs/types.d.ts.map +1 -0
- package/dist/docs/types.js +2 -0
- package/dist/docs/types.js.map +1 -0
- package/dist/errors.d.ts +74 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +113 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +29 -0
- package/dist/index.js.map +1 -0
- package/dist/logging/cli-startup.logger.descriptor.d.ts +7 -0
- package/dist/logging/cli-startup.logger.descriptor.d.ts.map +1 -0
- package/dist/logging/cli-startup.logger.descriptor.js +13 -0
- package/dist/logging/cli-startup.logger.descriptor.js.map +1 -0
- package/dist/logging.d.ts +4 -0
- package/dist/logging.d.ts.map +1 -0
- package/dist/logging.js +21 -0
- package/dist/logging.js.map +1 -0
- package/dist/patterns/config-namespace.d.ts +23 -0
- package/dist/patterns/config-namespace.d.ts.map +1 -0
- package/dist/patterns/config-namespace.js +218 -0
- package/dist/patterns/config-namespace.js.map +1 -0
- package/dist/patterns/crud.d.ts +23 -0
- package/dist/patterns/crud.d.ts.map +1 -0
- package/dist/patterns/crud.js +164 -0
- package/dist/patterns/crud.js.map +1 -0
- package/dist/patterns/index.d.ts +13 -0
- package/dist/patterns/index.d.ts.map +1 -0
- package/dist/patterns/index.js +13 -0
- package/dist/patterns/index.js.map +1 -0
- package/dist/patterns/log-viewer.d.ts +19 -0
- package/dist/patterns/log-viewer.d.ts.map +1 -0
- package/dist/patterns/log-viewer.js +74 -0
- package/dist/patterns/log-viewer.js.map +1 -0
- package/dist/patterns/pattern-types.d.ts +21 -0
- package/dist/patterns/pattern-types.d.ts.map +1 -0
- package/dist/patterns/pattern-types.js +7 -0
- package/dist/patterns/pattern-types.js.map +1 -0
- package/dist/patterns/process-manager.d.ts +21 -0
- package/dist/patterns/process-manager.d.ts.map +1 -0
- package/dist/patterns/process-manager.js +134 -0
- package/dist/patterns/process-manager.js.map +1 -0
- package/dist/patterns/resolver.contracts.d.ts +14 -0
- package/dist/patterns/resolver.contracts.d.ts.map +1 -0
- package/dist/patterns/resolver.contracts.js +9 -0
- package/dist/patterns/resolver.contracts.js.map +1 -0
- package/dist/patterns/resolver.d.ts +40 -0
- package/dist/patterns/resolver.d.ts.map +1 -0
- package/dist/patterns/resolver.js +63 -0
- package/dist/patterns/resolver.js.map +1 -0
- package/dist/patterns/schemas.d.ts +496 -0
- package/dist/patterns/schemas.d.ts.map +1 -0
- package/dist/patterns/schemas.js +105 -0
- package/dist/patterns/schemas.js.map +1 -0
- package/dist/patterns/tool-wrapper.d.ts +18 -0
- package/dist/patterns/tool-wrapper.d.ts.map +1 -0
- package/dist/patterns/tool-wrapper.js +130 -0
- package/dist/patterns/tool-wrapper.js.map +1 -0
- package/dist/providers.d.ts +105 -0
- package/dist/providers.d.ts.map +1 -0
- package/dist/providers.js +164 -0
- package/dist/providers.js.map +1 -0
- package/dist/schemas/descriptors.d.ts +130 -0
- package/dist/schemas/descriptors.d.ts.map +1 -0
- package/dist/schemas/descriptors.js +96 -0
- package/dist/schemas/descriptors.js.map +1 -0
- package/dist/schemas/surface.d.ts +40 -0
- package/dist/schemas/surface.d.ts.map +1 -0
- package/dist/schemas/surface.js +2 -0
- package/dist/schemas/surface.js.map +1 -0
- package/dist/schemas/types.d.ts +202 -0
- package/dist/schemas/types.d.ts.map +1 -0
- package/dist/schemas/types.js +2 -0
- package/dist/schemas/types.js.map +1 -0
- package/dist/support/ui-toolkit.d.ts +62 -0
- package/dist/support/ui-toolkit.d.ts.map +1 -0
- package/dist/support/ui-toolkit.js +172 -0
- package/dist/support/ui-toolkit.js.map +1 -0
- package/dist/surface/CLISurface.d.ts +16 -0
- package/dist/surface/CLISurface.d.ts.map +1 -0
- package/dist/surface/CLISurface.js +173 -0
- package/dist/surface/CLISurface.js.map +1 -0
- package/dist/surface/attach-tui-action.d.ts +12 -0
- package/dist/surface/attach-tui-action.d.ts.map +1 -0
- package/dist/surface/attach-tui-action.js +48 -0
- package/dist/surface/attach-tui-action.js.map +1 -0
- package/dist/surface/build-context.d.ts +4 -0
- package/dist/surface/build-context.d.ts.map +1 -0
- package/dist/surface/build-context.js +49 -0
- package/dist/surface/build-context.js.map +1 -0
- package/dist/surface/command-group-policy.d.ts +7 -0
- package/dist/surface/command-group-policy.d.ts.map +1 -0
- package/dist/surface/command-group-policy.js +42 -0
- package/dist/surface/command-group-policy.js.map +1 -0
- package/dist/surface/discovery-cache.d.ts +17 -0
- package/dist/surface/discovery-cache.d.ts.map +1 -0
- package/dist/surface/discovery-cache.js +106 -0
- package/dist/surface/discovery-cache.js.map +1 -0
- package/dist/surface/register-commands.d.ts +15 -0
- package/dist/surface/register-commands.d.ts.map +1 -0
- package/dist/surface/register-commands.js +197 -0
- package/dist/surface/register-commands.js.map +1 -0
- package/dist/surface/register-groups.d.ts +15 -0
- package/dist/surface/register-groups.d.ts.map +1 -0
- package/dist/surface/register-groups.js +52 -0
- package/dist/surface/register-groups.js.map +1 -0
- package/dist/surface.d.ts +9 -0
- package/dist/surface.d.ts.map +1 -0
- package/dist/surface.js +8 -0
- package/dist/surface.js.map +1 -0
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/ui/schemas/types.d.ts +2 -0
- package/dist/ui/schemas/types.d.ts.map +1 -0
- package/dist/ui/schemas/types.js +2 -0
- package/dist/ui/schemas/types.js.map +1 -0
- package/dist/ui/toolkit/VibesUIToolkit.d.ts +2 -0
- package/dist/ui/toolkit/VibesUIToolkit.d.ts.map +1 -0
- package/dist/ui/toolkit/VibesUIToolkit.js +2 -0
- package/dist/ui/toolkit/VibesUIToolkit.js.map +1 -0
- package/dist/ui.context.descriptor.d.ts +21 -0
- package/dist/ui.context.descriptor.d.ts.map +1 -0
- package/dist/ui.context.descriptor.js +12 -0
- package/dist/ui.context.descriptor.js.map +1 -0
- package/dist/utils/open.d.ts +2 -0
- package/dist/utils/open.d.ts.map +1 -0
- package/dist/utils/open.js +30 -0
- package/dist/utils/open.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +2 -0
- package/dist/version.js.map +1 -0
- package/package.json +186 -0
- package/src/api/client/factory.ts +265 -0
- package/src/api/schemas/common.ts +50 -0
- package/src/api/schemas/types.ts +32 -0
- package/src/api/services/api.ts +129 -0
- package/src/api/types.ts +12 -0
- package/src/bin.ts +84 -0
- package/src/bootstrap.ts +19 -0
- package/src/cli.plugin.d.ts +19 -0
- package/src/cli.plugin.ts +202 -0
- package/src/commands/completion/bash.ts +68 -0
- package/src/commands/completion/completion.descriptor.ts +48 -0
- package/src/commands/completion/completion.impl.ts +188 -0
- package/src/commands/completion/fig.ts +78 -0
- package/src/commands/completion/fish.ts +52 -0
- package/src/commands/completion/tree.ts +115 -0
- package/src/commands/completion/zsh-widget.ts +39 -0
- package/src/commands/completion/zsh.ts +165 -0
- package/src/commands/profile/_utils.ts +72 -0
- package/src/commands/profile/profile-group.descriptor.ts +14 -0
- package/src/commands/profile/profile.create.descriptor.ts +24 -0
- package/src/commands/profile/profile.create.impl.ts +44 -0
- package/src/commands/profile/profile.delete.descriptor.ts +31 -0
- package/src/commands/profile/profile.delete.impl.ts +71 -0
- package/src/commands/profile/profile.info.descriptor.ts +25 -0
- package/src/commands/profile/profile.info.impl.ts +51 -0
- package/src/commands/profile/profile.list.descriptor.ts +18 -0
- package/src/commands/profile/profile.list.impl.ts +46 -0
- package/src/commands/profile/profile.use.descriptor.ts +25 -0
- package/src/commands/profile/profile.use.impl.ts +39 -0
- package/src/commands/runtime/_logging.ts +47 -0
- package/src/commands/runtime/codegen.command.descriptor.ts +18 -0
- package/src/commands/runtime/codegen.command.impl.ts +44 -0
- package/src/commands/runtime/codegen.ts +84 -0
- package/src/commands/runtime/index.ts +14 -0
- package/src/commands/runtime/plugin.ts +7 -0
- package/src/commands/runtime/runtime-group.descriptor.ts +12 -0
- package/src/config.ts +22 -0
- package/src/core/index.ts +9 -0
- package/src/core/namespace/hook.ts +25 -0
- package/src/core/namespace/index.ts +298 -0
- package/src/core/namespace/schemas/index.ts +25 -0
- package/src/core/plugins/types.ts +87 -0
- package/src/core/runtime/context.ts +50 -0
- package/src/core/runtime/hooks.ts +12 -0
- package/src/core/runtime/shared/context.ts +65 -0
- package/src/core/runtime/shared/options.ts +60 -0
- package/src/core/schemas/manifest.ts +26 -0
- package/src/core/schemas/types.ts +6 -0
- package/src/core/ui/interface.ts +12 -0
- package/src/docs/cli.commands.docs.descriptor.ts +210 -0
- package/src/docs/cli.groups.docs.descriptor.ts +333 -0
- package/src/docs/cli.output.docs.descriptor.ts +445 -0
- package/src/docs/types.ts +18 -0
- package/src/errors.ts +123 -0
- package/src/index.ts +76 -0
- package/src/logging/cli-startup.logger.descriptor.ts +16 -0
- package/src/logging.ts +35 -0
- package/src/patterns/config-namespace.ts +251 -0
- package/src/patterns/crud.ts +217 -0
- package/src/patterns/index.ts +24 -0
- package/src/patterns/log-viewer.ts +118 -0
- package/src/patterns/pattern-types.ts +22 -0
- package/src/patterns/process-manager.ts +180 -0
- package/src/patterns/resolver.contracts.ts +15 -0
- package/src/patterns/resolver.ts +86 -0
- package/src/patterns/schemas.ts +146 -0
- package/src/patterns/tool-wrapper.ts +165 -0
- package/src/providers.ts +282 -0
- package/src/schemas/descriptors.d.ts +119 -0
- package/src/schemas/descriptors.ts +136 -0
- package/src/schemas/surface.ts +52 -0
- package/src/schemas/types.d.ts +195 -0
- package/src/schemas/types.ts +225 -0
- package/src/support/ui-toolkit.ts +224 -0
- package/src/surface/CLISurface.ts +193 -0
- package/src/surface/attach-tui-action.ts +76 -0
- package/src/surface/build-context.ts +49 -0
- package/src/surface/command-group-policy.ts +52 -0
- package/src/surface/discovery-cache.ts +143 -0
- package/src/surface/register-commands.ts +266 -0
- package/src/surface/register-groups.ts +84 -0
- package/src/surface.ts +9 -0
- package/src/types.ts +3 -0
- package/src/ui/schemas/types.ts +1 -0
- package/src/ui/toolkit/VibesUIToolkit.ts +1 -0
- package/src/ui.context.descriptor.ts +13 -0
- package/src/utils/open.ts +36 -0
- package/src/version.ts +10 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Core Schema Manifest
|
|
3
|
+
* Compatibility shim for command manifests
|
|
4
|
+
*/
|
|
5
|
+
export interface CommandDoc {
|
|
6
|
+
path: string;
|
|
7
|
+
title: string;
|
|
8
|
+
}
|
|
9
|
+
export interface CommandEntry {
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
schema?: unknown;
|
|
13
|
+
access?: {
|
|
14
|
+
auth?: 'required' | 'optional' | 'none';
|
|
15
|
+
};
|
|
16
|
+
docs?: CommandDoc[];
|
|
17
|
+
}
|
|
18
|
+
export interface CommandManifest {
|
|
19
|
+
namespace: string;
|
|
20
|
+
description: string;
|
|
21
|
+
commands: CommandEntry[];
|
|
22
|
+
docs?: CommandDoc[];
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../src/core/schemas/manifest.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE;QACP,IAAI,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;KACzC,CAAC;IACF,IAAI,CAAC,EAAE,UAAU,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,IAAI,CAAC,EAAE,UAAU,EAAE,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../../src/core/schemas/manifest.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/schemas/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/core/schemas/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI UI Interface
|
|
3
|
+
* Compatibility shim for UI handles
|
|
4
|
+
*/
|
|
5
|
+
export interface IUIHandles {
|
|
6
|
+
info(message: string): void;
|
|
7
|
+
warn(message: string): void;
|
|
8
|
+
error(message: string): void;
|
|
9
|
+
success(message: string): void;
|
|
10
|
+
log(message: string): void;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../src/core/ui/interface.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../src/core/ui/interface.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.commands.docs.descriptor.d.ts","sourceRoot":"","sources":["../../src/docs/cli.commands.docs.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAgKtD,QAAA,MAAM,UAAU,EAAE,mBA+CjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Descriptor for cli.commands
|
|
3
|
+
* Auto-generated by `vibes docs generate`
|
|
4
|
+
*/
|
|
5
|
+
const cli_commandsMarkdown = `---
|
|
6
|
+
title: CLI Commands
|
|
7
|
+
summary: Complete reference for vibes CLI commands and groups
|
|
8
|
+
tags: [cli, commands, reference, man-pages]
|
|
9
|
+
parent: cli
|
|
10
|
+
order: 1
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# CLI Commands
|
|
14
|
+
|
|
15
|
+
The vibes CLI provides command-line access to runtime features, documentation, and development tools.
|
|
16
|
+
|
|
17
|
+
## Overview
|
|
18
|
+
|
|
19
|
+
The CLI is organized into **groups** and **commands**:
|
|
20
|
+
|
|
21
|
+
\`\`\`
|
|
22
|
+
vibes <group> <command> [options]
|
|
23
|
+
\`\`\`
|
|
24
|
+
|
|
25
|
+
## Available groups
|
|
26
|
+
|
|
27
|
+
### \`vibes tools\`
|
|
28
|
+
|
|
29
|
+
Tool management and invocation:
|
|
30
|
+
|
|
31
|
+
- \`vibes tools list\` — List all registered tools
|
|
32
|
+
- \`vibes tools invoke <id>\` — Invoke a tool by id
|
|
33
|
+
- \`vibes tools info <id>\` — Show tool metadata
|
|
34
|
+
|
|
35
|
+
### \`vibes docs\`
|
|
36
|
+
|
|
37
|
+
Documentation browsing:
|
|
38
|
+
|
|
39
|
+
- \`vibes docs show <topic>\` — Render a topic to stdout
|
|
40
|
+
- \`vibes docs list\` — List all topics
|
|
41
|
+
- \`vibes docs search <query>\` — Search topics
|
|
42
|
+
- \`vibes docs open <topic>\` — Open topic in browser
|
|
43
|
+
- \`vibes docs generate <package> <topic>\` — Scaffold new descriptor
|
|
44
|
+
|
|
45
|
+
### \`vibes man\`
|
|
46
|
+
|
|
47
|
+
Manual pages (alias for \`vibes docs show\`):
|
|
48
|
+
|
|
49
|
+
- \`vibes man <topic>\` — Show man-page for topic
|
|
50
|
+
- \`vibes man <kind> <id>\` — Show by subject reference
|
|
51
|
+
|
|
52
|
+
### \`vibes dev\`
|
|
53
|
+
|
|
54
|
+
Development commands:
|
|
55
|
+
|
|
56
|
+
- \`vibes dev start\` — Start development server
|
|
57
|
+
- \`vibes dev build\` — Build for production
|
|
58
|
+
- \`vibes dev test\` — Run tests
|
|
59
|
+
- \`vibes dev lint\` — Run linter
|
|
60
|
+
|
|
61
|
+
### \`vibes workspace\`
|
|
62
|
+
|
|
63
|
+
Workspace management:
|
|
64
|
+
|
|
65
|
+
- \`vibes workspace info\` — Show workspace metadata
|
|
66
|
+
- \`vibes workspace list\` — List workspace slices
|
|
67
|
+
- \`vibes workspace switch <slice>\` — Switch active slice
|
|
68
|
+
|
|
69
|
+
## Common options
|
|
70
|
+
|
|
71
|
+
These options are available across most commands:
|
|
72
|
+
|
|
73
|
+
| Option | Description | Example |
|
|
74
|
+
|--------|-------------|---------|
|
|
75
|
+
| \`--help\` | Show help for command | \`vibes tools list --help\` |
|
|
76
|
+
| \`--json\` | Output as JSON | \`vibes tools list --json\` |
|
|
77
|
+
| \`--verbose\` | Enable verbose logging | \`vibes dev start --verbose\` |
|
|
78
|
+
| \`--no-color\` | Disable ANSI colors | \`vibes man tools.list --no-color\` |
|
|
79
|
+
| \`--bare\` | Skip envelope/formatting | \`vibes man tools.list --bare\` |
|
|
80
|
+
|
|
81
|
+
## Examples
|
|
82
|
+
|
|
83
|
+
### List all tools as JSON
|
|
84
|
+
|
|
85
|
+
\`\`\`bash
|
|
86
|
+
vibes tools list --json | jq '.[] | { id: .id, description: .description }'
|
|
87
|
+
\`\`\`
|
|
88
|
+
|
|
89
|
+
### View documentation
|
|
90
|
+
|
|
91
|
+
\`\`\`bash
|
|
92
|
+
# By topic id
|
|
93
|
+
vibes man tools.list
|
|
94
|
+
|
|
95
|
+
# By subject reference
|
|
96
|
+
vibes man tools/tool tools.list
|
|
97
|
+
|
|
98
|
+
# Open in browser
|
|
99
|
+
vibes docs open tools.list
|
|
100
|
+
\`\`\`
|
|
101
|
+
|
|
102
|
+
### Search documentation
|
|
103
|
+
|
|
104
|
+
\`\`\`bash
|
|
105
|
+
# Search by keyword
|
|
106
|
+
vibes docs search "runtime query"
|
|
107
|
+
|
|
108
|
+
# Filter by tag
|
|
109
|
+
vibes docs list --tag=tools
|
|
110
|
+
|
|
111
|
+
# Filter by parent
|
|
112
|
+
vibes docs list --parent=runtime
|
|
113
|
+
\`\`\`
|
|
114
|
+
|
|
115
|
+
### Generate new descriptor
|
|
116
|
+
|
|
117
|
+
\`\`\`bash
|
|
118
|
+
# Inline pattern (default)
|
|
119
|
+
vibes docs generate ai providers.anthropic
|
|
120
|
+
|
|
121
|
+
# Package-sourced pattern
|
|
122
|
+
vibes docs generate storage adapters.drizzle --pattern package
|
|
123
|
+
|
|
124
|
+
# With custom metadata
|
|
125
|
+
vibes docs generate tools my-tool \\
|
|
126
|
+
--parent tools \\
|
|
127
|
+
--title "My Custom Tool" \\
|
|
128
|
+
--dry-run
|
|
129
|
+
\`\`\`
|
|
130
|
+
|
|
131
|
+
## Exit codes
|
|
132
|
+
|
|
133
|
+
| Code | Meaning |
|
|
134
|
+
|------|---------|
|
|
135
|
+
| 0 | Success |
|
|
136
|
+
| 1 | General error |
|
|
137
|
+
| 2 | Invalid arguments |
|
|
138
|
+
| 3 | Topic not found |
|
|
139
|
+
| 4 | Permission denied |
|
|
140
|
+
|
|
141
|
+
## Environment variables
|
|
142
|
+
|
|
143
|
+
| Variable | Description | Default |
|
|
144
|
+
|----------|-------------|---------|
|
|
145
|
+
| \`VIBES_HOME\` | Vibes configuration directory | \`~/.vibes\` |
|
|
146
|
+
| \`VIBES_LOG_LEVEL\` | Logging level | \`info\` |
|
|
147
|
+
| \`VIBES_NO_COLOR\` | Disable colors | \`false\` |
|
|
148
|
+
| \`VIBES_HARDWARE\` | Hardware surface | \`consumer\` |
|
|
149
|
+
|
|
150
|
+
## Related
|
|
151
|
+
|
|
152
|
+
:::card{title="See also"}
|
|
153
|
+
- [\`cli.groups\`](cli.groups) — Command group structure
|
|
154
|
+
- [\`runtime.query\`](runtime.query) — Runtime discovery API
|
|
155
|
+
- [\`docs.topic\`](docs.topic) — Descriptor schema
|
|
156
|
+
:::
|
|
157
|
+
`;
|
|
158
|
+
const descriptor = {
|
|
159
|
+
kind: 'docs/topic',
|
|
160
|
+
id: 'cli.commands',
|
|
161
|
+
title: 'CLI Commands',
|
|
162
|
+
summary: 'Complete reference for vibes CLI commands and groups',
|
|
163
|
+
body: {
|
|
164
|
+
type: 'markdown',
|
|
165
|
+
sourceType: 'raw',
|
|
166
|
+
source: cli_commandsMarkdown
|
|
167
|
+
},
|
|
168
|
+
parent: 'cli',
|
|
169
|
+
order: 1,
|
|
170
|
+
tags: ['cli', 'commands', 'reference', 'man-pages'],
|
|
171
|
+
surfaces: ['cli', 'web', 'in-app'],
|
|
172
|
+
hardware: ['consumer'],
|
|
173
|
+
enabled: true,
|
|
174
|
+
man: {
|
|
175
|
+
name: 'vibes — CLI command reference',
|
|
176
|
+
section: 1,
|
|
177
|
+
synopsis: 'vibes <group> <command> [options]',
|
|
178
|
+
options: [
|
|
179
|
+
{ flag: '--help', description: 'Show help for command' },
|
|
180
|
+
{ flag: '--json', description: 'Output as JSON' },
|
|
181
|
+
{ flag: '--verbose', description: 'Enable verbose logging' },
|
|
182
|
+
{ flag: '--no-color', description: 'Disable ANSI colors' },
|
|
183
|
+
{ flag: '--bare', description: 'Skip envelope/formatting' }
|
|
184
|
+
],
|
|
185
|
+
examples: [
|
|
186
|
+
{
|
|
187
|
+
description: 'List all tools',
|
|
188
|
+
command: 'vibes tools list'
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
description: 'View man-page for a topic',
|
|
192
|
+
command: 'vibes man tools.list'
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
description: 'Search documentation',
|
|
196
|
+
command: 'vibes docs search "runtime query"'
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
description: 'Generate new descriptor',
|
|
200
|
+
command: 'vibes docs generate ai providers.anthropic'
|
|
201
|
+
}
|
|
202
|
+
],
|
|
203
|
+
seeAlso: ['cli.groups', 'runtime.query', 'docs.topic']
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
export default descriptor;
|
|
207
|
+
//# sourceMappingURL=cli.commands.docs.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.commands.docs.descriptor.js","sourceRoot":"","sources":["../../src/docs/cli.commands.docs.descriptor.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwJ5B,CAAC;AAEF,MAAM,UAAU,GAAwB;IACtC,IAAI,EAAE,YAAY;IAClB,EAAE,EAAE,cAAc;IAClB,KAAK,EAAE,cAAc;IACrB,OAAO,EAAE,sDAAsD;IAC/D,IAAI,EAAE;QACJ,IAAI,EAAE,UAAU;QAChB,UAAU,EAAE,KAAK;QACjB,MAAM,EAAE,oBAAoB;KAC7B;IACD,MAAM,EAAE,KAAK;IACb,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,CAAC;IACnD,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC;IAClC,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,OAAO,EAAE,IAAI;IACb,GAAG,EAAE;QACH,IAAI,EAAE,+BAA+B;QACrC,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,mCAAmC;QAC7C,OAAO,EAAE;YACP,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,uBAAuB,EAAE;YACxD,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,gBAAgB,EAAE;YACjD,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,wBAAwB,EAAE;YAC5D,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,qBAAqB,EAAE;YAC1D,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,0BAA0B,EAAE;SAC5D;QACD,QAAQ,EAAE;YACR;gBACE,WAAW,EAAE,gBAAgB;gBAC7B,OAAO,EAAE,kBAAkB;aAC5B;YACD;gBACE,WAAW,EAAE,2BAA2B;gBACxC,OAAO,EAAE,sBAAsB;aAChC;YACD;gBACE,WAAW,EAAE,sBAAsB;gBACnC,OAAO,EAAE,mCAAmC;aAC7C;YACD;gBACE,WAAW,EAAE,yBAAyB;gBACtC,OAAO,EAAE,4CAA4C;aACtD;SACF;QACD,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,YAAY,CAAC;KACvD;CACF,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.groups.docs.descriptor.d.ts","sourceRoot":"","sources":["../../src/docs/cli.groups.docs.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAsStD,QAAA,MAAM,UAAU,EAAE,mBAoCjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
const cli_groupsMarkdown = `---
|
|
2
|
+
title: CLI Groups
|
|
3
|
+
summary: Command group structure, nesting, and help display
|
|
4
|
+
tags: [cli, groups, commands, organization, help]
|
|
5
|
+
parent: cli
|
|
6
|
+
order: 2
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# CLI Groups
|
|
10
|
+
|
|
11
|
+
Command groups organize CLI commands into logical subcommand trees. Groups provide structure, discoverability, and consistent help display across the vibes CLI.
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
Groups are registered as \`cli/group\` runtime assets. Each group can contain commands or nested subgroups, forming a hierarchical command tree.
|
|
16
|
+
|
|
17
|
+
\`\`\`
|
|
18
|
+
vibes <group> <subgroup> <command> [options]
|
|
19
|
+
\`\`\`
|
|
20
|
+
|
|
21
|
+
## Group descriptor structure
|
|
22
|
+
|
|
23
|
+
Groups are defined with a descriptor that specifies metadata:
|
|
24
|
+
|
|
25
|
+
\`\`\`ts
|
|
26
|
+
import type { CLIGroupAssetDescriptor } from '@vibesdotdev/cli/schemas/descriptors';
|
|
27
|
+
|
|
28
|
+
const profileGroup: CLIGroupAssetDescriptor = {
|
|
29
|
+
kind: 'cli/group',
|
|
30
|
+
id: 'profile',
|
|
31
|
+
name: 'profile',
|
|
32
|
+
description: 'Manage configuration profiles',
|
|
33
|
+
parent: 'config', // optional — creates 'vibes config profile'
|
|
34
|
+
aliases: ['prof'], // optional aliases
|
|
35
|
+
surfaces: ['cli'],
|
|
36
|
+
order: 2, // sort order within parent
|
|
37
|
+
internal: false // if true, hidden unless --internal flag
|
|
38
|
+
};
|
|
39
|
+
\`\`\`
|
|
40
|
+
|
|
41
|
+
### Fields
|
|
42
|
+
|
|
43
|
+
| Field | Type | Required | Description |
|
|
44
|
+
|-------|------|----------|-------------|
|
|
45
|
+
| \`id\` | string | ✅ | Unique identifier (dot-separated for nesting) |
|
|
46
|
+
| \`name\` | string | ✅ | Command name as typed |
|
|
47
|
+
| \`description\` | string | ✅ | Help text shown in parent's help |
|
|
48
|
+
| \`parent\` | string | ❌ | Parent group id for nesting |
|
|
49
|
+
| \`aliases\` | string[] | ❌ | Alternative names |
|
|
50
|
+
| \`surfaces\` | \`'cli' | 'web' | 'worker' | 'bridge'\`[] | ❌ | Where group appears |
|
|
51
|
+
| \`order\` | number | ❌ | Sibling sort order (lower = earlier) |
|
|
52
|
+
| \`internal\` | boolean | ❌ | If true, hidden by default |
|
|
53
|
+
|
|
54
|
+
## Group registration
|
|
55
|
+
|
|
56
|
+
Groups are registered via the runtime plugin:
|
|
57
|
+
|
|
58
|
+
\`\`\`ts
|
|
59
|
+
// packages/cli/src/cli.plugin.ts
|
|
60
|
+
import profileGroup from './commands/profile/profile-group.descriptor';
|
|
61
|
+
|
|
62
|
+
export default createRuntimePlugin({
|
|
63
|
+
id: 'cli',
|
|
64
|
+
kinds: [cliGroupKind, cliCommandKind],
|
|
65
|
+
descriptors: [
|
|
66
|
+
profileGroup,
|
|
67
|
+
// ... other groups and commands
|
|
68
|
+
]
|
|
69
|
+
});
|
|
70
|
+
\`\`\`
|
|
71
|
+
|
|
72
|
+
## Nested groups
|
|
73
|
+
|
|
74
|
+
Groups can nest by referencing a parent:
|
|
75
|
+
|
|
76
|
+
\`\`\`ts
|
|
77
|
+
// Parent group
|
|
78
|
+
const configGroup: CLIGroupAssetDescriptor = {
|
|
79
|
+
kind: 'cli/group',
|
|
80
|
+
id: 'config',
|
|
81
|
+
name: 'config',
|
|
82
|
+
description: 'Configuration management'
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
// Child group
|
|
86
|
+
const profileGroup: CLIGroupAssetDescriptor = {
|
|
87
|
+
kind: 'cli/group',
|
|
88
|
+
id: 'config.profile',
|
|
89
|
+
name: 'profile',
|
|
90
|
+
description: 'Manage configuration profiles',
|
|
91
|
+
parent: 'config' // → 'vibes config profile'
|
|
92
|
+
};
|
|
93
|
+
\`\`\`
|
|
94
|
+
|
|
95
|
+
**Result:**
|
|
96
|
+
|
|
97
|
+
\`\`\`bash
|
|
98
|
+
vibes config # parent group
|
|
99
|
+
vibes config profile # nested group
|
|
100
|
+
vibes config profile list
|
|
101
|
+
vibes config profile create
|
|
102
|
+
\`\`\`
|
|
103
|
+
|
|
104
|
+
## Help display
|
|
105
|
+
|
|
106
|
+
Groups automatically generate help text:
|
|
107
|
+
|
|
108
|
+
\`\`\`bash
|
|
109
|
+
# Parent group help — shows subgroups and commands
|
|
110
|
+
$ vibes config --help
|
|
111
|
+
|
|
112
|
+
Usage: vibes config [options] [command]
|
|
113
|
+
|
|
114
|
+
Configuration management
|
|
115
|
+
|
|
116
|
+
Commands:
|
|
117
|
+
profile Manage configuration profiles
|
|
118
|
+
env Environment variable management
|
|
119
|
+
help [command] display help for command
|
|
120
|
+
|
|
121
|
+
# Nested group help
|
|
122
|
+
$ vibes config profile --help
|
|
123
|
+
|
|
124
|
+
Usage: vibes config profile [options] [command]
|
|
125
|
+
|
|
126
|
+
Manage configuration profiles
|
|
127
|
+
|
|
128
|
+
Commands:
|
|
129
|
+
list List all profiles
|
|
130
|
+
create Create a new profile
|
|
131
|
+
use Switch active profile
|
|
132
|
+
delete Delete a profile
|
|
133
|
+
info Show profile details
|
|
134
|
+
help [command] display help for command
|
|
135
|
+
\`\`\`
|
|
136
|
+
|
|
137
|
+
## Group resolution
|
|
138
|
+
|
|
139
|
+
The CLI surface resolves groups at runtime:
|
|
140
|
+
|
|
141
|
+
1. **Discovery** — Query \`runtime.assets('cli/group')\` for all group descriptors
|
|
142
|
+
2. **Filtering** — Apply surface and hardware filters
|
|
143
|
+
3. **Sorting** — Order by \`descriptor.order\`
|
|
144
|
+
4. **Registration** — Attach to Commander.js parent command
|
|
145
|
+
|
|
146
|
+
\`\`\`ts
|
|
147
|
+
// packages/cli/src/surface/register-groups.ts
|
|
148
|
+
const discovery = getCLIDiscovery(runtime, options);
|
|
149
|
+
const groups = discovery.sortedGroups;
|
|
150
|
+
|
|
151
|
+
for (const group of groups) {
|
|
152
|
+
await registerGroup(params, group);
|
|
153
|
+
}
|
|
154
|
+
\`\`\`
|
|
155
|
+
|
|
156
|
+
### Parent resolution
|
|
157
|
+
|
|
158
|
+
If a group references a missing parent:
|
|
159
|
+
|
|
160
|
+
- **Strict mode** (\`VIBES_CLI_STRICT=1\` or \`CLISurfaceOptions.strictGroupParents\`): throws error
|
|
161
|
+
- **Lenient mode** (default): logs warning, attaches to root
|
|
162
|
+
|
|
163
|
+
## Pattern-based groups
|
|
164
|
+
|
|
165
|
+
Groups can use patterns for dynamic behavior:
|
|
166
|
+
|
|
167
|
+
\`\`\`ts
|
|
168
|
+
const runtimeGroup: CLIPatternDescriptor = {
|
|
169
|
+
kind: 'cli/group',
|
|
170
|
+
id: 'runtime',
|
|
171
|
+
name: 'runtime',
|
|
172
|
+
description: 'Runtime management',
|
|
173
|
+
pattern: 'crud', // auto-generates list/create/delete commands
|
|
174
|
+
patternConfig: {
|
|
175
|
+
entityType: 'runtime/plugin',
|
|
176
|
+
listFields: ['id', 'name', 'version']
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
\`\`\`
|
|
180
|
+
|
|
181
|
+
Patterns are resolved by the pattern resolver:
|
|
182
|
+
|
|
183
|
+
\`\`\`ts
|
|
184
|
+
// packages/cli/src/surface/register-groups.ts
|
|
185
|
+
if (params.patternResolver && isPatternDescriptor(descriptor)) {
|
|
186
|
+
const ctx = await params.buildContext();
|
|
187
|
+
await params.patternResolver.resolve(
|
|
188
|
+
descriptor as CLIPatternDescriptor,
|
|
189
|
+
groupCmd,
|
|
190
|
+
ctx
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
\`\`\`
|
|
194
|
+
|
|
195
|
+
## Common patterns
|
|
196
|
+
|
|
197
|
+
### Flat structure
|
|
198
|
+
|
|
199
|
+
Simple commands without nesting:
|
|
200
|
+
|
|
201
|
+
\`\`\`ts
|
|
202
|
+
const completionGroup: CLIGroupAssetDescriptor = {
|
|
203
|
+
kind: 'cli/group',
|
|
204
|
+
id: 'shell-integration',
|
|
205
|
+
name: 'shell-integration',
|
|
206
|
+
description: 'Shell completions and integrations'
|
|
207
|
+
};
|
|
208
|
+
\`\`\`
|
|
209
|
+
|
|
210
|
+
### Deep nesting
|
|
211
|
+
|
|
212
|
+
Multi-level command trees:
|
|
213
|
+
|
|
214
|
+
\`\`\`ts
|
|
215
|
+
// vibes → dev → server → start
|
|
216
|
+
const serverGroup: CLIGroupAssetDescriptor = {
|
|
217
|
+
kind: 'cli/group',
|
|
218
|
+
id: 'dev.server',
|
|
219
|
+
name: 'server',
|
|
220
|
+
description: 'Development server',
|
|
221
|
+
parent: 'dev'
|
|
222
|
+
};
|
|
223
|
+
\`\`\`
|
|
224
|
+
|
|
225
|
+
### Aliased groups
|
|
226
|
+
|
|
227
|
+
Multiple access paths:
|
|
228
|
+
|
|
229
|
+
\`\`\`ts
|
|
230
|
+
const profileGroup: CLIGroupAssetDescriptor = {
|
|
231
|
+
kind: 'cli/group',
|
|
232
|
+
id: 'profile',
|
|
233
|
+
name: 'profile',
|
|
234
|
+
description: 'Manage profiles',
|
|
235
|
+
aliases: ['prof', 'p']
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
// All equivalent:
|
|
239
|
+
vibes profile list
|
|
240
|
+
vibes prof list
|
|
241
|
+
vibes p list
|
|
242
|
+
\`\`\`
|
|
243
|
+
|
|
244
|
+
## WRONG patterns
|
|
245
|
+
|
|
246
|
+
### ❌ Missing description
|
|
247
|
+
|
|
248
|
+
\`\`\`ts
|
|
249
|
+
// BAD — help text is empty
|
|
250
|
+
const group = {
|
|
251
|
+
kind: 'cli/group',
|
|
252
|
+
id: 'mystery',
|
|
253
|
+
name: 'mystery',
|
|
254
|
+
description: '' // ← shows as blank in help
|
|
255
|
+
};
|
|
256
|
+
\`\`\`
|
|
257
|
+
|
|
258
|
+
### ❌ Circular parent references
|
|
259
|
+
|
|
260
|
+
\`\`\`ts
|
|
261
|
+
// BAD — creates infinite loop
|
|
262
|
+
const groupA = { id: 'a', parent: 'b' };
|
|
263
|
+
const groupB = { id: 'b', parent: 'a' }; // ← circular!
|
|
264
|
+
\`\`\`
|
|
265
|
+
|
|
266
|
+
### ❌ Duplicate IDs
|
|
267
|
+
|
|
268
|
+
\`\`\`ts
|
|
269
|
+
// BAD — second registration overwrites first
|
|
270
|
+
const group1 = { id: 'profile', name: 'profile' };
|
|
271
|
+
const group2 = { id: 'profile', name: 'prof' }; // ← conflict!
|
|
272
|
+
\`\`\`
|
|
273
|
+
|
|
274
|
+
### ❌ Non-existent parent
|
|
275
|
+
|
|
276
|
+
\`\`\`ts
|
|
277
|
+
// BAD — parent 'config' doesn't exist
|
|
278
|
+
const profileGroup = {
|
|
279
|
+
id: 'profile',
|
|
280
|
+
parent: 'config' // ← warning in lenient mode, error in strict
|
|
281
|
+
};
|
|
282
|
+
\`\`\`
|
|
283
|
+
|
|
284
|
+
## Related
|
|
285
|
+
|
|
286
|
+
:::card{title="See also"}
|
|
287
|
+
- [\`cli.commands\`](cli.commands) — Command structure and execution
|
|
288
|
+
- [\`cli.output\`](cli.output) — Output formatting and display
|
|
289
|
+
- [\`runtime.assets\`](runtime.assets) — Asset discovery API
|
|
290
|
+
:::
|
|
291
|
+
`;
|
|
292
|
+
const descriptor = {
|
|
293
|
+
kind: 'docs/topic',
|
|
294
|
+
id: 'cli.groups',
|
|
295
|
+
title: 'CLI Groups',
|
|
296
|
+
summary: 'Command group structure, nesting, and help display',
|
|
297
|
+
body: {
|
|
298
|
+
type: 'markdown',
|
|
299
|
+
sourceType: 'raw',
|
|
300
|
+
source: cli_groupsMarkdown
|
|
301
|
+
},
|
|
302
|
+
parent: 'cli',
|
|
303
|
+
order: 2,
|
|
304
|
+
tags: ['cli', 'groups', 'commands', 'organization', 'help'],
|
|
305
|
+
surfaces: ['cli', 'web', 'in-app'],
|
|
306
|
+
hardware: ['consumer'],
|
|
307
|
+
enabled: true,
|
|
308
|
+
man: {
|
|
309
|
+
name: 'cli.groups — CLI command group structure',
|
|
310
|
+
section: 1,
|
|
311
|
+
synopsis: 'vibes man cli.groups',
|
|
312
|
+
examples: [
|
|
313
|
+
{
|
|
314
|
+
description: 'View group structure documentation',
|
|
315
|
+
command: 'vibes man cli.groups'
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
description: 'List all registered groups',
|
|
319
|
+
command: 'vibes runtime assets cli/group'
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
description: 'Show help for a group',
|
|
323
|
+
command: 'vibes profile --help'
|
|
324
|
+
}
|
|
325
|
+
],
|
|
326
|
+
seeAlso: ['cli.commands', 'cli.output', 'runtime.assets']
|
|
327
|
+
}
|
|
328
|
+
};
|
|
329
|
+
export default descriptor;
|
|
330
|
+
//# sourceMappingURL=cli.groups.docs.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.groups.docs.descriptor.js","sourceRoot":"","sources":["../../src/docs/cli.groups.docs.descriptor.ts"],"names":[],"mappings":"AAEA,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkS1B,CAAC;AAEF,MAAM,UAAU,GAAwB;IACvC,IAAI,EAAE,YAAY;IAClB,EAAE,EAAE,YAAY;IAChB,KAAK,EAAE,YAAY;IACnB,OAAO,EAAE,oDAAoD;IAC7D,IAAI,EAAE;QACL,IAAI,EAAE,UAAU;QAChB,UAAU,EAAE,KAAK;QACjB,MAAM,EAAE,kBAAkB;KAC1B;IACD,MAAM,EAAE,KAAK;IACb,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,CAAC;IAC3D,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC;IAClC,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,OAAO,EAAE,IAAI;IACb,GAAG,EAAE;QACJ,IAAI,EAAE,0CAA0C;QAChD,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,sBAAsB;QAChC,QAAQ,EAAE;YACT;gBACC,WAAW,EAAE,oCAAoC;gBACjD,OAAO,EAAE,sBAAsB;aAC/B;YACD;gBACC,WAAW,EAAE,4BAA4B;gBACzC,OAAO,EAAE,gCAAgC;aACzC;YACD;gBACC,WAAW,EAAE,uBAAuB;gBACpC,OAAO,EAAE,sBAAsB;aAC/B;SACD;QACD,OAAO,EAAE,CAAC,cAAc,EAAE,YAAY,EAAE,gBAAgB,CAAC;KACzD;CACD,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.output.docs.descriptor.d.ts","sourceRoot":"","sources":["../../src/docs/cli.output.docs.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAiZtD,QAAA,MAAM,UAAU,EAAE,mBAyCjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|