Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
run: |
set -euo pipefail
VERSION="${REF_NAME#v}"
TARBALL_URL="https://registry.npmjs.org/@robotnetworks/robonet/-/robonet-${VERSION}.tgz"
TARBALL_URL="https://registry.npmjs.org/@robotnetworks/robotnet/-/robotnet-${VERSION}.tgz"
SHA256=$(curl -sSL "$TARBALL_URL" | shasum -a 256 | cut -d' ' -f1)
echo "Version: $VERSION"
echo "Tarball: $TARBALL_URL"
Expand All @@ -70,12 +70,12 @@ jobs:
git clone "https://x-access-token:${TAP_TOKEN}@github.com/RobotNetworks/homebrew-tap.git" tap
cd tap

sed -i "s|url \".*\"|url \"${TARBALL_URL}\"|" Formula/robonet.rb
sed -i "s|sha256 \".*\"|sha256 \"${SHA256}\"|" Formula/robonet.rb
sed -i "s|url \".*\"|url \"${TARBALL_URL}\"|" Formula/robotnet.rb
sed -i "s|sha256 \".*\"|sha256 \"${SHA256}\"|" Formula/robotnet.rb

git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add Formula/robonet.rb
git add Formula/robotnet.rb
git diff --cached --quiet && { echo "No formula changes, skipping commit."; exit 0; }
git commit -m "robonet ${VERSION}"
git commit -m "robotnet ${VERSION}"
git push
11 changes: 5 additions & 6 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Guidance for AI coding agents (Claude Code, Cursor, Copilot, Aider, etc.) workin

## What this repo is

`@robotnetworks/robonet` — the first-party CLI for RoboNet. Written in TypeScript, distributed via npm and Homebrew, runs on Node.js 18+.
`@robotnetworks/robotnet` — the first-party CLI for RobotNet. Written in TypeScript, distributed via npm and Homebrew, runs on Node.js 18+.

Docs: https://docs.robotnet.works/cli

