Open a GitHub repo in Codeharbor
Copy a public GitHub repository into a Codeharbor project file.
How it works
Give a public GitHub address (or upload a ZIP/.tar.gz) and get a Codeharbor project with the repository’s text files — the same import Codeharbor’s “Open a GitHub repo” uses. Secret files, vendored code, lock files and binaries stay out; the project remembers the repository and commit. It is a one-way copy: nothing is ever written back to GitHub.
- The repository is read like in the Repo Digest (public archive of the resolved commit, or the uploaded archive) and every file gets the same decision: secrets never, then your patterns, vendored folders, lock files, generated files, binaries and the size limit.
- Files are taken by priority (README, manifests, source, docs, tests, rest; shallow paths first) until Codeharbor’s project limits are reached: 400 files, 1 MB per file, 8 MB in total. Files that do not fit are listed.
- The project stores its source (repository, branch or tag, commit, import time). Codeharbor opens it as a new project in your browser; edits stay local and are never pushed to GitHub.
Sources
Part of Codeharbor
-
Codeharbor Coding IDE
A coding IDE: edit, preview and run web projects safely, then share them.
How to open a public GitHub repository as a Codeharbor project
Copy the text files of a public GitHub repository or a ZIP into a Codeharbor project file — secrets, vendored code and binaries left out, one-way copy.
What it is for
Sometimes you want to read, search or try out the code of a public repository without cloning it, installing Git or opening a full editor. This tool copies the repository's text files into a Codeharbor project: a single .codeharbor.json file you can open in the Codeharbor app, where you get the file tree, search across files, Markdown preview and the repo views (digest, map and overview). It is exactly what Codeharbor's File → Open a GitHub repo… does.
Give it a public GitHub address — https://github.com/owner/repo, a /tree/<branch>/<folder> address or simply owner/repo — or upload the repository as .zip or .tar.gz. Our server downloads GitHub's public archive of the current commit for you, without a login.
It is a one-way copy. Nothing is ever written back to GitHub, and the project only remembers where it came from (repository, branch or tag, commit and import time).
Worked example
The first example uploads the Tidewatch sample repository as a ZIP. The tool answers:
Imported 21 files (5.7 KB) of tidewatch-main into a Codeharbor project; 4 files were left out.
The four files left out are the .env file (a secret file, never included), node_modules/left-pad/index.js (vendored code), package-lock.json (a lock file) and public/logo.png (a binary). The project opens with README.md as its entry file.
The second example fills in Only this folder with src. Now 8 files (2.3 KB) are imported and the paths start inside that folder: api/routes.ts, core/tides.ts, index.ts and so on. The entry file becomes index.ts.
How to read the result
- Files imported and Size — what went into the project.
- Files left out — grouped by reason: secret file, vendored or build output, lock file, generated or minified, binary, larger than the size limit, or a project limit.
- Entry file — the file Codeharbor opens first (and runs, if it is a web page).
- Download the Codeharbor project — the
.codeharbor.jsonfile. Open it in Codeharbor with File → Open project file.
Tips and common mistakes
- Codeharbor projects hold at most 400 files and 8 MB. Files are taken in priority order (README, manifests, source, docs, tests) so the important ones fit first; use Only this folder or Leave out for big repositories.
- Images and other binary files are not imported — the project is for reading and editing code.
- Lock files and
node_modulesare skipped by default; switch the options off only if you really need them. - In the app, take a commit right after opening the repository: later you can diff your own changes against the original.
- GitHub allows about 60 address look-ups per hour from our server without a login. If that limit is used up, you get a clear message; uploading a ZIP from GitHub's "Download ZIP" button always works.
FAQ
Can I push my changes back to GitHub?
No. The copy is one-way and Codeharbor has no Git remote. Export the project as a ZIP and commit the changes with your own Git tools.
Does it work with private repositories?
No, only public ones. For private code, download the ZIP from GitHub while signed in there and upload it here.
Are files with passwords imported?
Secret files such as .env, private keys, .npmrc and credential files are never imported. Other files are copied exactly as they are on GitHub.
Guide last updated:
For scripts and AI agents
- JSON API:
POST https://codeharborrepoimport.usefulweb.app/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://codeharborrepoimport.usefulweb.app/mcp· tool namecodeharbor_repo_import
Example request
curl -s -X POST https://codeharborrepoimport.usefulweb.app/api/v1/calculate \
-H 'content-type: application/json' \
-d '{…see OpenAPI examples…}'