Skip to content

grapity registry ​

Manage specs in the Grapity Registry.

Usage ​

bash
grapity registry <command> [options]

Description ​

Use grapity registry to publish, validate, inspect, and delete API specs in the Grapity Registry.

Commands ​

CommandDescription
push <file>Push a spec to the Registry
validate <file>Validate a spec without storing it
listList all specs
get <name>Get spec metadata and latest version
update <name>Update spec metadata (visibility)
versions <name>List all versions of a spec
spec <name>Fetch the raw spec document
delete <name>Delete a spec and all its versions

grapity registry push ​

Push a spec file to the Registry. Validates structure, checks backward compatibility, assigns a semver, and stores the result.

Pushes are idempotent: if the content is identical to the latest version, the Registry registers nothing and reports no changes with the current version. A --visibility change supplied in the same push still applies without creating a version.

Usage ​

bash
grapity registry push <file> --name <name> [options]

Arguments ​

ArgumentDescription
<file>Path to the OpenAPI spec file

Options ​

OptionDescriptionDefault
--name <name>Required. Spec name (URL-friendly identifier)—
--type <type>Spec type: openapiopenapi
--description <desc>Description of the spec—
--owner <owner>Owner team or individual—
--source-repo <url>Source repository URL—
--tags <tags>Comma-separated tags—
--visibility <visibility>Spec visibility: private (authenticated reads only) or public (anonymous reads allowed). On an existing spec, supplying it updates visibility; omitting it leaves it unchangedprivate on first push
--git-ref <ref>Git commit SHA—
--pushed-by <by>Pusher identity (user or CI)—
--forceForce push even with breaking changesfalse
--reason <reason>Reason for force push (required with --force)—
--prereleasePush as pre-release version (0.x)false

Examples ​

Push a new spec:

bash
grapity registry push ./openapi.yaml --name payments-api

Push with metadata:

bash
grapity registry push ./openapi.yaml --name payments-api \
  --description "Payments API v2" \
  --owner platform-team \
  --tags payments,public \
  --git-ref abc1234

Force push a breaking change:

bash
grapity registry push ./openapi.yaml --name payments-api \
  --force --reason "security fix CVE-2026-1234"

grapity registry validate ​

Validate a spec against the latest version in the Registry without storing anything. When the content is identical to the latest version, the result reports unchanged and the CLI prints No changes detected, matching what an idempotent push would do.

Usage ​

bash
grapity registry validate <file> --against <name>

Options ​

OptionDescriptionDefault
--against <name>Required. Spec name to validate against—

Example ​

bash
grapity registry validate ./openapi.yaml --against payments-api

Output shows whether the spec is valid and lists any breaking or safe changes. When no spec exists for --against yet, the content is validated structurally and reported as an initial version, mirroring what a first push would accept.

The command exits 1 when the spec is invalid or contains blocked breaking changes, so it can gate CI jobs. Sunset-eligible removals still exit 0.

grapity registry list ​

List all specs in the Registry.

Usage ​

bash
grapity registry list [options]

Options ​

OptionDescriptionDefault
--type <type>Filter by spec type: openapi—
--owner <owner>Filter by owner—
--tags <tags>Comma-separated tag filter—

Example ​

bash
grapity registry list --type openapi --owner platform-team

grapity registry get ​

Get metadata and latest version details for a spec.

Usage ​

bash
grapity registry get <name>

Example ​

bash
grapity registry get payments-api

grapity registry update ​

Update mutable spec metadata without creating a new version. Currently supports changing visibility to publish or unpublish anonymous read access.

Usage ​

bash
grapity registry update <name> --visibility <visibility>

Options ​

OptionDescriptionDefault
--visibility <visibility>Required. New visibility: private or public—

Examples ​

Publish a spec so anyone can read it without a token:

bash
grapity registry update payments-api --visibility public

Make it private again:

bash
grapity registry update payments-api --visibility private

grapity registry versions ​

List all versions of a spec, newest first.

Usage ​

bash
grapity registry versions <name> [options]

Options ​

OptionDescriptionDefault
--limit <n>Maximum versions to return (max 25)10
--offset <n>Number of versions to skip0

Example ​

bash
grapity registry versions payments-api --limit 5

grapity registry spec ​

Fetch the raw spec document for an API. Prints to stdout, pipe-friendly.

Usage ​

bash
grapity registry spec <name> [options]

Options ​

OptionDescriptionDefault
--semver <semver>Specific versionlatest
--format <format>Output format: json or yamlyaml

Examples ​

Latest version as YAML:

bash
grapity registry spec payments-api

Latest as JSON:

bash
grapity registry spec payments-api --format json

Specific version:

bash
grapity registry spec payments-api --semver 1.2.0

Pipe to another tool:

bash
grapity registry spec payments-api | yq '.info.title'

grapity registry delete ​

Delete a spec and all its versions from the registry.

Usage ​

bash
grapity registry delete <name> [options]

Options ​

OptionDescriptionDefault
-f, --forceSkip confirmation promptfalse

Example ​

bash
grapity registry delete payments-api

See also ​

Released under the Apache 2.0 License.