prokodo init
Scaffold a .prokodo/config.json configuration file in the current project directory.
prokodo init [options]
Options
| Flag | Type | Default | Description |
|---|---|---|---|
--slug <slug> | string | — | Project slug (skips prompt) |
--defaults | boolean | false | Accept all defaults; derive slug from directory name |
--force | boolean | false | Overwrite existing config |
Behaviour
- Checks whether
.prokodo/config.jsonalready exists in the current directory- If it does and
--forceis not set → prints a warning and exits0without overwriting - If it does and
--forceis set → overwrites
- If it does and
- Determines the project slug:
--slug <value>→ uses value as-is--defaultsor non-interactive stdin → derives frombasename(cwd), lowercased, non-alphanumeric chars replaced with-- Interactive TTY (neither flag set) → prompts the user
- Writes
.prokodo/config.jsonwith sensible defaults
Output file
{
"projectSlug": "my-project",
"verifyGlobs": ["src/**/*", "public/**/*"],
"timeout": 300
}
| Field | Description |
|---|---|
projectSlug | Identifies your project in the prokodo marketplace |
verifyGlobs | Glob patterns (relative to config directory) for files to upload |
timeout | Cloud 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
| Code | Cause |
|---|---|
0 | Config created (or already exists and --force was not set) |
2 | Empty slug derived or provided |