When to use
- Upload or deploy use case documents to the platform
- After creating or updating stage markdown files in
documents/ - When deploying documentation alongside a use case
Prerequisites
codikaCLI installed and authenticated- A use case folder with a
documents/subfolder containing stage markdown files - A project to deploy to (via
project.jsonorPROJECT_IDinconfig.ts)
Document folder structure
{stage}_{name}.md:
| Pattern | Stage | Example Title |
|---|---|---|
1_*.md | 1 | ”Business Requirements” |
2_*.md | 2 | ”Solution Architecture” |
3_*.md | 3 | ”Detailed Design” |
4_*.md | 4 | ”Implementation Plan” |
Command
Arguments
| Argument | Description |
|---|---|
<path> | Path to use case folder (must contain a documents/ folder with stage markdown files) |
Options
| Option | Description | Default |
|---|---|---|
--project-id <id> | Override project ID | project.json |
--project-file <path> | Path to custom project file | project.json |
--api-url <url> | Override API URL | — |
--api-key <key> | Override API key | Profile |
--profile <name> | Use a specific profile instead of the active one | — |
--json | JSON output | — |
What happens on deploy
- Scans
documents/for files matching{1,2,3,4}_*.md - For each file: derives title from filename, extracts summary from first paragraph (max 200 chars)
- Resolves project ID:
--project-id>project.json>config.ts - Uploads all documents to the platform in a single API call
- Reports per-stage results (document ID, version, status)
Document versioning
Documents are versioned on the platform:- First upload for a stage creates version
1.0.0 - Subsequent uploads increment the minor version (e.g.,
1.0.0->1.1.0) - Each document version is tracked in the platform’s
version_historycollection
Examples
Output
Exit codes
| Code | Meaning |
|---|---|
0 | Documents deployed successfully |
1 | Deployment failed |