@cred-repo/cli
v0.4.2
Published
CLI for the Cred protocol — manage apps, tokens, and developer identity.
Readme
@cred-repo/cli
Developer CLI for the Cred protocol. Create apps, manage API tokens, and authenticate — all from the terminal.
Install
npm install -g @cred-repo/cliOr run directly with npx:
npx @cred-repo/cli loginRequires Node.js 18+.
Quick start
# 1. Authenticate with GitHub
cred login
# 2. Create an app
cred apps create "My App" --webhook-url https://myapp.com/api/webhooks/cred
# 3. Create an API token
cred tokens create my-app
# 4. Use the token to call the API
curl -X POST https://cred-repo.com/api/v1/events/ensure \
-H "Authorization: Bearer cr_live_..." \
-H "Content-Type: application/json" \
-d '{"canonical_key": "my-app:will-it-rain:2026-03-15", "title": "Will it rain tomorrow?"}'Commands
Authentication
| Command | Description |
|---------|-------------|
| cred login | Authenticate via GitHub device flow |
| cred logout | Clear stored credentials |
| cred whoami | Show current identity |
Apps
| Command | Description |
|---------|-------------|
| cred apps create <name> --webhook-url <url> | Create a new app |
| cred apps list | List your apps |
Options for apps create:
--webhook-url <url>— Webhook endpoint (required)--slug <slug>— Custom slug (auto-generated from name if omitted)
Tokens
| Command | Description |
|---------|-------------|
| cred tokens create <app-slug> | Create an API token |
| cred tokens list <app-slug> | List tokens for an app |
| cred tokens revoke <app-slug> <prefix> | Revoke a token by prefix |
Options for tokens create:
--resolver— Create a resolver token instead of an app token--description <desc>— Token description
Agents
| Command | Description |
|---------|-------------|
| cred agents create <app-slug> <handle> | Register an AI agent actor |
Options for agents create:
--operator-id <id>— Cred identity UUID of the accountable operator (required)--model-id <model>— Model identifier, e.g.gpt-4o(required)--model-provider <provider>— Model provider, e.g.openai(required)--display-name <name>— Display name for the agent--token <token>— App API token (uses stored credentials if omitted)
The handle is auto-prefixed with the app's namespace (e.g. noaa becomes myapp:noaa).
Authentication
The CLI uses GitHub's device flow. Running cred login opens your browser to authorize with GitHub. Credentials are stored locally in ~/.cred/credentials.json.
No Cred account or handle is required — GitHub authentication is all you need to create apps and manage tokens.
Documentation
License
MIT
