From 90b3266e4ed24bac2d9fce261cecead79a25d60b Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 3 Dec 2025 09:59:59 +0000 Subject: [PATCH] feat(doc): set simplified chinese as default language for documentation site --- apps/cliq-doc/astro.config.mjs | 22 ++--- .../src/content/docs/en/guides/development.md | 68 ++++++++++++++ .../guides/syntax-consistency.md | 4 +- apps/cliq-doc/src/content/docs/en/index.mdx | 24 +++++ apps/cliq-doc/src/content/docs/en/intro.md | 43 +++++++++ .../reference/cliqfile-syntax.md | 46 +++++----- .../src/content/docs/guides/development.md | 88 +++++++++---------- .../content/docs/guides/syntax-consistency.md | 4 +- apps/cliq-doc/src/content/docs/index.mdx | 22 ++--- apps/cliq-doc/src/content/docs/intro.md | 58 ++++++------ .../content/docs/reference/cliqfile-syntax.md | 46 +++++----- .../content/docs/zh-CN/guides/development.md | 68 -------------- .../cliq-doc/src/content/docs/zh-CN/index.mdx | 24 ----- apps/cliq-doc/src/content/docs/zh-CN/intro.md | 43 --------- 14 files changed, 280 insertions(+), 280 deletions(-) create mode 100644 apps/cliq-doc/src/content/docs/en/guides/development.md rename apps/cliq-doc/src/content/docs/{zh-CN => en}/guides/syntax-consistency.md (98%) create mode 100644 apps/cliq-doc/src/content/docs/en/index.mdx create mode 100644 apps/cliq-doc/src/content/docs/en/intro.md rename apps/cliq-doc/src/content/docs/{zh-CN => en}/reference/cliqfile-syntax.md (88%) delete mode 100644 apps/cliq-doc/src/content/docs/zh-CN/guides/development.md delete mode 100644 apps/cliq-doc/src/content/docs/zh-CN/index.mdx delete mode 100644 apps/cliq-doc/src/content/docs/zh-CN/intro.md diff --git a/apps/cliq-doc/astro.config.mjs b/apps/cliq-doc/astro.config.mjs index a587b7a..783e7ab 100644 --- a/apps/cliq-doc/astro.config.mjs +++ b/apps/cliq-doc/astro.config.mjs @@ -10,35 +10,35 @@ export default defineConfig({ defaultLocale: 'root', locales: { root: { - label: 'English', - lang: 'en', - }, - 'zh-CN': { label: '简体中文', lang: 'zh-CN', }, + en: { + label: 'English', + lang: 'en', + }, }, sidebar: [ { - label: 'Start Here', + label: '开始', translations: { - 'zh-CN': '开始' + 'en': 'Start Here' }, items: [ - { label: 'Introduction', slug: 'intro', translations: { 'zh-CN': '介绍' } }, + { label: '介绍', slug: 'intro', translations: { 'en': 'Introduction' } }, ], }, { - label: 'Guides', + label: '指南', translations: { - 'zh-CN': '指南' + 'en': 'Guides' }, autogenerate: { directory: 'guides' }, }, { - label: 'Reference', + label: '参考', translations: { - 'zh-CN': '参考' + 'en': 'Reference' }, autogenerate: { directory: 'reference' }, }, diff --git a/apps/cliq-doc/src/content/docs/en/guides/development.md b/apps/cliq-doc/src/content/docs/en/guides/development.md new file mode 100644 index 0000000..1edfdbe --- /dev/null +++ b/apps/cliq-doc/src/content/docs/en/guides/development.md @@ -0,0 +1,68 @@ +--- +title: Development Environment and Build Guide +description: Monorepo development environment setup and build guide +--- + +## Dependencies +- Node:`>=22` +- pnpm:`10` +- Go:`1.24` +- Nx:`19.8.3`(local) +- Wails CLI(for `cliq-app`):`go install github.com/wailsapp/wails/v2/cmd/wails@latest` + +## Workspace Structure +- Applications + - `apps/cliq-app`:Wails hybrid application(Go + Vue) + - `apps/cliq-hub-backend`:Pure Go backend service + - `apps/cliq-hub-frontend`:Pure Vue web frontend +- Packages + - `packages/shared-go-lib`:Go shared library(template definition/parsing/validation, YAML tools) + - `packages/shared-vue-ui`:Shared Vue components(currently includes `DynamicCommandForm`) +- Root files + - `pnpm-workspace.yaml`、`package.json`、`nx.json`、`go.work` + +## Initialization and Installation +- Install dependencies + - `pnpm install` +- Verify Nx availability + - `pnpm nx --version` + - `pnpm nx graph --file=project-graph.html` +- Install Wails CLI(for `cliq-app` development/build) + - `go install github.com/wailsapp/wails/v2/cmd/wails@latest` +- Go workspace(`go.work` already configured with local module binding) + - View bindings:`go work edit -print` + +## Starting Development Servers +- Wails application(`cliq-app`) + - `pnpm nx run cliq-app:serve` + - Note:calls `wails dev`,frontend behavior driven by `apps/cliq-app/wails.json` +- Pure Go backend(`cliq-hub-backend`) + - `pnpm nx run cliq-hub-backend:serve` + - Equivalent:`go run ./apps/cliq-hub-backend/cmd/server` +- Pure web frontend(`cliq-hub-frontend`) + - `pnpm nx run cliq-hub-frontend:serve` + +## Project Building +- Wails application(frontend + desktop build) + - `pnpm nx run cliq-app:build` + - Note:first execute `frontend-build`(Vite build),then execute `wails build` +- Pure Go backend + - `pnpm nx run cliq-hub-backend:build` + - Equivalent:`go build ./apps/cliq-hub-backend/cmd/server` +- Pure web frontend + - `pnpm nx run cliq-frontend:build` + +## Testing and Validation +- Go shared library tests + - `pnpm nx run shared-go-lib:test` + - Equivalent:`go test ./packages/shared-go-lib/...` + +## Common Issues +- `nx: command not found` + - Run `pnpm install` to install workspace dependencies;verify with `pnpm nx --version`。 +- `@nx-go/nx-go` version resolution failure + - Use verified version:`3.3.1`(root `package.json` already configured)。 +- Wails build failure + - Confirm Wails CLI and system dependencies are installed locally;run `wails doctor` locally for troubleshooting。 +- Shared UI import failure + - Alias for `@repo/shared-vue-ui` already configured in `apps/cliq-app/frontend/vite.config.ts`;ensure `packages/shared-vue-ui/src` exists and exports components。 \ No newline at end of file diff --git a/apps/cliq-doc/src/content/docs/zh-CN/guides/syntax-consistency.md b/apps/cliq-doc/src/content/docs/en/guides/syntax-consistency.md similarity index 98% rename from apps/cliq-doc/src/content/docs/zh-CN/guides/syntax-consistency.md rename to apps/cliq-doc/src/content/docs/en/guides/syntax-consistency.md index 2564e29..5c3c03e 100644 --- a/apps/cliq-doc/src/content/docs/zh-CN/guides/syntax-consistency.md +++ b/apps/cliq-doc/src/content/docs/en/guides/syntax-consistency.md @@ -1,5 +1,5 @@ --- -title: 语法一致性 (English) +title: Syntax Consistency description: CLIQfile Syntax Consistency Guide --- @@ -99,4 +99,4 @@ When adding or modifying CLIQfile syntax: 2. Add to validation logic in backend 3. Update frontend type handling 4. Update all documentation files -5. Test end-to-end +5. Test end-to-end \ No newline at end of file diff --git a/apps/cliq-doc/src/content/docs/en/index.mdx b/apps/cliq-doc/src/content/docs/en/index.mdx new file mode 100644 index 0000000..e975861 --- /dev/null +++ b/apps/cliq-doc/src/content/docs/en/index.mdx @@ -0,0 +1,24 @@ +--- +title: Welcome to cliQ Docs +description: Documentation for cliQ +template: splash +hero: + tagline: Command Line Interface Quick-GUI + actions: + - text: Get Started + link: /intro + icon: right-arrow +--- + +import { Card, CardGrid } from '@astrojs/starlight/components'; + +## Next steps + + + + Check the [cliqfile syntax](/reference/cliqfile-syntax) to create your own templates. + + + Check the [Development Environment and Build Guide](/guides/development) + + \ No newline at end of file diff --git a/apps/cliq-doc/src/content/docs/en/intro.md b/apps/cliq-doc/src/content/docs/en/intro.md new file mode 100644 index 0000000..88c879e --- /dev/null +++ b/apps/cliq-doc/src/content/docs/en/intro.md @@ -0,0 +1,43 @@ +--- +title: Introduction +description: What is cliQ? +--- + +**cliQ** pronunciation: /klɪk/, like "click" +cliQ is a lightweight tool that transforms complex CLI commands into an intuitive and user-friendly graphical user interface (GUI). + +By defining a command template with placeholder variables, cliQ automatically generates a corresponding GUI. Users can input parameters via clicks and selections—no need to memorize command syntax—greatly improving usability and efficiency. + +## Key Features +- **Command Template Definition**: Input a CLI command to generate a dynamic form interface. +- **Import/Export Templates**: Share templates (`.cliqfile.yaml`) with others or import from teammates. +- **Multiple Input Components**: Supports file pickers, number inputs, dropdowns, checkboxes, and more—adapting to various parameter types. +- **Cross-Platform**: Works on Windows, macOS, and Linux. +- **Template Marketplace**: Upload or download templates for common tools (e.g., ImageMagick, ffmpeg, pngquant) to build a shared ecosystem. + +## How to Use + +Download the appropriate package from the Releases page and double-click to run. + +**Windows**: +Run the `.exe` file directly. Compatible with Windows 10 and later. +cliQ depends on Webview. If not installed, a prompt will appear on first launch—follow the instructions to install it. + +**macOS**: +Compatible with macOS 10.13 and later. +Since the app is not signed, you may see a "damaged" warning. To resolve: +1. Open Terminal and run: +```bash +sudo xattr -dr com.apple.quarantine /Users/colin/Downloads/cliq.app +# Note: Update the path as needed. You can drag the app into Terminal to auto-fill the path. +``` +2. Launch cliQ. If it opens successfully, the app is now trusted. +3. (Optional) Move cliQ to your Applications folder for easier access. + +**Linux**: +cliQ supports Linux, but the current release hasn't been fully tested. Feedback via GitHub Issues is welcome. + +## Tech Stack +- Built with Wails for cross-platform support +- Frontend: Vue 3 + TypeScript +- UI Components: PrimeVue V4, Vite for build, partial styling with TailwindCSS \ No newline at end of file diff --git a/apps/cliq-doc/src/content/docs/zh-CN/reference/cliqfile-syntax.md b/apps/cliq-doc/src/content/docs/en/reference/cliqfile-syntax.md similarity index 88% rename from apps/cliq-doc/src/content/docs/zh-CN/reference/cliqfile-syntax.md rename to apps/cliq-doc/src/content/docs/en/reference/cliqfile-syntax.md index 3ee5b0b..24a269b 100644 --- a/apps/cliq-doc/src/content/docs/zh-CN/reference/cliqfile-syntax.md +++ b/apps/cliq-doc/src/content/docs/en/reference/cliqfile-syntax.md @@ -1,6 +1,6 @@ --- -title: cliqfile 语法 (English) -description: cliqfile.yaml 语法详解 +title: cliqfile YAML Syntax +description: Detailed documentation for cliqfile.yaml syntax --- ## Overview @@ -38,12 +38,12 @@ cmds: # List of command definitions ### `name` (required) - **Type:** String - **Description:** A human-readable name for the template that appears in the UI -- **Example:** `FFmpeg 视频处理工具` +- **Example:** `FFmpeg Video Processing Tool` ### `description` (required) - **Type:** String - **Description:** A brief explanation of what the template does -- **Example:** `使用 FFmpeg 进行视频格式转换、提取音频、压缩和调整分辨率等操作` +- **Example:** `Perform video format conversion, audio extraction, compression, and resolution adjustment using FFmpeg` ### `version` (required) - **Type:** String @@ -73,12 +73,12 @@ The `cmds` field is a list of command definitions. Each template can define mult #### `name` (required) - **Type:** String - **Description:** Name of the command that appears in the UI -- **Example:** `格式转换` +- **Example:** `Format Conversion` #### `description` (required) - **Type:** String - **Description:** Brief explanation of what this specific command does -- **Example:** `将视频文件转换为其他格式` +- **Example:** `Convert video files to other formats` #### `command` (required) - **Type:** String @@ -111,12 +111,12 @@ Each variable in the `variables` list has the following fields: ### `label` (required) - **Type:** String - **Description:** The display label shown in the UI for this variable -- **Example:** `输入文件` +- **Example:** `Input File` ### `description` (required) - **Type:** String - **Description:** A longer description explaining the purpose of this variable -- **Example:** `选择要转换的视频文件` +- **Example:** `Select the video file to convert` ### `required` (required) - **Type:** Boolean @@ -184,8 +184,8 @@ Default values can reference other variables using the `{{variable_name}}` synta ```yaml - name: output_file type: file_output - label: 输出文件 - description: 选择转换后保存的位置和格式 + label: Output File + description: Select the location and format to save after conversion required: true options: file_types: [".mp4", ".mkv", ".avi", ".mov", ".webm"] @@ -198,13 +198,13 @@ A single template can define multiple related commands: ```yaml cmds: - - name: 格式转换 - description: 将视频文件转换为其他格式 + - name: Format Conversion + description: Convert video files to other formats command: "ffmpeg -i {{input_file}} -codec copy {{output_file}}" variables: # ... variable definitions - - name: 提取音频 - description: 从视频文件中提取音频轨道 + - name: Audio Extraction + description: Extract audio tracks from video files command: "ffmpeg -i {{input_file}} -vn {{output_file}}" variables: # ... variable definitions @@ -240,31 +240,31 @@ Here's a complete example showing various variable types: ```yaml # Template metadata -name: PNGQuant 压缩工具 -description: 使用 pngquant 高效压缩 PNG 图片 +name: PNGQuant Compression Tool +description: Efficiently compress PNG images using pngquant version: "1.0" author: user123 cliq_template_version: "1.0" cmds: - - name: 压缩 - description: 压缩 PNG 文件 + - name: Compress + description: Compress PNG file command: "pngquant {{input_file}} --output {{output_file}}" variables: - name: input_file type: file_input - label: 输入文件 - description: 选择要压缩的 PNG 文件 + label: Input File + description: Select the PNG file to compress required: true options: file_types: [".png"] - name: output_file type: file_output - label: 输出文件 - description: 选择压缩后保存的位置 + label: Output File + description: Select the location to save after compression required: true options: file_types: [".png"] default: "{{input_file}}_compressed.png" -``` +``` \ No newline at end of file diff --git a/apps/cliq-doc/src/content/docs/guides/development.md b/apps/cliq-doc/src/content/docs/guides/development.md index 1edfdbe..6eec7a5 100644 --- a/apps/cliq-doc/src/content/docs/guides/development.md +++ b/apps/cliq-doc/src/content/docs/guides/development.md @@ -1,68 +1,68 @@ --- -title: Development Environment and Build Guide -description: Monorepo development environment setup and build guide +title: 开发环境与构建指南 +description: Monorepo 开发环境搭建与构建指南 --- -## Dependencies +## 依赖环境 - Node:`>=22` - pnpm:`10` - Go:`1.24` -- Nx:`19.8.3`(local) -- Wails CLI(for `cliq-app`):`go install github.com/wailsapp/wails/v2/cmd/wails@latest` +- Nx:`19.8.3`(本地) +- Wails CLI(用于 `cliq-app`):`go install github.com/wailsapp/wails/v2/cmd/wails@latest` -## Workspace Structure -- Applications - - `apps/cliq-app`:Wails hybrid application(Go + Vue) - - `apps/cliq-hub-backend`:Pure Go backend service - - `apps/cliq-hub-frontend`:Pure Vue web frontend -- Packages - - `packages/shared-go-lib`:Go shared library(template definition/parsing/validation, YAML tools) - - `packages/shared-vue-ui`:Shared Vue components(currently includes `DynamicCommandForm`) -- Root files +## 工作区结构 +- 应用 + - `apps/cliq-app`:Wails 混合应用(Go + Vue) + - `apps/cliq-hub-backend`:纯 Go 后端服务 + - `apps/cliq-frontend`:纯 Vue Web 前端 +- 包 + - `packages/shared-go-lib`:Go 共享库(模板定义/解析/校验、YAML 工具) + - `packages/shared-vue-ui`:共享 Vue 组件(目前包含 `DynamicCommandForm`) +- 根文件 - `pnpm-workspace.yaml`、`package.json`、`nx.json`、`go.work` -## Initialization and Installation -- Install dependencies +## 初始化与安装 +- 安装依赖 - `pnpm install` -- Verify Nx availability +- 验证 Nx 可用 - `pnpm nx --version` - `pnpm nx graph --file=project-graph.html` -- Install Wails CLI(for `cliq-app` development/build) +- 安装 Wails CLI(用于 `cliq-app` 开发/构建) - `go install github.com/wailsapp/wails/v2/cmd/wails@latest` -- Go workspace(`go.work` already configured with local module binding) - - View bindings:`go work edit -print` +- Go 工作区(`go.work` 已配置本地模块绑定) + - 查看绑定:`go work edit -print` -## Starting Development Servers -- Wails application(`cliq-app`) +## 启动开发服务器 +- Wails 应用(`cliq-app`) - `pnpm nx run cliq-app:serve` - - Note:calls `wails dev`,frontend behavior driven by `apps/cliq-app/wails.json` -- Pure Go backend(`cliq-hub-backend`) + - 说明:调用 `wails dev`,前端行为由 `apps/cliq-app/wails.json` 驱动 +- 纯 Go 后端(`cliq-hub-backend`) - `pnpm nx run cliq-hub-backend:serve` - - Equivalent:`go run ./apps/cliq-hub-backend/cmd/server` -- Pure web frontend(`cliq-hub-frontend`) - - `pnpm nx run cliq-hub-frontend:serve` + - 等价:`go run ./apps/cliq-hub-backend/cmd/server` +- 纯 Web 前端(`cliq-frontend`) + - `pnpm nx run cliq-frontend:serve` -## Project Building -- Wails application(frontend + desktop build) +## 项目构建 +- Wails 应用(前端 + 桌面构建) - `pnpm nx run cliq-app:build` - - Note:first execute `frontend-build`(Vite build),then execute `wails build` -- Pure Go backend + - 说明:先执行 `frontend-build`(Vite 构建),再执行 `wails build` +- 纯 Go 后端 - `pnpm nx run cliq-hub-backend:build` - - Equivalent:`go build ./apps/cliq-hub-backend/cmd/server` -- Pure web frontend + - 等价:`go build ./apps/cliq-hub-backend/cmd/server` +- 纯 Web 前端 - `pnpm nx run cliq-frontend:build` -## Testing and Validation -- Go shared library tests +## 测试与校验 +- Go 共享库测试 - `pnpm nx run shared-go-lib:test` - - Equivalent:`go test ./packages/shared-go-lib/...` + - 等价:`go test ./packages/shared-go-lib/...` -## Common Issues +## 常见问题 - `nx: command not found` - - Run `pnpm install` to install workspace dependencies;verify with `pnpm nx --version`。 -- `@nx-go/nx-go` version resolution failure - - Use verified version:`3.3.1`(root `package.json` already configured)。 -- Wails build failure - - Confirm Wails CLI and system dependencies are installed locally;run `wails doctor` locally for troubleshooting。 -- Shared UI import failure - - Alias for `@repo/shared-vue-ui` already configured in `apps/cliq-app/frontend/vite.config.ts`;ensure `packages/shared-vue-ui/src` exists and exports components。 \ No newline at end of file + - 运行 `pnpm install` 安装工作区依赖;通过 `pnpm nx --version` 验证。 +- `@nx-go/nx-go` 版本解析失败 + - 使用已验证版本:`3.3.1`(根 `package.json` 已配置)。 +- Wails 构建失败 + - 确认本机已安装 Wails CLI 与系统依赖;可先在本地运行 `wails doctor` 排查。 +- 共享 UI 导入失败 + - 已在 `apps/cliq-app/frontend/vite.config.ts` 配置 `@repo/shared-vue-ui` 的别名;确保 `packages/shared-vue-ui/src` 存在并导出组件。 diff --git a/apps/cliq-doc/src/content/docs/guides/syntax-consistency.md b/apps/cliq-doc/src/content/docs/guides/syntax-consistency.md index 5c3c03e..2564e29 100644 --- a/apps/cliq-doc/src/content/docs/guides/syntax-consistency.md +++ b/apps/cliq-doc/src/content/docs/guides/syntax-consistency.md @@ -1,5 +1,5 @@ --- -title: Syntax Consistency +title: 语法一致性 (English) description: CLIQfile Syntax Consistency Guide --- @@ -99,4 +99,4 @@ When adding or modifying CLIQfile syntax: 2. Add to validation logic in backend 3. Update frontend type handling 4. Update all documentation files -5. Test end-to-end \ No newline at end of file +5. Test end-to-end diff --git a/apps/cliq-doc/src/content/docs/index.mdx b/apps/cliq-doc/src/content/docs/index.mdx index e975861..2ec562e 100644 --- a/apps/cliq-doc/src/content/docs/index.mdx +++ b/apps/cliq-doc/src/content/docs/index.mdx @@ -1,24 +1,24 @@ --- -title: Welcome to cliQ Docs -description: Documentation for cliQ +title: 欢迎使用 cliQ 文档 +description: cliQ 文档 template: splash hero: - tagline: Command Line Interface Quick-GUI + tagline: 命令行界面快速 GUI 工具 actions: - - text: Get Started - link: /intro + - text: 开始使用 + link: /zh-CN/intro icon: right-arrow --- import { Card, CardGrid } from '@astrojs/starlight/components'; -## Next steps +## 下一步 - - Check the [cliqfile syntax](/reference/cliqfile-syntax) to create your own templates. + + 查看 [cliqfile 语法](/zh-CN/reference/cliqfile-syntax) 以创建您自己的模板。 - - Check the [Development Environment and Build Guide](/guides/development) + + 查看 [开发环境与构建指南](/zh-CN/guides/development) - \ No newline at end of file + diff --git a/apps/cliq-doc/src/content/docs/intro.md b/apps/cliq-doc/src/content/docs/intro.md index 88c879e..ad9f1b4 100644 --- a/apps/cliq-doc/src/content/docs/intro.md +++ b/apps/cliq-doc/src/content/docs/intro.md @@ -1,43 +1,43 @@ --- -title: Introduction -description: What is cliQ? +title: 介绍 +description: cliQ 介绍 --- -**cliQ** pronunciation: /klɪk/, like "click" -cliQ is a lightweight tool that transforms complex CLI commands into an intuitive and user-friendly graphical user interface (GUI). +**cliQ** 发音:/klɪk/,类似“click” +cliQ 是一个轻量级工具,旨在将复杂的 CLI 命令转化为直观、易用的图形用户界面(GUI)。 -By defining a command template with placeholder variables, cliQ automatically generates a corresponding GUI. Users can input parameters via clicks and selections—no need to memorize command syntax—greatly improving usability and efficiency. +用户只需定义一条带有变量占位符的命令模板,即可自动生成对应的 GUI 界面,通过点击、选择等方式完成参数输入,无需记忆命令语法,极大提升使用体验和操作效率。 -## Key Features -- **Command Template Definition**: Input a CLI command to generate a dynamic form interface. -- **Import/Export Templates**: Share templates (`.cliqfile.yaml`) with others or import from teammates. -- **Multiple Input Components**: Supports file pickers, number inputs, dropdowns, checkboxes, and more—adapting to various parameter types. -- **Cross-Platform**: Works on Windows, macOS, and Linux. -- **Template Marketplace**: Upload or download templates for common tools (e.g., ImageMagick, ffmpeg, pngquant) to build a shared ecosystem. +## 主要功能 +- 命令模板定义:用户可输入 CLI 命令,生成对应的动态表单界面。 +- 模板导入/导出:支持将模板(`.cliqfile.yaml`)导出为文件,或从他人导入,便于团队共享。 +- 多种输入组件支持:支持文件选择器、数字输入框、下拉选择框、复选框等,适配不同参数类型。 +- 跨平台支持:支持 Windows、macOS 和 Linux 平台 +- 模板市场:用户可上传/下载常用工具模板(如 ImageMagick、ffmpeg、pngquant 等),构建共享生态。 -## How to Use +## 如何使用 -Download the appropriate package from the Releases page and double-click to run. +从Release界面下载对应平台的安装包,双击运行即可. -**Windows**: -Run the `.exe` file directly. Compatible with Windows 10 and later. -cliQ depends on Webview. If not installed, a prompt will appear on first launch—follow the instructions to install it. +**Windows 平台**: +exe文件直接打开运行即可. Windows 10及以上版本均支持. +程序依赖Webview, 如果本机没有安装, 第一次打开时会弹出提示,按照指引安装即可. -**macOS**: -Compatible with macOS 10.13 and later. -Since the app is not signed, you may see a "damaged" warning. To resolve: -1. Open Terminal and run: +**macOS 平台**: +macOS 10.13及以上版本均支持. +由于产物没有签名, 直接打开会弹出提示“文件已损坏”, 请按照以下步骤解决: +1. 打开终端, 手动认证cliQ应用: ```bash sudo xattr -dr com.apple.quarantine /Users/colin/Downloads/cliq.app -# Note: Update the path as needed. You can drag the app into Terminal to auto-fill the path. +# 注: 最后面的路径请根据实际情况修改. 你也可以直接将文件拖入到终端, 会自动补齐路径. ``` -2. Launch cliQ. If it opens successfully, the app is now trusted. -3. (Optional) Move cliQ to your Applications folder for easier access. +2. 打开cliQ应用, 如果能正常打开, 则说明认证成功. +3. (可选)将cliQ应用拖动到“应用程序”文件夹, 方便后续使用. -**Linux**: -cliQ supports Linux, but the current release hasn't been fully tested. Feedback via GitHub Issues is welcome. +**Linux平台**: +cliQ应用本身支持Linux平台运行. 当前产物尚未在Linux平台充分测试, 欢迎通过issue反馈. -## Tech Stack -- Built with Wails for cross-platform support -- Frontend: Vue 3 + TypeScript -- UI Components: PrimeVue V4, Vite for build, partial styling with TailwindCSS \ No newline at end of file +## 技术栈 +- 使用wails框架构建, 跨平台支持 +- 页面使用Vue3, 使用TypeScript +- 使用PrimeVue V4组件库、Vite构建前端项目, 部分样式使用TailwindCSS diff --git a/apps/cliq-doc/src/content/docs/reference/cliqfile-syntax.md b/apps/cliq-doc/src/content/docs/reference/cliqfile-syntax.md index 24a269b..3ee5b0b 100644 --- a/apps/cliq-doc/src/content/docs/reference/cliqfile-syntax.md +++ b/apps/cliq-doc/src/content/docs/reference/cliqfile-syntax.md @@ -1,6 +1,6 @@ --- -title: cliqfile YAML Syntax -description: Detailed documentation for cliqfile.yaml syntax +title: cliqfile 语法 (English) +description: cliqfile.yaml 语法详解 --- ## Overview @@ -38,12 +38,12 @@ cmds: # List of command definitions ### `name` (required) - **Type:** String - **Description:** A human-readable name for the template that appears in the UI -- **Example:** `FFmpeg Video Processing Tool` +- **Example:** `FFmpeg 视频处理工具` ### `description` (required) - **Type:** String - **Description:** A brief explanation of what the template does -- **Example:** `Perform video format conversion, audio extraction, compression, and resolution adjustment using FFmpeg` +- **Example:** `使用 FFmpeg 进行视频格式转换、提取音频、压缩和调整分辨率等操作` ### `version` (required) - **Type:** String @@ -73,12 +73,12 @@ The `cmds` field is a list of command definitions. Each template can define mult #### `name` (required) - **Type:** String - **Description:** Name of the command that appears in the UI -- **Example:** `Format Conversion` +- **Example:** `格式转换` #### `description` (required) - **Type:** String - **Description:** Brief explanation of what this specific command does -- **Example:** `Convert video files to other formats` +- **Example:** `将视频文件转换为其他格式` #### `command` (required) - **Type:** String @@ -111,12 +111,12 @@ Each variable in the `variables` list has the following fields: ### `label` (required) - **Type:** String - **Description:** The display label shown in the UI for this variable -- **Example:** `Input File` +- **Example:** `输入文件` ### `description` (required) - **Type:** String - **Description:** A longer description explaining the purpose of this variable -- **Example:** `Select the video file to convert` +- **Example:** `选择要转换的视频文件` ### `required` (required) - **Type:** Boolean @@ -184,8 +184,8 @@ Default values can reference other variables using the `{{variable_name}}` synta ```yaml - name: output_file type: file_output - label: Output File - description: Select the location and format to save after conversion + label: 输出文件 + description: 选择转换后保存的位置和格式 required: true options: file_types: [".mp4", ".mkv", ".avi", ".mov", ".webm"] @@ -198,13 +198,13 @@ A single template can define multiple related commands: ```yaml cmds: - - name: Format Conversion - description: Convert video files to other formats + - name: 格式转换 + description: 将视频文件转换为其他格式 command: "ffmpeg -i {{input_file}} -codec copy {{output_file}}" variables: # ... variable definitions - - name: Audio Extraction - description: Extract audio tracks from video files + - name: 提取音频 + description: 从视频文件中提取音频轨道 command: "ffmpeg -i {{input_file}} -vn {{output_file}}" variables: # ... variable definitions @@ -240,31 +240,31 @@ Here's a complete example showing various variable types: ```yaml # Template metadata -name: PNGQuant Compression Tool -description: Efficiently compress PNG images using pngquant +name: PNGQuant 压缩工具 +description: 使用 pngquant 高效压缩 PNG 图片 version: "1.0" author: user123 cliq_template_version: "1.0" cmds: - - name: Compress - description: Compress PNG file + - name: 压缩 + description: 压缩 PNG 文件 command: "pngquant {{input_file}} --output {{output_file}}" variables: - name: input_file type: file_input - label: Input File - description: Select the PNG file to compress + label: 输入文件 + description: 选择要压缩的 PNG 文件 required: true options: file_types: [".png"] - name: output_file type: file_output - label: Output File - description: Select the location to save after compression + label: 输出文件 + description: 选择压缩后保存的位置 required: true options: file_types: [".png"] default: "{{input_file}}_compressed.png" -``` \ No newline at end of file +``` diff --git a/apps/cliq-doc/src/content/docs/zh-CN/guides/development.md b/apps/cliq-doc/src/content/docs/zh-CN/guides/development.md deleted file mode 100644 index 6eec7a5..0000000 --- a/apps/cliq-doc/src/content/docs/zh-CN/guides/development.md +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: 开发环境与构建指南 -description: Monorepo 开发环境搭建与构建指南 ---- - -## 依赖环境 -- Node:`>=22` -- pnpm:`10` -- Go:`1.24` -- Nx:`19.8.3`(本地) -- Wails CLI(用于 `cliq-app`):`go install github.com/wailsapp/wails/v2/cmd/wails@latest` - -## 工作区结构 -- 应用 - - `apps/cliq-app`:Wails 混合应用(Go + Vue) - - `apps/cliq-hub-backend`:纯 Go 后端服务 - - `apps/cliq-frontend`:纯 Vue Web 前端 -- 包 - - `packages/shared-go-lib`:Go 共享库(模板定义/解析/校验、YAML 工具) - - `packages/shared-vue-ui`:共享 Vue 组件(目前包含 `DynamicCommandForm`) -- 根文件 - - `pnpm-workspace.yaml`、`package.json`、`nx.json`、`go.work` - -## 初始化与安装 -- 安装依赖 - - `pnpm install` -- 验证 Nx 可用 - - `pnpm nx --version` - - `pnpm nx graph --file=project-graph.html` -- 安装 Wails CLI(用于 `cliq-app` 开发/构建) - - `go install github.com/wailsapp/wails/v2/cmd/wails@latest` -- Go 工作区(`go.work` 已配置本地模块绑定) - - 查看绑定:`go work edit -print` - -## 启动开发服务器 -- Wails 应用(`cliq-app`) - - `pnpm nx run cliq-app:serve` - - 说明:调用 `wails dev`,前端行为由 `apps/cliq-app/wails.json` 驱动 -- 纯 Go 后端(`cliq-hub-backend`) - - `pnpm nx run cliq-hub-backend:serve` - - 等价:`go run ./apps/cliq-hub-backend/cmd/server` -- 纯 Web 前端(`cliq-frontend`) - - `pnpm nx run cliq-frontend:serve` - -## 项目构建 -- Wails 应用(前端 + 桌面构建) - - `pnpm nx run cliq-app:build` - - 说明:先执行 `frontend-build`(Vite 构建),再执行 `wails build` -- 纯 Go 后端 - - `pnpm nx run cliq-hub-backend:build` - - 等价:`go build ./apps/cliq-hub-backend/cmd/server` -- 纯 Web 前端 - - `pnpm nx run cliq-frontend:build` - -## 测试与校验 -- Go 共享库测试 - - `pnpm nx run shared-go-lib:test` - - 等价:`go test ./packages/shared-go-lib/...` - -## 常见问题 -- `nx: command not found` - - 运行 `pnpm install` 安装工作区依赖;通过 `pnpm nx --version` 验证。 -- `@nx-go/nx-go` 版本解析失败 - - 使用已验证版本:`3.3.1`(根 `package.json` 已配置)。 -- Wails 构建失败 - - 确认本机已安装 Wails CLI 与系统依赖;可先在本地运行 `wails doctor` 排查。 -- 共享 UI 导入失败 - - 已在 `apps/cliq-app/frontend/vite.config.ts` 配置 `@repo/shared-vue-ui` 的别名;确保 `packages/shared-vue-ui/src` 存在并导出组件。 diff --git a/apps/cliq-doc/src/content/docs/zh-CN/index.mdx b/apps/cliq-doc/src/content/docs/zh-CN/index.mdx deleted file mode 100644 index 2ec562e..0000000 --- a/apps/cliq-doc/src/content/docs/zh-CN/index.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: 欢迎使用 cliQ 文档 -description: cliQ 文档 -template: splash -hero: - tagline: 命令行界面快速 GUI 工具 - actions: - - text: 开始使用 - link: /zh-CN/intro - icon: right-arrow ---- - -import { Card, CardGrid } from '@astrojs/starlight/components'; - -## 下一步 - - - - 查看 [cliqfile 语法](/zh-CN/reference/cliqfile-syntax) 以创建您自己的模板。 - - - 查看 [开发环境与构建指南](/zh-CN/guides/development) - - diff --git a/apps/cliq-doc/src/content/docs/zh-CN/intro.md b/apps/cliq-doc/src/content/docs/zh-CN/intro.md deleted file mode 100644 index ad9f1b4..0000000 --- a/apps/cliq-doc/src/content/docs/zh-CN/intro.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: 介绍 -description: cliQ 介绍 ---- - -**cliQ** 发音:/klɪk/,类似“click” -cliQ 是一个轻量级工具,旨在将复杂的 CLI 命令转化为直观、易用的图形用户界面(GUI)。 - -用户只需定义一条带有变量占位符的命令模板,即可自动生成对应的 GUI 界面,通过点击、选择等方式完成参数输入,无需记忆命令语法,极大提升使用体验和操作效率。 - -## 主要功能 -- 命令模板定义:用户可输入 CLI 命令,生成对应的动态表单界面。 -- 模板导入/导出:支持将模板(`.cliqfile.yaml`)导出为文件,或从他人导入,便于团队共享。 -- 多种输入组件支持:支持文件选择器、数字输入框、下拉选择框、复选框等,适配不同参数类型。 -- 跨平台支持:支持 Windows、macOS 和 Linux 平台 -- 模板市场:用户可上传/下载常用工具模板(如 ImageMagick、ffmpeg、pngquant 等),构建共享生态。 - -## 如何使用 - -从Release界面下载对应平台的安装包,双击运行即可. - -**Windows 平台**: -exe文件直接打开运行即可. Windows 10及以上版本均支持. -程序依赖Webview, 如果本机没有安装, 第一次打开时会弹出提示,按照指引安装即可. - -**macOS 平台**: -macOS 10.13及以上版本均支持. -由于产物没有签名, 直接打开会弹出提示“文件已损坏”, 请按照以下步骤解决: -1. 打开终端, 手动认证cliQ应用: -```bash -sudo xattr -dr com.apple.quarantine /Users/colin/Downloads/cliq.app -# 注: 最后面的路径请根据实际情况修改. 你也可以直接将文件拖入到终端, 会自动补齐路径. -``` -2. 打开cliQ应用, 如果能正常打开, 则说明认证成功. -3. (可选)将cliQ应用拖动到“应用程序”文件夹, 方便后续使用. - -**Linux平台**: -cliQ应用本身支持Linux平台运行. 当前产物尚未在Linux平台充分测试, 欢迎通过issue反馈. - -## 技术栈 -- 使用wails框架构建, 跨平台支持 -- 页面使用Vue3, 使用TypeScript -- 使用PrimeVue V4组件库、Vite构建前端项目, 部分样式使用TailwindCSS