{"id":33294730,"url":"https://github.com/lingfeng11111/right-dev","last_synced_at":"2025-11-19T03:02:26.372Z","repository":{"id":324577149,"uuid":"1095754644","full_name":"lingfeng11111/Right-Dev","owner":"lingfeng11111","description":"一个vscode插件,可以右键自动启动各种前端项目开发服务器并打开浏览器,省去一些手动操作","archived":false,"fork":false,"pushed_at":"2025-11-16T17:16:25.000Z","size":64,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-16T19:11:10.087Z","etag":null,"topics":["automation","development-server","frontend","react","vite","vscode-extension","vue"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lingfeng11111.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-13T13:29:25.000Z","updated_at":"2025-11-16T17:16:28.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/lingfeng11111/Right-Dev","commit_stats":null,"previous_names":["lingfeng11111/right-dev"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/lingfeng11111/Right-Dev","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingfeng11111%2FRight-Dev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingfeng11111%2FRight-Dev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingfeng11111%2FRight-Dev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingfeng11111%2FRight-Dev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lingfeng11111","download_url":"https://codeload.github.com/lingfeng11111/Right-Dev/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingfeng11111%2FRight-Dev/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284988465,"owners_count":27095952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-18T02:00:05.759Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","development-server","frontend","react","vite","vscode-extension","vue"],"created_at":"2025-11-18T02:00:32.037Z","updated_at":"2025-11-19T03:02:26.365Z","avatar_url":"https://github.com/lingfeng11111.png","language":"TypeScript","readme":"# Right-Dev VSCode Extension\n\n![Right-Dev Icon](Right-dev.png)\n\nRight-Dev is a VSCode extension that enables one-click development server startup and browser opening. Simply right-click on any project folder to automatically start the development server and open your project in the browser.\n\n## Features\n\n### Core Functionality\n- **Smart Project Detection**: Automatically identifies project types by scanning up to 5 directory levels (Vite, Create React App, Next.js, Vue CLI, Laravel, Symfony, plain PHP)\n- **Auto Dependency Installation**: Detects and automatically installs missing dependencies\n- **Automatic Server Startup**: Uses VSCode terminal to run development servers in the background\n- **Port Detection**: Intelligently detects service ports with 10-second timeout and retry mechanism\n- **Browser Auto-Open**: Automatically opens browser when service becomes available\n\n### Supported Project Types\n- **Frontend Frameworks**: Vite, Create React App, Next.js, Vue CLI, Webpack, Parcel\n- **PHP Frameworks**: Laravel, Symfony\n- **Plain PHP**: Projects containing index.php\n\n### Configuration Options\n- **Project Structure Support**: Compatible with source/configuration separation\n- **Status Bar Integration**: Real-time service status display with stop/restart capabilities\n- **Custom Configuration**: Support for `.openlocalhost.json` configuration files\n- **Extension Settings**: Auto-install, port range, custom scripts\n\n## Usage\n\n### Installation\nInstall from VSCode Extension Marketplace by searching for \"Right-Dev\"\n\n### Basic Usage\n1. Right-click on a project folder in the Explorer\n2. Select **\"Start Dev \u0026 Open\"**\n3. Wait for status bar to show running status (e.g., \"Vite @5173\")\n4. Browser automatically opens with your project\n\n### Extension Settings\nSearch for `right-dev` in VSCode settings:\n\n| Setting | Default | Description |\n|---------|---------|-------------|\n| `autoInstall` | `true` | Auto-install missing dependencies |\n| `portRange` | `\"3000-3999\"` | Port range configuration |\n| `customScript` | `\"\"` | Custom startup script |\n| `timeout` | `10000` | Service startup timeout (ms) |\n| `autoOpenBrowser` | `true` | Auto-open browser |\n| `browser` | `\"default\"` | Specify browser (chrome/firefox/edge/safari) |\n\n### Project Configuration\nCreate `.openlocalhost.json` in project root:\n\n```json\n{\n  \"projectType\": \"vite\",\n  \"customScript\": \"npm run dev -- --port=0\",\n  \"port\": 3000,\n  \"autoInstall\": true,\n  \"sourcePath\": \"./src\",\n  \"documentRoot\": \"./dist\",\n  \"browser\": \"chrome\",\n  \"timeout\": 10000\n}\n```\n\n## Project Type Detection\n\nThe extension automatically detects projects by characteristic files:\n\n| Project Type | Characteristic Files | Default Command |\n|--------------|---------------------|-----------------|\n| Vite | `vite.config.*` | `npm run dev -- --port=0` |\n| Create React App | `package.json` + `react-scripts` | `npm start -- --port=0` |\n| Next.js | `next.config.*` | `npm run dev -- --port=0` |\n| Vue CLI | `vue.config.js` | `npm run serve -- --port=0` |\n| Laravel | `artisan` + `composer.json` | `php artisan serve --port=0` |\n| Symfony | `symfony.lock` + `composer.json` | `symfony server:start --port=0` |\n| Plain PHP | `index.php` | `php -S localhost:0` |\n\n## Commands\n\nAccess via Command Palette (`Ctrl+Shift+P`):\n- `Right Dev: Start Dev \u0026 Open` - Start development server\n- `Right Dev: Stop Dev Server` - Stop development server  \n- `Right Dev: Restart Dev Server` - Restart development server\n\n## Right-Click Menu\n\nAvailable in:\n- **Explorer**: Right-click on folders\n- **Editor**: Right-click on JavaScript/TypeScript/PHP files\n\n## Repository\n\n[https://github.com/lingfeng11111/Right-Dev](https://github.com/lingfeng11111/Right-Dev)\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file for details\n\n---\n\n# Right-Dev VSCode 扩展\n\nRight-Dev 是一个VSCode扩展，实现一键启动开发服务器并打开浏览器的功能。只需右键点击项目文件夹即可自动启动开发服务器并在浏览器中打开项目。\n\n## 功能特性\n\n### 核心功能\n- **智能项目检测**：自动扫描最多5层目录，识别项目类型（Vite、Create React App、Next.js、Vue CLI、Laravel、Symfony、纯PHP）\n- **自动依赖安装**：检测并自动安装缺失的依赖包\n- **自动服务启动**：使用VSCode终端在后台运行对应的开发服务器\n- **端口检测**：智能检测服务端口号，10秒超时自动重试机制\n- **自动打开浏览器**：服务可用时自动打开浏览器\n\n### 支持的项目类型\n- **前端框架**：Vite、Create React App、Next.js、Vue CLI、Webpack、Parcel\n- **PHP框架**：Laravel、Symfony\n- **纯PHP**：包含index.php的项目\n\n### 配置选项\n- **项目结构支持**：兼容源码与配置分离的项目结构\n- **状态栏集成**：实时显示服务状态，支持停止和重启\n- **自定义配置**：支持`.openlocalhost.json`配置文件\n- **扩展设置**：自动安装、端口范围、自定义脚本等\n\n## 使用方法\n\n### 安装\n在VSCode扩展市场中搜索\"Right-Dev\"并安装\n\n### 基本使用\n1. 在资源管理器中右键点击项目文件夹\n2. 选择**\"Start Dev \u0026 Open\"**\n3. 等待状态栏显示运行状态（如\"Vite @5173\"）\n4. 浏览器自动打开项目\n\n### 扩展设置\n在VSCode设置中搜索`right-dev`：\n\n| 设置项 | 默认值 | 说明 |\n|---------|---------|-------------|\n| `autoInstall` | `true` | 自动安装缺失的依赖包 |\n| `portRange` | `\"3000-3999\"` | 端口范围配置 |\n| `customScript` | `\"\"` | 自定义启动脚本 |\n| `timeout` | `10000` | 服务启动超时时间（毫秒） |\n| `autoOpenBrowser` | `true` | 自动打开浏览器 |\n| `browser` | `\"default\"` | 指定浏览器（chrome/firefox/edge/safari） |\n\n### 项目配置\n在项目根目录创建`.openlocalhost.json`：\n\n```json\n{\n  \"projectType\": \"vite\",\n  \"customScript\": \"npm run dev -- --port=0\",\n  \"port\": 3000,\n  \"autoInstall\": true,\n  \"sourcePath\": \"./src\",\n  \"documentRoot\": \"./dist\",\n  \"browser\": \"chrome\",\n  \"timeout\": 10000\n}\n```\n\n## 项目类型检测\n\n扩展通过特征文件自动检测项目：\n\n| 项目类型 | 特征文件 | 默认命令 |\n|--------------|---------------------|-----------------|\n| Vite | `vite.config.*` | `npm run dev -- --port=0` |\n| Create React App | `package.json` + `react-scripts` | `npm start -- --port=0` |\n| Next.js | `next.config.*` | `npm run dev -- --port=0` |\n| Vue CLI | `vue.config.js` | `npm run serve -- --port=0` |\n| Laravel | `artisan` + `composer.json` | `php artisan serve --port=0` |\n| Symfony | `symfony.lock` + `composer.json` | `symfony server:start --port=0` |\n| 纯PHP | `index.php` | `php -S localhost:0` |\n\n## 命令\n\n通过命令面板（`Ctrl+Shift+P`）访问：\n- `Right Dev: Start Dev \u0026 Open` - 启动开发服务器\n- `Right Dev: Stop Dev Server` - 停止开发服务器  \n- `Right Dev: Restart Dev Server` - 重启开发服务器\n\n## 右键菜单\n\n可在以下位置使用：\n- **资源管理器**：右键点击文件夹\n- **编辑器**：右键点击JavaScript/TypeScript/PHP文件\n\n## 代码仓库\n\n[https://github.com/lingfeng11111/Right-Dev](https://github.com/lingfeng11111/Right-Dev)\n\n## 许可证\n\nMIT许可证 - 详见[LICENSE](LICENSE)文件","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flingfeng11111%2Fright-dev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flingfeng11111%2Fright-dev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flingfeng11111%2Fright-dev/lists"}