Note: This overlaps with #18241 but is scoped differently — #18241 focuses on replacing GitHub Desktop with a desktop-only clone flow. This request covers the new project/import flow across all platforms (desktop and web), adding a dialog with both GitHub URL import and local folder import as first-class options in the home screen.
Describe the enhancement you want to request
When adding a new project in OpenCode, users can only select an existing local directory. There is no way to clone a repository directly from a URL. Users must manually clone elsewhere (terminal, GitHub Desktop, etc.) and then import the folder into OpenCode.
Add a New Project dialog that offers two import paths:
- Import from GitHub — Paste a repository URL (e.g. `https://github.com/org/repo\` or shorthand `org/repo`), choose a destination directory, and OpenCode clones and opens it as a project.
- Import from folder — The existing directory picker flow (unchanged).
User Flow
- When the user clicks New Project, a dialog appears with the two import options.
- Selecting Import from GitHub shows a URL input field and a destination directory picker (native picker on desktop, server-side browser on web).
- OpenCode runs `git clone` to the chosen destination and registers the cloned directory as a project.
- Selecting Import from folder keeps the current directory picker behavior unchanged.
Implementation Areas
| Area |
File(s) |
| Backend clone endpoint |
`packages/opencode/src/server/routes/instance/httpapi/groups/project.ts` |
| Backend clone service |
`packages/opencode/src/project/project.ts` |
| New project dialog (new file) |
`packages/app/src/components/dialog-new-project.tsx` |
| Home page integration |
`packages/app/src/pages/home.tsx` |
Existing utilities to reuse: `AppProcess.run()` for executing git commands, `DialogSelectDirectory` for destination browsing on web, `platform.openDirectoryPickerDialog` for native desktop picker, `RepositoryCache` as reference for clone logic.
Describe the enhancement you want to request
When adding a new project in OpenCode, users can only select an existing local directory. There is no way to clone a repository directly from a URL. Users must manually clone elsewhere (terminal, GitHub Desktop, etc.) and then import the folder into OpenCode.
Add a New Project dialog that offers two import paths:
User Flow
Implementation Areas
Existing utilities to reuse: `AppProcess.run()` for executing git commands, `DialogSelectDirectory` for destination browsing on web, `platform.openDirectoryPickerDialog` for native desktop picker, `RepositoryCache` as reference for clone logic.