Skip to main content

When to use

  • Persist context about a project across sessions (briefs, known issues, changelogs)
  • Read what a previous session documented about a project
  • Track changes over time with full version history

How it differs from metadata documents

Metadata documents are deployment snapshots — frozen copies of config.ts and workflow JSON archived when you deploy. They cannot be updated after deployment. Project notes are living knowledge — updated any time, independently versioned, meant to accumulate context over the project’s lifetime. Multiple agents can read and write the same project’s documents across sessions.

Prerequisites

  • codika CLI installed and authenticated
  • A project ID

Commands

Upsert a document

Create a new document type or update an existing one. First call creates v0.0.0, subsequent calls increment the patch version.

List documents

Get a document

Options

Upsert options

Content can also be piped via stdin: echo "..." | codika notes upsert <projectId> --type <type> --summary "..." | --agent-id <id> | Agent identifier for tracking | | --major-change | Bump minor version instead of patch | | --api-key <key> | API key override | | --json | JSON output |

Get options

What happens on upsert

  1. If no document of that type exists for the project, creates version 0.0.0
  2. If a current version exists, increments patch (0.0.0 -> 0.0.1)
  3. Marks the previous version as superseded (immutable, still queryable)
  4. Updates the version history

Versioning

  • Patch (default): 0.0.0 -> 0.0.1 -> 0.0.2
  • Minor (--major-change): 0.0.5 -> 0.1.0
  • Previous versions are never deleted — full history is preserved

Examples

Record a project brief:
Update from a file:
List all documents:
Read a document:
View version history:

Output

Upsert success:
List:

Suggested document types

These are conventions, not enforced — use any lowercase-hyphenated name:

Agent workflow patterns

Start of session: read existing context

After building/deploying: record what you did

After debugging: document the fix

Diagnosing issues: check history

Error handling

Exit codes