socclink
v0.2.6
Published
Instant preview links for your projects
Downloads
13
Maintainers
Readme
Socc CLI
CLI for publishing instant preview links with Socc.
Requirements
- Node.js 20+
- npm account + API token from
https://sh.socc.ink
Install
From npm (public package)
npm i -g socclinkQuickstart
# 1) Authenticate once
socc login socc_xxxxx
# 2) Deploy from your project folder
socc link
# 3) Optional: set TTL and framework explicitly
socc link --ttl 1 --framework vite
socc link --password mysecret
# 4) List and delete previews
socc list
socc delete <deployment-id>Commands
socc login <token>: Save API token locally.socc logout: Remove saved API token.socc whoami: Show account plan and usage limits.socc link [--ttl <hours>] [--framework <name>]: Build, package, and deploy.socc list: List active deployments.socc delete <id>: Hard-delete a deployment.socc help: Show command help.
Link Options
--ttl <hours>: Positive integer in hours. Default is6.--framework <name>:auto|vite|react|next|angular|nuxt|astro|static.--password <value>: Protect preview with password (tier-dependent).
If you do not pass --framework, detection runs automatically.
Static-Only Support (Current)
Socc currently deploys static output only.
- Works: frameworks/projects that generate static files (
dist/,build/,out/). - Does not work yet: server-side runtime SSR (for example Nuxt
ssr: truein server mode).
Auto Detection
The CLI detects:
- Framework:
vite,react,next,angular,nuxt,astro,static, or custom build script. - Package manager:
npm,yarn,pnpm, orbun(by lockfile).
Next.js note
Socc requires static export output (out/) for Next.js.
Set this in next.config.js:
export default {
output: 'export'
};Then run socc link again.
Auth Storage
Token is saved in:
~/.socc/config.json- Switch account: run
socc login <new-token>(replaces current token). - Logout: run
socc logout.
Troubleshooting
You are not authenticated: runsocc login <token>.Token is invalid or expired: generate a new token inhttps://sh.socc.ink.Daily deployment limit reached: wait for reset or upgrade plan.Build failed: verify local build command works before runningsocc link.Output directory not found: set framework explicitly or fix build output path.
