Skip to main content

prokodo init

Scaffold a .prokodo/config.json configuration file in the current project directory.

prokodo init [options]

Options

FlagTypeDefaultDescription
--slug <slug>stringProject slug (skips prompt)
--defaultsbooleanfalseAccept all defaults; derive slug from directory name
--forcebooleanfalseOverwrite existing config

Behaviour

  1. Checks whether .prokodo/config.json already exists in the current directory
    • If it does and --force is not set → prints a warning and exits 0 without overwriting
    • If it does and --force is set → overwrites
  2. Determines the project slug:
    • --slug <value> → uses value as-is
    • --defaults or non-interactive stdin → derives from basename(cwd), lowercased, non-alphanumeric chars replaced with -
    • Interactive TTY (neither flag set) → prompts the user
  3. Writes .prokodo/config.json with sensible defaults

Output file

{
"projectSlug": "my-project",
"verifyGlobs": ["src/**/*", "public/**/*"],
"timeout": 300
}
FieldDescription
projectSlugIdentifies your project in the prokodo marketplace
verifyGlobsGlob patterns (relative to config directory) for files to upload
timeoutCloud verification timeout in seconds (can be overridden per-run with --timeout)

Examples

# Explicit slug
prokodo init --slug my-project

# Derive slug from directory name (great for CI)
prokodo init --defaults

# Overwrite an existing config
prokodo init --slug new-slug --force

# JSON mode — see the created config on stdout
prokodo init --slug my-project --json
# → { "created": true, "path": ".prokodo/config.json", "config": { … } }

With version control

The generated .prokodo/config.json is safe to commit:

git add .prokodo/config.json
git commit -m "chore: add prokodo config"

Only credentials.json (in ~/.config/prokodo) should never be committed. Add .prokodo/credentials.json to .gitignore as a safety net (though the CLI stores credentials outside the project anyway).

Exit codes

CodeCause
0Config created (or already exists and --force was not set)
2Empty slug derived or provided