Registry / devops / codesandbox

codesandbox

JSON →
library2.2.3jsnpmunverified

Command-line interface (CLI) for uploading and deploying projects to CodeSandbox, an online code editor tailored for web applications. As of version 2.2.3, this tool allows developers to quickly upload local projects as templates or sandboxes using a single command. It requires authentication to prevent abuse. The library is relatively simple, with no major competitors in the same niche; it is maintained as part of the CodeSandbox ecosystem. Release cadence is low, with the last release in May 2020.

npm install codesandbox
INSTALL
IMPORT
SIG · CODESANDBOX
C
codesandbox
devopsjavascriptv2.2.3
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CLI
npx codesandbox <path>
require('codesandbox')
This is a CLI tool, not a library to import programmatically. Use as a global command via npm or npx.
deploy
codesandbox ./path
codesandbox --upload ./path
The CLI does not expose a programmatic API; it is intended for command-line use only.

Install the CLI globally, navigate to a project, and deploy it to CodeSandbox with a single command. Use --output=url to get the sandbox URL directly.

# Install globally npm install -g codesandbox # Go to project directory cd /my/project # Deploy (will prompt for authentication if not logged in) codesandbox ./ # Or with npx (no install required) npx codesandbox ./my-project --output=url
codesandbox --version
Debug
Known issues
gotchaYou must be signed in to CodeSandbox to use the CLI; otherwise deployment will fail.
fix
Run 'codesandbox login' first or authenticate interactively when prompted.
affects: >=0.0.0
gotchaThe CLI may not work with all project structures; it expects a package.json and supported files.
fix
Ensure your project has a valid package.json and is a standard web project (e.g., React, Vue, etc.).
affects: >=0.0.0
deprecatedThe CLI uses the CodeSandbox v1 API which may be deprecated in favor of a newer API.
fix
Check CodeSandbox documentation for API updates; consider using the official web interface instead.
affects: >=2.0.0
Errors
Common errors & fixes
Error: You must be signed in first. Run codesandbox login.
Attempting to deploy without authentication.
fix
Run 'codesandbox login' and authenticate via the browser.
ERROR: Could not find package.json in the specified directory
The CLI requires a package.json to determine the project type.
fix
Run the command from a directory containing a package.json, or specify a path that contains one.
Error: Request failed with status code 401
Authentication token is invalid or expired.
fix
Re-authenticate by running 'codesandbox login' again.
Upgrade
Version history
2.2.3latest on npm
Audit
Dependencies
commanderrequiredCommand-line argument parsing
inquirerrequiredInteractive prompts for authentication and configuration
axiosrequiredHTTP requests to CodeSandbox API
orarequiredSpinner for CLI loading states
Agent activity
5 hits · last 30 days
node
4
Resources
codesandbox — npm install codesandbox · libregistry