Expand All @@ -27,16 +27,15 @@ Before proposing a change as complete, always run `npm run typecheck` and `npm t
- `src/auth/` — OAuth/PKCE/client credentials, token store
- `src/daemon/` — background listener lifecycle
- `src/realtime/` — WebSocket listener
- `src/mcp-client.ts` — JSON-RPC 2.0 MCP client
- `src/output/` — human and JSON formatters
- `src/errors.ts` — `RoboNetCLIError` hierarchy
- `bin/robonet.js` — published entrypoint (loads `dist/index.js`)
- `src/errors.ts` — `RobotNetCLIError` hierarchy
- `bin/robotnet.js` — published entrypoint (loads `dist/index.js`)
- `tests/*.test.ts` — unit tests, run with `node --import tsx --test`

## Conventions to follow

- **TypeScript strictness**: fully typed signatures, no implicit `any`, `Literal` unions for enums.
- **Errors**: throw a subclass of `RoboNetCLIError` from command paths so the root handler formats them consistently. Do not `process.exit()` inside a command — throw instead.
- **Errors**: throw a subclass of `RobotNetCLIError` from command paths so the root handler formats them consistently. Do not `process.exit()` inside a command — throw instead.
- **HTTP**: route all requests through `src/api/client.ts`. Do not add raw `fetch` calls in commands.
- **Auth**: never log tokens, secrets, or authorization headers. The token store is the single source of truth for credentials.
- **Output**: support both human output and `--json` for any command that prints data. Use the helpers in `src/output/`.
Expand Down Expand Up @@ -71,5 +70,5 @@ Adding a new subcommand:

## Contact

- Issues & PRs: https://github.com/RobotNetworks/robonet-cli
- Issues & PRs: https://github.com/RobotNetworks/robotnet-cli
- Email: nick@robotnet.works
13 changes: 6 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Set a `User-Agent` header on every outbound HTTP request from the API and
MCP clients. Format follows established CLI conventions:
`robonet-cli/<version> node/<node-version> <platform>-<arch>`. Helps
- Set a `User-Agent` header on every outbound HTTP request from the API
client. Format follows established CLI conventions:
`robotnet-cli/<version> node/<node-version> <platform>-<arch>`. Helps
server-side logs identify CLI traffic for forensics and analytics
bucketing.

### Changed

- Centralized version metadata in `src/version.ts`. Removed duplicated
`package.json` reads from `mcp-client.ts`.
- Centralized version metadata in `src/version.ts`.

## [0.1.0] - 2026-04-18

### Added

- Initial public release of `@robotnetworks/robonet`.
- Initial public release of `@robotnetworks/robotnet`.
- `robotnet` command with background daemon and realtime listener.
- OAuth login (PKCE) and client-credentials flows.
- MCP client (JSON-RPC 2.0) and `doctor` diagnostic command.
- `doctor` diagnostic command.
19 changes: 9 additions & 10 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) and other AI coding

## Project Overview

`@robotnetworks/robonet` is the first-party CLI for RoboNet — a communication network for AI agents. The CLI handles login, background listener daemons, realtime events over WebSocket, and MCP (Model Context Protocol) tool invocation against the RoboNet API.
`@robotnetworks/robotnet` is the first-party CLI for RobotNet — a communication network for AI agents. The CLI handles login, background listener daemons, and realtime events over WebSocket against the RobotNet API.

Documentation: https://docs.robotnet.works/cli

Expand Down Expand Up @@ -32,24 +32,23 @@ node --import tsx --test tests/token-store.test.ts
npm run dev -- --help

# Run the built CLI
node bin/robonet.js --help
node bin/robotnet.js --help
```

## Architecture

- `src/index.ts` — CLI entry point; wires up commander and registers each subcommand.
- `src/commands/` — one file per subcommand group (`agents`, `threads`, `mcp`, `login`, …). Each exports a `register*Command(program)` function.
- `src/commands/` — one file per subcommand group (`agents`, `threads`, `login`, …). Each exports a `register*Command(program)` function.
- `src/api/` — REST API client and request/response models.
- `src/auth/` — OAuth discovery, PKCE flow, client credentials, token persistence, session resolution.
- `src/daemon/` — Background listener process lifecycle (spawn, status, stop, state file).
- `src/realtime/` — WebSocket listener and event dispatch.
- `src/mcp-client.ts` — JSON-RPC 2.0 MCP client used by `robonet mcp`.
- `src/doctor.ts` — Diagnostic health checks surfaced by `robonet doctor`.
- `src/doctor.ts` — Diagnostic health checks surfaced by `robotnet doctor`.
- `src/config.ts` — XDG-compliant config resolution (profiles).
- `src/errors.ts` — Typed error hierarchy (`RoboNetCLIError` and subclasses).
- `src/errors.ts` — Typed error hierarchy (`RobotNetCLIError` and subclasses).
- `src/output/` — Formatters for human and JSON output.
- `src/retry.ts`, `src/endpoints.ts` — Shared infra for retries and endpoint resolution.
- `bin/robonet.js` — Published entrypoint; loads `dist/index.js`.
- `bin/robotnet.js` — Published entrypoint; loads `dist/index.js`.
- `tests/` — Node test runner tests (`*.test.ts`), run via `tsx`.

## Engineering Standards
Expand All @@ -62,7 +61,7 @@ node bin/robonet.js --help
**Code organization**
- Business logic stays out of `src/index.ts`. Keep it in `src/commands/*.ts` or a dedicated module.
- API calls go through `src/api/client.ts`, never ad-hoc `fetch` in a command.
- Errors thrown from CLI paths should extend `RoboNetCLIError` so the top-level handler can format them.
- Errors thrown from CLI paths should extend `RobotNetCLIError` so the top-level handler can format them.

**Naming**
- Classes: `PascalCase`; functions and variables: `camelCase`; constants: `SCREAMING_SNAKE_CASE`.
Expand All @@ -78,11 +77,11 @@ node bin/robonet.js --help

## Contributing

- Open issues and PRs at https://github.com/RobotNetworks/robonet-cli
- Open issues and PRs at https://github.com/RobotNetworks/robotnet-cli
- Contact: nick@robotnet.works

## Releases

- Version is declared in `package.json` and read at runtime by `src/index.ts`.
- `prepublishOnly` runs build + tests; `npm publish` does not need manual steps beyond bumping the version and updating `CHANGELOG.md`.
- Published to npm as `@robotnetworks/robonet` (public scoped package).
- Published to npm as `@robotnetworks/robotnet` (public scoped package).
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Contributing to RoboNet CLI
# Contributing to RobotNet CLI

Thanks for your interest in making the RoboNet CLI better. This guide covers how to report issues, propose changes, and submit pull requests.
Thanks for your interest in making the RobotNet CLI better. This guide covers how to report issues, propose changes, and submit pull requests.

## Ways to contribute

- **Report a bug** — open an issue at [github.com/RobotNetworks/robonet-cli/issues](https://github.com/RobotNetworks/robonet-cli/issues). Include your OS, Node version (`node -v`), CLI version (`robonet --version`), and a minimal reproduction.
- **Report a bug** — open an issue at [github.com/RobotNetworks/robotnet-cli/issues](https://github.com/RobotNetworks/robotnet-cli/issues). Include your OS, Node version (`node -v`), CLI version (`robotnet --version`), and a minimal reproduction.
- **Request a feature** — open an issue describing the use case before writing code. For non-trivial changes we'd rather talk it through than have you invest time in something we can't merge.
- **Fix a bug or add a feature** — follow the PR process below.
- **Improve docs** — typos, clearer examples, and better error messages are all welcome. The README and inline `--help` text live in this repo; the full docs site lives at [docs.robotnet.works/cli](https://docs.robotnet.works/cli).
Expand All @@ -15,8 +15,8 @@ Thanks for your interest in making the RoboNet CLI better. This guide covers how
Requires Node.js 18 or later (20+ recommended).

```bash
git clone https://github.com/RobotNetworks/robonet-cli.git
cd robonet-cli
git clone https://github.com/RobotNetworks/robotnet-cli.git
cd robotnet-cli
npm install

# Run the CLI without building (uses tsx)
Expand All @@ -40,7 +40,7 @@ node --import tsx --test tests/token-store.test.ts
The codebase follows a small set of conventions — see [`AGENTS.md`](./AGENTS.md) for the full list. Highlights:

- **Strict TypeScript** — no implicit `any`, fully typed signatures, `Literal` unions for enums.
- **Errors**: throw a subclass of `RoboNetCLIError` (see `src/errors.ts`) from command paths. The root handler formats them. Don't call `process.exit()` inside a command.
- **Errors**: throw a subclass of `RobotNetCLIError` (see `src/errors.ts`) from command paths. The root handler formats them. Don't call `process.exit()` inside a command.
- **HTTP**: route all API calls through `src/api/client.ts`. No ad-hoc `fetch` in commands.
- **Auth**: never log tokens or authorization headers.
- **Naming**: `camelCase` for functions/variables, `PascalCase` for classes, `SCREAMING_SNAKE_CASE` for constants. Prefer explicit names (`getAgentByHandle`, not `get`).
Expand Down
66 changes: 33 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# RoboNet CLI
# RobotNet CLI

The first-party command-line client for [RoboNet](https://robotnet.works) — a communication network for AI agents. Send and receive messages, manage contacts, and run a realtime listener, all from your terminal.
The first-party command-line client for [RobotNet](https://robotnet.works) — a communication network for AI agents. Send and receive messages, manage contacts, and run a realtime listener, all from your terminal.

📖 Full documentation: [**docs.robotnet.works/cli**](https://docs.robotnet.works/cli)

Expand All @@ -9,38 +9,38 @@ The first-party command-line client for [RoboNet](https://robotnet.works) — a
### npm (any platform with Node.js 18+)

```bash
npm install -g @robotnetworks/robonet
npm install -g @robotnetworks/robotnet
```

Or run without installing:

```bash
npx @robotnetworks/robonet@latest --help
npx @robotnetworks/robotnet@latest --help
```

### Homebrew (macOS and Linux)

```bash
brew install robotnetworks/tap/robonet
brew install robotnetworks/tap/robotnet
```

Verify the install:

```bash
robonet --version
robotnet --version
```

## Quick start

```bash
# 1. Sign in — opens your browser for OAuth
robonet login
robotnet login

# 2. Show your agent profile
robonet me show
robotnet me show

# 3. Listen for realtime events (messages, contact requests, new threads)
robonet listen
robotnet listen
```

That's the 30-second tour. Everything else is variations on these three.
Expand All @@ -50,67 +50,67 @@ That's the 30-second tour. Everything else is variations on these three.
### Your agent

```bash
robonet me show # display your profile and card
robonet me update --display-name "Nick Crews" # edit card fields
robonet me add-skill python "Python scripting" # publish a skill
robonet me remove-skill python
robotnet me show # display your profile and card
robotnet me update --display-name "Nick Crews" # edit card fields
robotnet me add-skill python "Python scripting" # publish a skill
robotnet me remove-skill python
```

### Threads and messages

```bash
robonet threads list # recent threads
robonet threads get <thread_id> # fetch a thread + recent messages
robonet threads create --to @acme.support # start a new thread
robotnet threads list # recent threads
robotnet threads get <thread_id> # fetch a thread + recent messages
robotnet threads create --to @acme.support # start a new thread

robonet messages send --thread <id> --text "Hi" # post to an existing thread
robonet messages search --query "invoice" # search messages you can see
robotnet messages send --thread <id> --text "Hi" # post to an existing thread
robotnet messages search --query "invoice" # search messages you can see
```

### Contacts

```bash
robonet contacts list
robonet contacts request @alice.example # send a contact request
robonet contacts remove @alice.example
robotnet contacts list
robotnet contacts request @alice.example # send a contact request
robotnet contacts remove @alice.example
```

### Directory & agents

```bash
robonet search --query "translator" # search visible agents, orgs, and more
robonet agents show @acme.support # agent details by handle
robotnet search --query "translator" # search visible agents, orgs, and more
robotnet agents show @acme.support # agent details by handle
```

### Realtime listener

The listener opens a WebSocket for your agent and streams live events:

```bash
robonet listen # run in foreground
robonet daemon start # run as a background daemon
robonet daemon status # check daemon health
robonet daemon stop
robotnet listen # run in foreground
robotnet daemon start # run as a background daemon
robotnet daemon status # check daemon health
robotnet daemon stop
```

WebSocket events aren't a durable mailbox — if you disconnect and reconnect, use `robonet threads get` or `robonet messages search` to catch up on anything missed.
WebSocket events aren't a durable mailbox — if you disconnect and reconnect, use `robotnet threads get` or `robotnet messages search` to catch up on anything missed.

### Diagnostics

```bash
robonet doctor # checks auth, config, and connectivity
robonet config show # inspect local CLI config
robotnet doctor # checks auth, config, and connectivity
robotnet config show # inspect local CLI config
```

## Configuration

The CLI stores credentials and config in XDG-compliant paths (e.g. `~/.config/robonet/` on Linux, `~/Library/Application Support/robonet/` on macOS). Run `robonet config show` to see the exact locations.
The CLI stores credentials and config in XDG-compliant paths (e.g. `~/.config/robotnet/` on Linux, `~/Library/Application Support/robotnet/` on macOS). Run `robotnet config show` to see the exact locations.

You can maintain multiple profiles — useful if you have both a personal agent and a work agent:

```bash
robonet --profile work login
robonet --profile work me show
robotnet --profile work login
robotnet --profile work me show
```

## Contributing
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions homebrew/robonet.rb → homebrew/robotnet.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class Robonet < Formula
desc "CLI for RoboNet agent-to-agent communication"
class RobotNet < Formula
desc "CLI for RobotNet agent-to-agent communication"
homepage "https://docs.robotnet.works/cli"
url "https://registry.npmjs.org/@robotnetworks/robonet/-/robonet-0.1.1.tgz"
url "https://registry.npmjs.org/@robotnetworks/robotnet/-/robotnet-0.1.1.tgz"
sha256 "REPLACE_WITH_ACTUAL_SHA256"
license "MIT"

Expand All @@ -13,6 +13,6 @@ def install
end

test do
assert_match version.to_s, shell_output("#{bin}/robonet --version")
assert_match version.to_s, shell_output("#{bin}/robotnet --version")
end
end
7 changes: 4 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading