sndev.io / docs

init

Scaffold a new ServiceNow manifest project from a template.

The init command bootstraps a new project directory with CLAUDE.md, sn.config.ts, example manifests, and a vault scaffold. Templates are inlined into the sn binary — no network access or git clone needed. Use --dry-run to preview the file plan before writing. Instance credentials are configured separately via sn instance add; they live in ~/.sn-skills/instances.json, not in the project.

sn init [--template app|monorepo|feature|minimal] [--name <name>] [--dry-run] [--force] [<target-dir>]

Scaffold a new manifest project.

Arguments

NameRequiredDescription
target-dirNoDirectory to scaffold into. Defaults to ./ or . when neither is given.

Flags

FlagDefaultDescription
--template <t>app (choices: app, monorepo, feature, minimal)Which template to use.
--name <name>Project name injected into package.json and docs. Defaults to the basename of target-dir.
--dry-runPrint the file plan without writing anything.
--forceOverwrite a non-empty target directory (ignores a lone `.git`).

Examples

sn init --template app --name billing-skills ./billing-skills
✓ Scaffolded billing-skills at ./billing-skills (15 files)
Next steps:
cd ./billing-skills
sn instance add default --url <host> --user <u> --pass - --default
sn preview manifests/example-business-rule/manifest.ts
sn init --template minimal --dry-run
TemplateWhat you get
appCLAUDE.md, vault/, 3 example manifests, full tsconfig/package.json
monorepopackages/example-app/ layout with shared sn.config.ts at the root
featureSingle manifest.ts + spec.md at the root — good for a one-off change
minimalCLAUDE.md, .gitignore, sn.config.ts, package.json — nothing else

Exits non-zero if the target directory is non-empty and neither --force nor --dry-run was passed — protects you from overwriting work in progress.