{"id":47281,"library":"codesandboxer","title":"codesandboxer","description":"Codesandboxer (v1.0.3) is a utility to fetch files from a Git repository (GitHub or Bitbucket) and generate a CodeSandbox. It automatically resolves relative imports and extracts external dependencies from the package.json, producing a sandbox ID/URL. The release cadence is low; the package is stable but no longer actively maintained. It differs from manual sandbox creation by automating dependency discovery and file fetching.","status":"maintenance","version":"1.0.3","language":"javascript","source_language":"en","source_url":"https://github.com/codesandbox/codesandboxer","tags":["javascript"],"install":[{"cmd":"npm install codesandboxer","lang":"bash","label":"npm"},{"cmd":"yarn add codesandboxer","lang":"bash","label":"yarn"},{"cmd":"pnpm add codesandboxer","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Used for fetching files from GitHub/Bitbucket APIs in Node.js environments.","package":"node-fetch","optional":false}],"imports":[{"note":"Package is ESM-only. Named export, not default.","wrong":"const fetchFiles = require('codesandboxer').fetchFiles","symbol":"fetchFiles","correct":"import { fetchFiles } from 'codesandboxer'"},{"note":"Named export, not default.","wrong":"import finaliseCSB from 'codesandboxer'","symbol":"finaliseCSB","correct":"import { finaliseCSB } from 'codesandboxer'"},{"note":"Named export. Returns Promise with { sandboxId, sandboxUrl }.","wrong":null,"symbol":"sendFilesToCSB","correct":"import { sendFilesToCSB } from 'codesandboxer'"},{"note":"Default export is the main function? Not documented. Prefer named exports.","wrong":"const codesandboxer = require('codesandboxer')","symbol":"default","correct":"import codesandboxer from 'codesandboxer'"}],"quickstart":{"code":"import { fetchFiles, finaliseCSB, sendFilesToCSB } from 'codesandboxer';\n\nasync function createSandbox() {\n  const fetchedInfo = await fetchFiles({\n    examplePath: 'fixtures/simple',\n    gitInfo: {\n      host: 'github',\n      account: 'Noviny',\n      repository: 'codesandboxer',\n      branch: 'master',\n    },\n  });\n  const finalised = finaliseCSB(fetchedInfo);\n  const csbInfo = await sendFilesToCSB(finalised.parameters);\n  console.log('Sandbox ID:', csbInfo.sandboxId);\n  console.log('Sandbox URL:', csbInfo.sandboxUrl);\n}","lang":"typescript","description":"Fetches files from a GitHub repository, finalizes them for CodeSandbox, and uploads to get a sandbox ID and URL."},"warnings":[{"fix":"Run 'npm install node-fetch'.","message":"Required 'node-fetch' peer dependency not installed. fetchFiles will throw 'Cannot find module'.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Ensure examplePath does not start with '/' or './' and is relative to git root.","message":"examplePath must be relative to the repository root, not the current working directory.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Add branch: 'main' to gitInfo.","message":"Branch defaults to 'master'; if your default branch is 'main' or different, you must specify it in gitInfo.branch.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'activ':49 'autom':58 'automat':22 'bitbucket':16 'cadenc':39 'codesandbox':1,2,20 'creation':56 'depend':29,59 'differ':52 'discoveri':60 'extern':28 'extract':27 'fetch':8,63 'file':9,62 'generat':18 'git':12 'github':14 'id/url':36 'import':25 'javascript':64 'longer':48 'low':41 'maintain':50 'manual':54 'packag':43 'package.json':32 'produc':33 'relat':24 'releas':38 'repositori':13 'resolv':23 'sandbox':35,55 'stabl':45 'util':6 'v1.0.3':3","created_at":"2026-06-07T16:50:43.270555+00:00","updated_at":"2026-06-07T16:50:43.270555+00:00","problems":[{"fix":"Use 'import { fetchFiles } from 'codesandboxer''.","cause":"Importing default instead of named export.","error":"TypeError: fetchFiles is not a function"},{"fix":"Install node-fetch with 'npm install node-fetch'.","cause":"Missing peer dependency node-fetch.","error":"Error: Cannot find module 'node-fetch'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/codesandbox/codesandboxer#readme","github":"https://github.com/codesandbox/codesandboxer","docs":null,"changelog":null,"pypi":null,"npm":"codesandboxer","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}