Skip to content
Melvin Carvalho edited this page Sep 4, 2023 · 1 revision

Developer Wiki: Nostr Army Knife

Welcome to the developer documentation for the Nostr Army Knife, a versatile tool designed to enhance your experience with the Nostr ecosystem.

Overview

The Nostr Army Knife repository comprises two main components:

  1. A command-line interface (CLI) tool that facilitates encoding and decoding of nostr entities and facilitates communication with relays.
  2. A toolkit that serves as a debugging interface for the Nostr system, available as a web page.

1. Command-Line Interface (CLI)

Installation

To install the CLI tool, use the following command:

go install github.com/fiatjaf/nak

Integration

The Nostr Army Knife CLI tool complements https://github.com/blakejakopovic/nostcat, especially when used with Unix pipes.

Usage Examples

Decode a nostr entity:

~> nak decode nsec1aqc5q5l8da0l7u6gra4p5xhleclngezlpsgd7z5dx07cpu8sxf2shqgn6y

Generate an event:

~> nak event -c hello --sec e8314053e76f5fff73481f6a1a1affce3f34645f0c10df0a8d33fd80f0f03255

For a detailed list of available commands and their descriptions, refer to the provided documentation by using:

~> nak --help

Development Framework

The CLI tool is written in Go, leveraging the go-nostr library. It's heavily inspired by nostril.


2. Web Debugging Toolkit

The Nostr Army Knife also presents a comprehensive toolkit for debugging Nostr components. Accessible as a webpage, it provides an interactive interface to diagnose and address issues within the Nostr system.

Preview

Nostr Army Knife Web Debugging Interface

Development Framework

The toolkit is developed using:


Conclusion

The Nostr Army Knife is an indispensable tool for developers and users within the Nostr ecosystem. Whether you're encoding and decoding entities, communicating with relays, or debugging various Nostr components, this tool provides a seamless and efficient experience. Make sure to explore its capabilities to get the most out of your Nostr interactions.