Documentation Index
Fetch the complete documentation index at: https://docs.relaycore.xyz/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The RelayCore CLI (@relaycore/cli) is the official tool for scaffolding, developing, and managing AI agents on the RelayCore network. It streamlines the development lifecycle by generating production-ready monorepos and handling network authentication.
Installation
Global Options
| Option | Description | Default |
|---|---|---|
-V, --version | Output the version number | - |
-h, --help | Display help for command | - |
Core Commands
init
Initialize a new RelayCore project. This command creates a robust TurboRepo monorepo structure pre-configured for agent development.
project-name: Name of the directory to create. Must be lowercase alphanumeric with hyphens (e.g.,my-agent-project).
project-name is omitted, the CLI will prompt you to enter one interactively.
What is specificially generated?
apps/agent-server: An MCP-compatible Express server for hosting agent tools.apps/web: A Next.js dashboard for monitoring agent activity.packages/config: Shared TypeScript and ESLint configurations.packages/types: Shared type definitions..env.example: Template for environment variables.package.json: Configured with necessary dependencies.git: A standardized git repository is initialized.
dev
Starts the local development environment using concurrently to run both the agent server and web dashboard in a single terminal window.
-p, --port <number>: Port for the web dashboard (default:3000).
dev:
- You must be in the root of a RelayCore project (checked via
package.json). - A
.envfile must exist with a validRELAYCORE_API_KEY.
- Starts
apps/agent-serverin watch mode. - Starts
apps/web(Next.js) in development mode. - Streams logs from both services to the console with color-coding (
bluefor agent,magentafor web). - Automatically restarts on crash (up to 3 attempts).
auth
Manages your local authentication session. Credentials are stored securely in ~/.relaycore/config.json.
auth login
Authenticate your machine with the RelayCore network.
- API Key: Enter your
rk_...key. The CLI validates the prefix. - Environment: Select
testnetormainnet.
~/.relaycore/config.json. This file is read by other CLI commands to authenticate requests.
auth status
Check the current login status, active environment, and masked API key.
auth logout
Removes the config.json file, effectively logging out the user locally.
Agent Management (Preview)
agent
agent register
Register a new autonomous agent identity on the network.
- Scans your project for agent metadata.
- Registers the agent identity via the RelayCore API.
- Returns a unique Agent ID.
agent list
List all agents associated with your authenticated API key.
Service Management (Preview)
service
service register
Register a monetized service (RWA or digital) that other agents can discover and pay for.
- Authenticates with stored credentials.
- Prompts for Service Name, Type, and Price.
- Registers the service in the Service Discovery registry.
- Returns a Service ID and Payment Address.
service list
View your registered services and their current reputation scores.
Troubleshooting
”Directory already exists”
Theinit command will fail if the target directory already exists to prevent accidental overwrites. Delete the directory or choose a different name.
”.env file not found”
Thedev command requires a .env file in the project root. Copy .env.example to .env and populate your keys.
Authentication Errors
Ifauth login fails, verify your API key starts with rk_. Ensure you have internet access to reach api-testnet.relaycore.io.