Skip to documentation
Browse documentation
SimpcnDocsCLI commands

The Simpcn handbook

CLI commands

Three commands: initialize, inspect, and migrate. Application builds remain separate.

init — create configuration

Code
npx simpcn init
npx simpcn init --yes --framework next --provider s3 --bucket YOUR_EXISTING_BUCKET --prefix assets

Interactive initialization selects a framework and provider. Framework values are next, vite, or core; provider values are s3, minio, or r2. Edit endpoint and public delivery URL after initialization, or pass --endpoint and --public-base-url explicitly.

--yes skips prompts. --skip-install avoids automatic adapter installation. --force replaces an existing configuration; use it deliberately. Initialization never edits framework config, creates buckets, or changes access policies. If adapter installation fails, the generated configuration is retained.

plan — review without changes

Code
npx simpcn plan
npx simpcn plan --check-remote
npx simpcn plan --check-remote --overwrite

The default plan scans and hashes local files without contacting storage. --check-remote checks object metadata with HEAD requests and reports reconciliation actions; it uploads nothing. Adding --overwrite previews replacement behavior. Remote checking needs credentials and an accessible storage API.

migrate — upload and verify

Code
npx simpcn migrate

Migration reconciles local inventory and remote state, uploads required assets, and records verification. Matching assets can be skipped. Successful progress is preserved if other files fail; rerun the command after addressing the failure.

Allow replacement of conflicting existing keys
npx simpcn migrate --overwrite

Review conflicts before overwriting. Removed local assets are reported, never deleted remotely. Original local assets and source files are retained.

Shared options

OptionPurpose / default
--config, -cExplicit TypeScript configuration path.
--rootAsset directory; defaults to public.
--provider, --endpoint, --bucket, --region, --prefixOverride storage target settings.
--public-base-urlPublic delivery root, including prefix.
--excludeRepeatable glob; replaces configured exclusions.
--state-file, --manifest-fileOverride local state and inventory paths.
--concurrency, --hash-concurrencyConcurrent assets: 4; hash workers: 8.
--max-attempts, --retry-delay-msNetwork attempts: 3; initial delay: 200ms.
--cache-controlObject cache policy.
--jsonStructured stdout without progress output.
Code
npx simpcn --help
npx simpcn --version
npx simpcn plan --json

Use NO_COLOR=1 to disable colors. Exit codes: 0 success, 1 execution failure or conflicts, 2 usage/configuration error, 130 cancellation.

A CI sequence

Code
npm ci
npm run build

This assumes a committed npm lockfile, configured framework integration, original assets, and matching simpcn/deployment-state.json from a successful migration. Generated files under simpcn/.build/ are recreated during the build. Storage credentials are only needed if you choose to run migration as a separate CI step.

No simpcn build, deploy, sync, or purge command exists.

Something unclear? Open an issue.

Simpcn v0.1.3 · Experimental integrations are labeled.