@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,442 @@
|
|
|
1
|
+
const cli_outputMarkdown = `---
|
|
2
|
+
title: CLI Output
|
|
3
|
+
summary: Output formatting, UI toolkit integration, tables, and colors
|
|
4
|
+
tags: [cli, output, formatting, ui, tables, colors]
|
|
5
|
+
parent: cli
|
|
6
|
+
order: 3
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# CLI Output
|
|
10
|
+
|
|
11
|
+
The vibes CLI provides consistent output formatting through the \`VibesUIToolkit\`. Commands use the toolkit to render tables, JSON, YAML, and formatted text with proper colorization and structure.
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
Output formatting is handled by \`VibesUIToolkit\`, a unified interface for CLI output that supports multiple formats and interactive prompts.
|
|
16
|
+
|
|
17
|
+
\`\`\`ts
|
|
18
|
+
import { VibesUIToolkit } from '@vibesdotdev/cli/support/ui-toolkit';
|
|
19
|
+
|
|
20
|
+
const ui = VibesUIToolkit.createSync({ mode: 'plain' });
|
|
21
|
+
ui.info('Starting process...');
|
|
22
|
+
ui.table(data);
|
|
23
|
+
ui.success('Done!');
|
|
24
|
+
\`\`\`
|
|
25
|
+
|
|
26
|
+
## VibesUIToolkit API
|
|
27
|
+
|
|
28
|
+
### Creation
|
|
29
|
+
|
|
30
|
+
\`\`\`ts
|
|
31
|
+
// Synchronous creation (most common)
|
|
32
|
+
const ui = VibesUIToolkit.createSync({
|
|
33
|
+
mode: 'plain', // or 'rich' for TUI apps
|
|
34
|
+
compact: false, // reduce whitespace
|
|
35
|
+
autoExit: true // exit after command completes
|
|
36
|
+
});
|
|
37
|
+
\`\`\`
|
|
38
|
+
|
|
39
|
+
### Output methods
|
|
40
|
+
|
|
41
|
+
| Method | Description | Output |
|
|
42
|
+
|--------|-------------|--------|
|
|
43
|
+
| \`ui.info(message)\` | Informational message | stdout |
|
|
44
|
+
| \`ui.success(message)\` | Success message | stdout |
|
|
45
|
+
| \`ui.warn(message)\` | Warning message | stderr |
|
|
46
|
+
| \`ui.error(message)\` | Error message | stderr |
|
|
47
|
+
| \`ui.log(message)\` | Raw log output | stdout |
|
|
48
|
+
|
|
49
|
+
### Format-aware rendering
|
|
50
|
+
|
|
51
|
+
The toolkit supports multiple output formats:
|
|
52
|
+
|
|
53
|
+
\`\`\`ts
|
|
54
|
+
ui.setFormat('json'); // or 'yaml', 'table', 'markdown'
|
|
55
|
+
ui.render(data); // outputs in selected format
|
|
56
|
+
\`\`\`
|
|
57
|
+
|
|
58
|
+
**Format examples:**
|
|
59
|
+
|
|
60
|
+
\`\`\`ts
|
|
61
|
+
const data = [
|
|
62
|
+
{ id: 'tools.list', description: 'List tools' },
|
|
63
|
+
{ id: 'tools.info', description: 'Show tool info' }
|
|
64
|
+
];
|
|
65
|
+
|
|
66
|
+
// JSON output
|
|
67
|
+
ui.setFormat('json');
|
|
68
|
+
ui.render(data);
|
|
69
|
+
// [{ "id": "tools.list", "description": "List tools" }, ...]
|
|
70
|
+
|
|
71
|
+
// YAML output
|
|
72
|
+
ui.setFormat('yaml');
|
|
73
|
+
ui.render(data);
|
|
74
|
+
// - id: tools.list
|
|
75
|
+
// description: List tools
|
|
76
|
+
|
|
77
|
+
// Table output
|
|
78
|
+
ui.setFormat('table');
|
|
79
|
+
ui.render(data);
|
|
80
|
+
// ┌─────────────┬──────────────────┐
|
|
81
|
+
// │ id │ description │
|
|
82
|
+
// ├─────────────┼──────────────────┤
|
|
83
|
+
// │ tools.list │ List tools │
|
|
84
|
+
// │ tools.info │ Show tool info │
|
|
85
|
+
// └─────────────┴──────────────────┘
|
|
86
|
+
\`\`\`
|
|
87
|
+
|
|
88
|
+
## Table rendering
|
|
89
|
+
|
|
90
|
+
Tables are the primary output format for list commands:
|
|
91
|
+
|
|
92
|
+
\`\`\`ts
|
|
93
|
+
// Basic table
|
|
94
|
+
ui.table(data);
|
|
95
|
+
|
|
96
|
+
// With column selection
|
|
97
|
+
ui.table(data, { columns: ['id', 'name'] });
|
|
98
|
+
|
|
99
|
+
// With title
|
|
100
|
+
ui.table(data, { title: 'Registered Tools' });
|
|
101
|
+
|
|
102
|
+
// Column names only (shorthand)
|
|
103
|
+
ui.table(data, ['id', 'name', 'status']);
|
|
104
|
+
\`\`\`
|
|
105
|
+
|
|
106
|
+
### Table options
|
|
107
|
+
|
|
108
|
+
\`\`\`ts
|
|
109
|
+
interface TableOptions {
|
|
110
|
+
columns?: string[]; // subset of fields to display
|
|
111
|
+
title?: string; // table header
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// Usage
|
|
115
|
+
ui.table(rows, {
|
|
116
|
+
columns: ['id', 'description', 'enabled'],
|
|
117
|
+
title: 'Available Commands'
|
|
118
|
+
});
|
|
119
|
+
\`\`\`
|
|
120
|
+
|
|
121
|
+
### Example: Command list
|
|
122
|
+
|
|
123
|
+
\`\`\`ts
|
|
124
|
+
const commands = [
|
|
125
|
+
{ id: 'profile.list', group: 'profile', description: 'List profiles' },
|
|
126
|
+
{ id: 'profile.create', group: 'profile', description: 'Create profile' },
|
|
127
|
+
{ id: 'completion', group: 'shell-integration', description: 'Generate completions' }
|
|
128
|
+
];
|
|
129
|
+
|
|
130
|
+
ui.table(commands, {
|
|
131
|
+
columns: ['id', 'group', 'description'],
|
|
132
|
+
title: 'Registered Commands'
|
|
133
|
+
});
|
|
134
|
+
\`\`\`
|
|
135
|
+
|
|
136
|
+
**Output:**
|
|
137
|
+
|
|
138
|
+
\`\`\`
|
|
139
|
+
Registered Commands
|
|
140
|
+
┌─────────────────┬───────────────────┬────────────────────┐
|
|
141
|
+
│ id │ group │ description │
|
|
142
|
+
├─────────────────┼───────────────────┼────────────────────┤
|
|
143
|
+
│ profile.list │ profile │ List profiles │
|
|
144
|
+
│ profile.create │ profile │ Create profile │
|
|
145
|
+
│ completion │ shell-integration │ Generate completions│
|
|
146
|
+
└─────────────────┴───────────────────┴────────────────────┘
|
|
147
|
+
\`\`\`
|
|
148
|
+
|
|
149
|
+
## JSON/YAML output
|
|
150
|
+
|
|
151
|
+
Many commands support \`--json\` or \`--yaml\` flags for machine-readable output:
|
|
152
|
+
|
|
153
|
+
\`\`\`ts
|
|
154
|
+
// Command implementation pattern
|
|
155
|
+
async function listProfiles(options: { json?: boolean; yaml?: boolean }) {
|
|
156
|
+
const profiles = await getProfiles();
|
|
157
|
+
|
|
158
|
+
if (options.json) {
|
|
159
|
+
ui.setFormat('json');
|
|
160
|
+
ui.render(profiles);
|
|
161
|
+
} else if (options.yaml) {
|
|
162
|
+
ui.setFormat('yaml');
|
|
163
|
+
ui.render(profiles);
|
|
164
|
+
} else {
|
|
165
|
+
ui.table(profiles, { columns: ['name', 'active', 'created'] });
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
\`\`\`
|
|
169
|
+
|
|
170
|
+
**Usage:**
|
|
171
|
+
|
|
172
|
+
\`\`\`bash
|
|
173
|
+
# Default table output
|
|
174
|
+
$ vibes profile list
|
|
175
|
+
|
|
176
|
+
# JSON for scripting
|
|
177
|
+
$ vibes profile list --json | jq '.[] | select(.active == true)'
|
|
178
|
+
|
|
179
|
+
# YAML for config generation
|
|
180
|
+
$ vibes profile list --yaml > profiles.yaml
|
|
181
|
+
\`\`\`
|
|
182
|
+
|
|
183
|
+
## Interactive prompts
|
|
184
|
+
|
|
185
|
+
The toolkit provides interactive prompts for user input:
|
|
186
|
+
|
|
187
|
+
\`\`\`ts
|
|
188
|
+
// Text input
|
|
189
|
+
const name = await ui.prompt('Profile name:', { default: 'default' });
|
|
190
|
+
|
|
191
|
+
// Confirmation
|
|
192
|
+
const confirmed = await ui.confirm('Delete this profile?', { defaultValue: false });
|
|
193
|
+
|
|
194
|
+
// Single selection
|
|
195
|
+
const choice = await ui.select('Select profile:', [
|
|
196
|
+
{ label: 'Development', value: 'dev' },
|
|
197
|
+
{ label: 'Production', value: 'prod' }
|
|
198
|
+
]);
|
|
199
|
+
|
|
200
|
+
// Multiple selection
|
|
201
|
+
const profiles = await ui.multiselect('Select profiles to delete:', [
|
|
202
|
+
{ label: 'Old Dev', value: 'old-dev' },
|
|
203
|
+
{ label: 'Test', value: 'test' }
|
|
204
|
+
], { required: false });
|
|
205
|
+
\`\`\`
|
|
206
|
+
|
|
207
|
+
### Non-interactive fallback
|
|
208
|
+
|
|
209
|
+
Prompts gracefully degrade in non-TTY environments:
|
|
210
|
+
|
|
211
|
+
\`\`\`ts
|
|
212
|
+
// Returns default in CI/pipes
|
|
213
|
+
const name = await ui.prompt('Name:', { default: 'default' });
|
|
214
|
+
// → 'default' if not interactive
|
|
215
|
+
|
|
216
|
+
// Returns empty array in CI
|
|
217
|
+
const choices = await ui.multiselect('Choose:', options);
|
|
218
|
+
// → [] if not interactive and not required
|
|
219
|
+
\`\`\`
|
|
220
|
+
|
|
221
|
+
## Progress indicators
|
|
222
|
+
|
|
223
|
+
Simple progress tracking for long operations:
|
|
224
|
+
|
|
225
|
+
\`\`\`ts
|
|
226
|
+
const progress = ui.progress('Building...');
|
|
227
|
+
progress.update('Compiling modules...');
|
|
228
|
+
progress.complete('Build complete!');
|
|
229
|
+
|
|
230
|
+
// Or with failure
|
|
231
|
+
try {
|
|
232
|
+
await build();
|
|
233
|
+
progress.complete('Success!');
|
|
234
|
+
} catch (error) {
|
|
235
|
+
progress.fail('Build failed');
|
|
236
|
+
throw error;
|
|
237
|
+
}
|
|
238
|
+
\`\`\`
|
|
239
|
+
|
|
240
|
+
## Color and formatting
|
|
241
|
+
|
|
242
|
+
The toolkit respects environment variables and options:
|
|
243
|
+
|
|
244
|
+
\`\`\`bash
|
|
245
|
+
# Environment variable
|
|
246
|
+
VIBES_NO_COLOR=1 vibes profile list
|
|
247
|
+
|
|
248
|
+
# Command flag
|
|
249
|
+
vibes profile list --no-color
|
|
250
|
+
\`\`\`
|
|
251
|
+
|
|
252
|
+
### Color methods
|
|
253
|
+
|
|
254
|
+
\`\`\`ts
|
|
255
|
+
// Built-in colorization (when enabled)
|
|
256
|
+
ui.info('ℹ️ Information'); // blue
|
|
257
|
+
ui.success('✅ Success'); // green
|
|
258
|
+
ui.warn('⚠️ Warning'); // yellow
|
|
259
|
+
ui.error('❌ Error'); // red
|
|
260
|
+
\`\`\`
|
|
261
|
+
|
|
262
|
+
## Integration with commands
|
|
263
|
+
|
|
264
|
+
Commands receive a UI toolkit through the context:
|
|
265
|
+
|
|
266
|
+
\`\`\`ts
|
|
267
|
+
// packages/cli/src/commands/profile/profile.list.impl.ts
|
|
268
|
+
import { VibesUIToolkit } from '../../support/ui-toolkit';
|
|
269
|
+
|
|
270
|
+
export async function execute(
|
|
271
|
+
args: Record<string, unknown>,
|
|
272
|
+
opts: { json?: boolean; yaml?: boolean },
|
|
273
|
+
context: CommandContext
|
|
274
|
+
): Promise<void> {
|
|
275
|
+
const ui = VibesUIToolkit.createSync({ mode: 'plain' });
|
|
276
|
+
|
|
277
|
+
if (opts.json) ui.setFormat('json');
|
|
278
|
+
if (opts.yaml) ui.setFormat('yaml');
|
|
279
|
+
|
|
280
|
+
const profiles = await listProfiles();
|
|
281
|
+
|
|
282
|
+
if (opts.json || opts.yaml) {
|
|
283
|
+
ui.render(profiles);
|
|
284
|
+
} else {
|
|
285
|
+
ui.table(profiles, {
|
|
286
|
+
columns: ['name', 'active', 'created'],
|
|
287
|
+
title: 'Configuration Profiles'
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
\`\`\`
|
|
292
|
+
|
|
293
|
+
## Log buffer integration
|
|
294
|
+
|
|
295
|
+
Commands can buffer output during execution:
|
|
296
|
+
|
|
297
|
+
\`\`\`ts
|
|
298
|
+
// Descriptor with log buffer config
|
|
299
|
+
const command: CLICommandAssetDescriptor = {
|
|
300
|
+
kind: 'cli/command',
|
|
301
|
+
id: 'dev.build',
|
|
302
|
+
name: 'build',
|
|
303
|
+
description: 'Build the project',
|
|
304
|
+
group: 'dev',
|
|
305
|
+
logBuffer: {
|
|
306
|
+
enabled: true,
|
|
307
|
+
sinks: ['file', 'memory'],
|
|
308
|
+
fallbackToStdout: true
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
\`\`\`
|
|
312
|
+
|
|
313
|
+
Buffered output is held until command completion, then flushed:
|
|
314
|
+
|
|
315
|
+
\`\`\`bash
|
|
316
|
+
# Output appears all at once when command finishes
|
|
317
|
+
$ vibes dev build
|
|
318
|
+
[build output buffered...]
|
|
319
|
+
✅ Build complete!
|
|
320
|
+
\`\`\`
|
|
321
|
+
|
|
322
|
+
## WRONG patterns
|
|
323
|
+
|
|
324
|
+
### ❌ Direct console.log
|
|
325
|
+
|
|
326
|
+
\`\`\`ts
|
|
327
|
+
// BAD — bypasses formatting, breaks --json
|
|
328
|
+
console.log('Profile:', profile.name);
|
|
329
|
+
|
|
330
|
+
// GOOD — uses toolkit
|
|
331
|
+
ui.info(\`Profile: \${profile.name}\`);
|
|
332
|
+
\`\`\`
|
|
333
|
+
|
|
334
|
+
### ❌ Mixed output streams
|
|
335
|
+
|
|
336
|
+
\`\`\`ts
|
|
337
|
+
// BAD — data on stdout, errors mixed in
|
|
338
|
+
console.log(data);
|
|
339
|
+
console.error('Warning: deprecated');
|
|
340
|
+
|
|
341
|
+
// GOOD — separate concerns
|
|
342
|
+
ui.render(data); // data to stdout
|
|
343
|
+
ui.warn('Warning'); // warnings to stderr
|
|
344
|
+
\`\`\`
|
|
345
|
+
|
|
346
|
+
### ❌ Manual JSON formatting
|
|
347
|
+
|
|
348
|
+
\`\`\`ts
|
|
349
|
+
// BAD — inconsistent formatting
|
|
350
|
+
process.stdout.write(JSON.stringify(data));
|
|
351
|
+
|
|
352
|
+
// GOOD — toolkit handles formatting
|
|
353
|
+
ui.setFormat('json');
|
|
354
|
+
ui.render(data);
|
|
355
|
+
\`\`\`
|
|
356
|
+
|
|
357
|
+
### ❌ Ignoring format flags
|
|
358
|
+
|
|
359
|
+
\`\`\`ts
|
|
360
|
+
// BAD — always outputs table
|
|
361
|
+
ui.table(profiles);
|
|
362
|
+
|
|
363
|
+
// GOOD — respects --json/--yaml
|
|
364
|
+
if (opts.json) {
|
|
365
|
+
ui.setFormat('json');
|
|
366
|
+
ui.render(profiles);
|
|
367
|
+
} else {
|
|
368
|
+
ui.table(profiles);
|
|
369
|
+
}
|
|
370
|
+
\`\`\`
|
|
371
|
+
|
|
372
|
+
### ❌ Hardcoded colors
|
|
373
|
+
|
|
374
|
+
\`\`\`ts
|
|
375
|
+
// BAD — ignores VIBES_NO_COLOR
|
|
376
|
+
process.stdout.write('\\x1b[32mSuccess\\x1b[0m');
|
|
377
|
+
|
|
378
|
+
// GOOD — use toolkit methods
|
|
379
|
+
ui.success('Success');
|
|
380
|
+
\`\`\`
|
|
381
|
+
|
|
382
|
+
## Environment variables
|
|
383
|
+
|
|
384
|
+
| Variable | Description | Default |
|
|
385
|
+
|----------|-------------|---------|
|
|
386
|
+
| \`VIBES_NO_COLOR\` | Disable ANSI colors | \`false\` |
|
|
387
|
+
| \`VIBES_OUTPUT_FORMAT\` | Default output format | \`table\` |
|
|
388
|
+
| \`VIBES_INTERACTIVE\` | Force interactive mode | auto-detect |
|
|
389
|
+
| \`CI\` | CI mode (non-interactive) | auto-detect |
|
|
390
|
+
|
|
391
|
+
## Related
|
|
392
|
+
|
|
393
|
+
:::card{title="See also"}
|
|
394
|
+
- [\`cli.commands\`](cli.commands) — Command structure and execution
|
|
395
|
+
- [\`cli.groups\`](cli.groups) — Command group organization
|
|
396
|
+
- [\`tools.list\`](tools.list) — Example command using output formatting
|
|
397
|
+
:::
|
|
398
|
+
`;
|
|
399
|
+
const descriptor = {
|
|
400
|
+
kind: 'docs/topic',
|
|
401
|
+
id: 'cli.output',
|
|
402
|
+
title: 'CLI Output',
|
|
403
|
+
summary: 'Output formatting, UI toolkit integration, tables, and colors',
|
|
404
|
+
body: {
|
|
405
|
+
type: 'markdown',
|
|
406
|
+
sourceType: 'raw',
|
|
407
|
+
source: cli_outputMarkdown
|
|
408
|
+
},
|
|
409
|
+
parent: 'cli',
|
|
410
|
+
order: 3,
|
|
411
|
+
tags: ['cli', 'output', 'formatting', 'ui', 'tables', 'colors'],
|
|
412
|
+
surfaces: ['cli', 'web', 'in-app'],
|
|
413
|
+
hardware: ['consumer'],
|
|
414
|
+
enabled: true,
|
|
415
|
+
man: {
|
|
416
|
+
name: 'cli.output — CLI output formatting and UI toolkit',
|
|
417
|
+
section: 1,
|
|
418
|
+
synopsis: 'vibes man cli.output',
|
|
419
|
+
options: [
|
|
420
|
+
{ flag: '--json', description: 'Output as JSON' },
|
|
421
|
+
{ flag: '--yaml', description: 'Output as YAML' },
|
|
422
|
+
{ flag: '--no-color', description: 'Disable ANSI colors' }
|
|
423
|
+
],
|
|
424
|
+
examples: [
|
|
425
|
+
{
|
|
426
|
+
description: 'View output formatting documentation',
|
|
427
|
+
command: 'vibes man cli.output'
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
description: 'List commands with JSON output',
|
|
431
|
+
command: 'vibes tools list --json'
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
description: 'Profile list with YAML output',
|
|
435
|
+
command: 'vibes profile list --yaml'
|
|
436
|
+
}
|
|
437
|
+
],
|
|
438
|
+
seeAlso: ['cli.commands', 'cli.groups', 'tools.list']
|
|
439
|
+
}
|
|
440
|
+
};
|
|
441
|
+
export default descriptor;
|
|
442
|
+
//# sourceMappingURL=cli.output.docs.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.output.docs.descriptor.js","sourceRoot":"","sources":["../../src/docs/cli.output.docs.descriptor.ts"],"names":[],"mappings":"AAEA,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6Y1B,CAAC;AAEF,MAAM,UAAU,GAAwB;IACvC,IAAI,EAAE,YAAY;IAClB,EAAE,EAAE,YAAY;IAChB,KAAK,EAAE,YAAY;IACnB,OAAO,EAAE,+DAA+D;IACxE,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,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,CAAC;IAC/D,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,mDAAmD;QACzD,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,sBAAsB;QAChC,OAAO,EAAE;YACR,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,gBAAgB,EAAE;YACjD,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,gBAAgB,EAAE;YACjD,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,qBAAqB,EAAE;SAC1D;QACD,QAAQ,EAAE;YACT;gBACC,WAAW,EAAE,sCAAsC;gBACnD,OAAO,EAAE,sBAAsB;aAC/B;YACD;gBACC,WAAW,EAAE,gCAAgC;gBAC7C,OAAO,EAAE,yBAAyB;aAClC;YACD;gBACC,WAAW,EAAE,+BAA+B;gBAC5C,OAAO,EAAE,2BAA2B;aACpC;SACD;QACD,OAAO,EAAE,CAAC,cAAc,EAAE,YAAY,EAAE,YAAY,CAAC;KACrD;CACD,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type DocsTopicDescriptor = {
|
|
2
|
+
kind: 'docs/topic';
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
summary?: string;
|
|
6
|
+
body: {
|
|
7
|
+
type: 'markdown';
|
|
8
|
+
sourceType: 'raw';
|
|
9
|
+
source: string;
|
|
10
|
+
};
|
|
11
|
+
parent?: string;
|
|
12
|
+
order?: number;
|
|
13
|
+
enabled?: boolean;
|
|
14
|
+
man?: unknown;
|
|
15
|
+
tags?: string[];
|
|
16
|
+
surfaces?: string[];
|
|
17
|
+
hardware?: string[];
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/docs/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG;IACjC,IAAI,EAAE,YAAY,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE;QACL,IAAI,EAAE,UAAU,CAAC;QACjB,UAAU,EAAE,KAAK,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;KACf,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/docs/types.ts"],"names":[],"mappings":""}
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Errors
|
|
3
|
+
*
|
|
4
|
+
* Error types for CLI commands.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Base CLI error
|
|
8
|
+
*/
|
|
9
|
+
export declare class CLIError extends Error {
|
|
10
|
+
code: string;
|
|
11
|
+
exitCode: number;
|
|
12
|
+
constructor(message: string, code?: string, exitCode?: number);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Command not found error
|
|
16
|
+
*/
|
|
17
|
+
export declare class CommandNotFoundError extends CLIError {
|
|
18
|
+
constructor(command: string);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Invalid argument error
|
|
22
|
+
*/
|
|
23
|
+
export declare class InvalidArgumentError extends CLIError {
|
|
24
|
+
constructor(argument: string, reason?: string);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Missing required argument error
|
|
28
|
+
*/
|
|
29
|
+
export declare class MissingArgumentError extends CLIError {
|
|
30
|
+
constructor(argument: string);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Authentication required error
|
|
34
|
+
*/
|
|
35
|
+
export declare class AuthRequiredError extends CLIError {
|
|
36
|
+
constructor(message?: string);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Permission denied error
|
|
40
|
+
*/
|
|
41
|
+
export declare class PermissionDeniedError extends CLIError {
|
|
42
|
+
constructor(resource?: string);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Resource not found error
|
|
46
|
+
*/
|
|
47
|
+
export declare class NotFoundError extends CLIError {
|
|
48
|
+
constructor(resource: string);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Configuration error
|
|
52
|
+
*/
|
|
53
|
+
export declare class ConfigError extends CLIError {
|
|
54
|
+
constructor(message: string);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Network error
|
|
58
|
+
*/
|
|
59
|
+
export declare class NetworkError extends CLIError {
|
|
60
|
+
constructor(message: string);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Timeout error
|
|
64
|
+
*/
|
|
65
|
+
export declare class TimeoutError extends CLIError {
|
|
66
|
+
constructor(operation: string, timeout: number);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* User cancelled error
|
|
70
|
+
*/
|
|
71
|
+
export declare class UserCancelledError extends CLIError {
|
|
72
|
+
constructor();
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,qBAAa,QAAS,SAAQ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+
constructor(message, code = 'CLI_ERROR', exitCode = 1) {
|
|
13
|
+
super(message);
|
|
14
|
+
this.code = code;
|
|
15
|
+
this.exitCode = exitCode;
|
|
16
|
+
this.name = 'CLIError';
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Command not found error
|
|
21
|
+
*/
|
|
22
|
+
export class CommandNotFoundError extends CLIError {
|
|
23
|
+
constructor(command) {
|
|
24
|
+
super(`Command not found: ${command}`, 'COMMAND_NOT_FOUND', 127);
|
|
25
|
+
this.name = 'CommandNotFoundError';
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Invalid argument error
|
|
30
|
+
*/
|
|
31
|
+
export class InvalidArgumentError extends CLIError {
|
|
32
|
+
constructor(argument, reason) {
|
|
33
|
+
const msg = reason
|
|
34
|
+
? `Invalid argument '${argument}': ${reason}`
|
|
35
|
+
: `Invalid argument: ${argument}`;
|
|
36
|
+
super(msg, 'INVALID_ARGUMENT', 1);
|
|
37
|
+
this.name = 'InvalidArgumentError';
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Missing required argument error
|
|
42
|
+
*/
|
|
43
|
+
export class MissingArgumentError extends CLIError {
|
|
44
|
+
constructor(argument) {
|
|
45
|
+
super(`Missing required argument: ${argument}`, 'MISSING_ARGUMENT', 1);
|
|
46
|
+
this.name = 'MissingArgumentError';
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Authentication required error
|
|
51
|
+
*/
|
|
52
|
+
export class AuthRequiredError extends CLIError {
|
|
53
|
+
constructor(message = 'Authentication required. Run: vibes auth login') {
|
|
54
|
+
super(message, 'AUTH_REQUIRED', 1);
|
|
55
|
+
this.name = 'AuthRequiredError';
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Permission denied error
|
|
60
|
+
*/
|
|
61
|
+
export class PermissionDeniedError extends CLIError {
|
|
62
|
+
constructor(resource) {
|
|
63
|
+
const msg = resource ? `Permission denied: ${resource}` : 'Permission denied';
|
|
64
|
+
super(msg, 'PERMISSION_DENIED', 1);
|
|
65
|
+
this.name = 'PermissionDeniedError';
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Resource not found error
|
|
70
|
+
*/
|
|
71
|
+
export class NotFoundError extends CLIError {
|
|
72
|
+
constructor(resource) {
|
|
73
|
+
super(`Not found: ${resource}`, 'NOT_FOUND', 1);
|
|
74
|
+
this.name = 'NotFoundError';
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Configuration error
|
|
79
|
+
*/
|
|
80
|
+
export class ConfigError extends CLIError {
|
|
81
|
+
constructor(message) {
|
|
82
|
+
super(message, 'CONFIG_ERROR', 1);
|
|
83
|
+
this.name = 'ConfigError';
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Network error
|
|
88
|
+
*/
|
|
89
|
+
export class NetworkError extends CLIError {
|
|
90
|
+
constructor(message) {
|
|
91
|
+
super(message, 'NETWORK_ERROR', 1);
|
|
92
|
+
this.name = 'NetworkError';
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Timeout error
|
|
97
|
+
*/
|
|
98
|
+
export class TimeoutError extends CLIError {
|
|
99
|
+
constructor(operation, timeout) {
|
|
100
|
+
super(`Operation '${operation}' timed out after ${timeout}ms`, 'TIMEOUT', 1);
|
|
101
|
+
this.name = 'TimeoutError';
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* User cancelled error
|
|
106
|
+
*/
|
|
107
|
+
export class UserCancelledError extends CLIError {
|
|
108
|
+
constructor() {
|
|
109
|
+
super('Operation cancelled by user', 'USER_CANCELLED', 0);
|
|
110
|
+
this.name = 'UserCancelledError';
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
//# s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AC;IAC5B,CAAC;CACD;AAED;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,QAAQ;IAC/C;QACC,KAAK,CAAC,6BAA6B,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;QAC1D,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;IAClC,CAAC;CACD"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Module
|
|
3
|
+
*
|
|
4
|
+
* The CLI surface for the universal runtime.
|
|
5
|
+
* Integrates Commander.js with runtime-discovered commands.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import { createVibesCliApp } from '@vibesdotdev/cli/bootstrap';
|
|
10
|
+
*
|
|
11
|
+
* const app = await createVibesCliApp();
|
|
12
|
+
* await app.cli.run(process.argv);
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export { createVibesCliApp, type VibesCliAppOptions, type VibesCliApp, type CliPluginLoader } from './bootstrap';
|
|
16
|
+
export { CLISurface, type CLISurfaceOptions, type CommandContext } from './surface';
|
|
17
|
+
export { default as cliPlugin } from './cli.plugin';
|
|
18
|
+
export { registerCLIProviders, requestCLIExit, detectOutputFormat, shouldKeepAlive, resetKeepAlive, CLIExitSignal, type CLIProviderOptions, type UIContext, type LoggerContext, type AppContext, type CLIContext } from './providers';
|
|
19
|
+
export { PatternResolver, createPatternResolver, isPatternDescriptor, getPatternType, type PatternImplementation, type CLIPatternDescriptor, type CLICRUDGroupDescriptor, type CLIToolWrapperCommandDescriptor, type CLILogViewerGroupDescriptor, type CLIProcessManagerGroupDescriptor, type CLIConfigNamespaceGroupDescriptor } from './patterns';
|
|
20
|
+
export { CLIError, CommandNotFoundError, InvalidArgumentError, MissingArgumentError, AuthRequiredError, PermissionDeniedError, NotFoundError, ConfigError, NetworkError, TimeoutError, UserCancelledError } from './errors';
|
|
21
|
+
export { resolveCliEntry, resolveCliInvocation } from './bin';
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|