A small CLI tool for connecting command-line tools and AI agents to Nostr direct messages, originally built so I could access my local AI agent from my phone while on the go.
Overview
nparrot is a small Rust CLI tool that makes it convenient to send, receive, and automate one-on-one direct messages over the Nostr protocol. One of its most interesting use cases is letting a local AI agent running on a computer communicate over DMs with the user on another device.
I built it because I wanted to access the local AI agent on my computer from mobile while I was away from my desk, at a time when this kind of feature was not yet widely available in tools like Claude Code and similar products.
Demo
What makes it interesting
Leveraging existing tools instead of rebuilding everything
What is special about this project is not that it is large or complex, but that it solves a useful problem quickly by combining existing open tools and protocols instead of reinventing them. Rather than building a custom AI agent harness and a custom chat app from scratch, I used existing tools like Goose and 0xChat, and connected them with a focused command-line tool plus shell pipelines.
A strong example of the Unix philosophy
nparrot demonstrates how powerful simple composable tools can be when they do one thing well. That kind of approach is valuable for prototyping, for internal tooling, and often for product development more broadly: you can sometimes move quickly without compromising quality by composing good building blocks instead of overbuilding a bespoke system too early.
What the tool does
Sends private NIP-17 direct messages from command-line arguments or standard input.
Waits for a direct message from a specific user and prints it to standard output.
Continuously listens for messages and pipes each one into a shell command.
Provides an MCP mode so an AI agent can send messages or wait for replies.
Works as a practical bridge between local tools and mobile Nostr clients.