Skip to main content

LIST AND MANAGE NAMESPACES

This guide shows you how to inspect the namespaces registered in a shared datastore.

List all namespaces

$ swamp datastore namespace list
┌───────────┬──────────────────────────────────────┬──────────────┬─────────┐
│ namespace │ repoId                               │ registeredAt │ current │
├───────────┼──────────────────────────────────────┼──────────────┼─────────┤
│ infra     │ 94735c06-fc0a-4d77-b712-04fbd801b18d │ 2026-05-15   │ *       │
│ compute   │ a2e8f1b3-7c42-4d91-8e56-1f3a5b9c0d2e │ 2026-05-16   │         │
│ security  │ c7d4e2a1-5b38-4f90-9a67-2e8c4d1f0b3a │ 2026-05-20   │         │
└───────────┴──────────────────────────────────────┴──────────────┴─────────┘

The * in the current column marks this repository's namespace. Each row shows the namespace slug, the repository ID that registered it, and when it was first registered.

JSON output

For scripting, use the --json flag:

$ swamp datastore namespace list --json
{
  "namespaces": [
    {
      "namespace": "infra",
      "repoId": "94735c06-fc0a-4d77-b712-04fbd801b18d",
      "registeredAt": "2026-05-15T14:30:00.000Z",
      "isCurrent": true
    },
    {
      "namespace": "compute",
      "repoId": "a2e8f1b3-7c42-4d91-8e56-1f3a5b9c0d2e",
      "registeredAt": "2026-05-16T09:15:00.000Z",
      "isCurrent": false
    }
  ],
  "currentNamespace": "infra"
}

Check which namespace the current repository uses

If you only need to verify the current repository's namespace, check the datastore.namespace field in .swamp.yaml:

$ grep namespace .swamp.yaml

Or use the JSON output and filter:

$ swamp datastore namespace list --json | jq '.currentNamespace'