Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
351 changes: 267 additions & 84 deletions bun.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion mcp/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
import { z } from "zod";
import { readFileSync, readdirSync } from "fs";
import { join } from "path";
import { type Tool } from "src/lib/types/tool-editor";
import { type Tool } from "@/registry/commandly/lib/types/commandly";

const server = new McpServer({
name: "commandly",
Expand Down
21 changes: 12 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
"start": "bun run ./.output/server/index.mjs",
"build": "vite build",
"lint": "oxlint",
"format": "prettier --write .",
"test": "vitest run --config ./vitest.config.ts",
"test:watch": "vitest --config ./vitest.config.ts",
"test:ui": "vitest --ui",
"coverage": "vitest run --coverage",
"build:specification": "bun run ./specification/generate.ts",
"specification:build": "bun run ./scripts/generate-specification.ts",
"registry:build": "shadcn build",
"mcp": "bun run mcp/index.ts"
},
"dependencies": {
Expand All @@ -27,13 +29,13 @@
"@radix-ui/react-slot": "^1.2.3",
"@tailwindcss/postcss": "^4.1.11",
"@tailwindcss/vite": "^4.1.11",
"@tanstack/react-form": "^1.12.4",
"@tanstack/react-form": "^1.13.2",
"@tanstack/react-pacer": "^0.8.0",
"@tanstack/react-query": "^5.81.5",
"@tanstack/react-router": "^1.124.0",
"@tanstack/react-router-with-query": "^1.124.0",
"@tanstack/react-start": "^1.124.1",
"@tanstack/zod-adapter": "^1.124.0",
"@tanstack/react-router": "^1.125.3",
"@tanstack/react-router-with-query": "^1.125.3",
"@tanstack/react-start": "^1.125.3",
"@tanstack/zod-adapter": "^1.125.3",
"ai": "^4.3.16",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
Expand All @@ -50,12 +52,12 @@
"tailwindcss-animate": "^1.0.7",
"uuid": "^11.1.0",
"vite": "^6.3.5",
"zod": "^3.25.73"
"zod": "^3.25.74"
},
"devDependencies": {
"@tanstack/react-query-devtools": "^5.81.5",
"@tanstack/react-router-devtools": "^1.124.0",
"@tanstack/router-plugin": "^1.124.0",
"@tanstack/react-router-devtools": "^1.125.3",
"@tanstack/router-plugin": "^1.125.3",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^14.6.1",
Expand All @@ -67,6 +69,7 @@
"@vitest/coverage-v8": "3.2.4",
"jsdom": "^26.1.0",
"oxlint": "^1.5.0",
"shadcn": "^2.8.0-canary.1",
"typescript": "^5.8.3",
"vite-tsconfig-paths": "^5.1.4",
"vitest": "^3.2.4"
Expand Down
132 changes: 132 additions & 0 deletions public/r/all.json

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions public/r/commandly-types.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "commandly-types",
"type": "registry:lib",
"title": "Commandly Types",
"description": "TypeScript type definitions for the Commandly tool editor system including schemas for tools, commands, and parameters.",
"dependencies": ["zod"],
"files": [
{
"path": "registry/commandly/lib/types/commandly.ts",
"content": "import { z } from \"zod/v4\";\n\nexport const CommandSchema = z.object({\n id: z.uuidv7(),\n parentCommandId: z.uuidv7().optional(),\n name: z.string(),\n description: z.string(),\n isDefault: z.boolean(),\n sortOrder: z.number()\n});\nexport type Command = z.infer<typeof CommandSchema>;\n\nexport const ParameterEnumValueSchema = z.object({\n id: z.uuidv7(),\n parameterId: z.uuidv7(),\n value: z.string(),\n displayName: z.string(),\n description: z.string(),\n isDefault: z.boolean(),\n sortOrder: z.number()\n});\nexport type ParameterEnumValue = z.infer<typeof ParameterEnumValueSchema>;\n\nexport const ParameterValidationTypeSchema = z.enum([\n \"min_length\",\n \"max_length\",\n \"min_value\",\n \"max_value\",\n \"regex\"\n]);\nexport type ParameterValidationType = z.infer<\n typeof ParameterValidationTypeSchema\n>;\n\nexport const ParameterValidationSchema = z.object({\n id: z.string(),\n parameterId: z.string(),\n validationType: ParameterValidationTypeSchema,\n validationValue: z.string(),\n errorMessage: z.string()\n});\nexport type ParameterValidation = z.infer<typeof ParameterValidationSchema>;\nexport const ParameterDependencyTypeSchema = z.enum([\n \"requires\",\n \"conflicts_with\"\n]);\nexport type ParameterDependencyType = z.infer<\n typeof ParameterDependencyTypeSchema\n>;\nexport const ParameterDependencySchema = z.object({\n id: z.string(),\n parameterId: z.string(),\n dependsOnParameterId: z.string(),\n dependencyType: ParameterDependencyTypeSchema,\n conditionValue: z.string().optional()\n});\n\nexport type ParameterValue = string | number | boolean;\n\nexport type ParameterDependency = z.infer<typeof ParameterDependencySchema>;\n\nexport const ParameterMetadataSchema = z.object({\n tags: z.array(z.string()).optional()\n});\nexport type ParameterMetadata = z.infer<typeof ParameterMetadataSchema>;\nexport const ParameterTypeSchema = z.enum([\"Flag\", \"Option\", \"Argument\"]);\nexport type ParameterType = z.infer<typeof ParameterTypeSchema>;\n\nexport const ParameterDataTypeSchema = z.enum([\n \"String\",\n \"Number\",\n \"Boolean\",\n \"Enum\"\n]);\nexport type ParameterDataType = z.infer<typeof ParameterDataTypeSchema>;\n\nexport const ParameterSchema = z.object({\n id: z.string(),\n name: z.string(),\n commandId: z.uuidv7().optional(),\n description: z.string(),\n metadata: ParameterMetadataSchema.optional(),\n parameterType: ParameterTypeSchema,\n dataType: ParameterDataTypeSchema,\n isRequired: z.boolean(),\n isRepeatable: z.boolean(),\n isGlobal: z.boolean(),\n defaultValue: z.string().optional(),\n shortFlag: z.string().optional(),\n longFlag: z.string(),\n position: z.number().optional(),\n sortOrder: z.number().optional(),\n arraySeparator: z.string().optional(),\n keyValueSeparator: z.string().optional(),\n enumValues: z.array(ParameterEnumValueSchema),\n validations: z.array(ParameterValidationSchema).optional(),\n dependencies: z.array(ParameterDependencySchema).optional()\n});\nexport type Parameter = z.infer<typeof ParameterSchema>;\n\nexport const ExclusionTypeSchema = z.enum([\n \"mutual_exclusive\",\n \"required_one_of\"\n]);\nexport type ExclusionType = z.infer<typeof ExclusionTypeSchema>;\n\nexport const ExclusionGroupSchema = z.object({\n id: z.string().optional(),\n commandId: z.string().optional(),\n name: z.string(),\n exclusionType: ExclusionTypeSchema,\n parameterIds: z.array(z.string())\n});\nexport type ExclusionGroup = z.infer<typeof ExclusionGroupSchema>;\n\nexport const SavedCommandSchema = z.object({\n id: z.string(),\n command: z.string()\n});\nexport type SavedCommand = z.infer<typeof SavedCommandSchema>;\n\nexport const SupportedToolInputTypeSchema = z.enum([\n \"StandardInput\",\n \"Parameter\"\n]);\nexport type SupportedToolInputType = z.infer<\n typeof SupportedToolInputTypeSchema\n>;\n\nexport const SupportedToolOutputTypeSchema = z.enum([\n \"StandardOutput\",\n \"File\",\n \"Directory\"\n]);\nexport type SupportedToolOutputType = z.infer<\n typeof SupportedToolOutputTypeSchema\n>;\n\nexport const ToolSchema = z.object({\n id: z.string().optional(),\n name: z.string(),\n displayName: z.string(),\n description: z.string().optional(),\n version: z.string().optional(),\n category: z.string().optional(),\n tags: z.array(z.string()).optional(),\n url: z.url().optional(),\n commands: z.array(CommandSchema),\n parameters: z.array(ParameterSchema),\n exclusionGroups: z.array(ExclusionGroupSchema),\n supportedInput: z.array(SupportedToolInputTypeSchema),\n supportedOutput: z.array(SupportedToolOutputTypeSchema)\n});\nexport type Tool = z.infer<typeof ToolSchema>;\n\nexport const AIParseRequestSchema = z.object({\n helpText: z.string(),\n toolName: z.string().optional()\n});\nexport type AIParseRequest = z.infer<typeof AIParseRequestSchema>;\n\nexport const AIParseResponseSchema = z.object({\n success: z.boolean(),\n data: ToolSchema.optional(),\n error: z.string().optional()\n});\nexport type AIParseResponse = z.infer<typeof AIParseResponseSchema>;\n\nexport const newToolSchema = z.object({\n displayName: z.string(),\n name: z.string(),\n version: z.string().optional(),\n description: z.string().optional(),\n url: z.url().optional()\n});\nexport type ManualNewTool = z.infer<typeof newToolSchema>;\n",
"type": "registry:lib"
},
{
"path": "registry/commandly/lib/types/commandly-nested.ts",
"content": "import { ParameterValidation, ParameterDependencyType, ParameterType, ParameterDataType, ParameterMetadata, ExclusionType, SupportedToolInputType, SupportedToolOutputType } from \"../../types\";\n\nexport interface NestedCommand {\n name: string;\n description: string;\n isDefault: boolean;\n sortOrder: number;\n parameters: NestedParameter[];\n subcommands: NestedCommand[];\n}\n\nexport interface NestedParameterEnumValue {\n value: string;\n displayName: string;\n description: string;\n isDefault: boolean;\n sortOrder: number;\n}\n\nexport type NestedParameterValidation = Omit<\n ParameterValidation,\n \"id\" | \"parameterId\"\n>;\n\nexport interface NestedParameterDependency {\n dependsOnParameter: string;\n dependencyType: ParameterDependencyType;\n conditionValue?: string;\n}\n\nexport interface NestedParameter {\n name: string;\n description: string;\n parameterType: ParameterType;\n dataType: ParameterDataType;\n metadata?: ParameterMetadata;\n isRequired: boolean;\n isRepeatable: boolean;\n isGlobal: boolean;\n defaultValue?: string;\n shortFlag?: string;\n longFlag: string;\n position?: number;\n sortOrder?: number;\n arraySeparator?: string;\n keyValueSeparator?: string;\n enumValues: NestedParameterEnumValue[];\n validations: NestedParameterValidation[];\n dependencies: NestedParameterDependency[];\n}\n\nexport interface NestedExclusionGroup {\n name: string;\n exclusionType: ExclusionType;\n parameters: string[];\n}\n\nexport interface NestedTool {\n name: string;\n displayName: string;\n description?: string;\n version?: string;\n url?: string;\n globalParameters: NestedParameter[];\n commands: NestedCommand[];\n exclusionGroups: NestedExclusionGroup[];\n supportedInput: SupportedToolInputType[];\n supportedOutput: SupportedToolOutputType[];\n}\n",
"type": "registry:lib"
}
]
}
Loading