Skip to main content

Modern Python CLI for Nostr interactions - key generation, event creation, and relay management

Project description

⚡ Nostress

Nostress Banner

PyPI - Downloads Python Version Documentation Status Test Coverage Lightning

A modern, secure, and lightning-fast CLI for Nostr protocol interactions

Nostress empowers developers and Nostr enthusiasts with a powerful command-line interface for seamless key management, event creation, and relay interactions. Built with security-first principles and modern Python practices, it's the tool you've been waiting for to dive deeper into the decentralized web.

✨ Why Nostress?

🔐 Security First: Cryptographically secure key generation using industry-standard secp256k1 elliptic curve cryptography

⚡ Lightning Fast: Built with modern Python and optimized for performance with rich terminal interfaces

🛠️ Developer Friendly: Intuitive CLI with comprehensive help, JSON output, and scripting support

🔄 Format Flexible: Seamless conversion between hex and bech32 formats (nsec/npub)

🎨 Beautiful Output: Rich terminal formatting with tables, colors, and verbose modes

🚀 Quick Start

Installation

# Install via pip
pip install nostress

# Or using uv (recommended for development)
uv pip install nostress

# Verify installation
nostress --help

Your First Keypair

# Generate a new keypair (hex format)
nostress keys generate

# Generate in bech32 format with verbose output
nostress keys generate --format bech32 --verbose

# Generate both formats and save to file
nostress keys generate --format both --output my-keypair.txt

# JSON output for scripting
nostress keys generate --json

🔑 Core Features

Key Management Made Simple

Generate Secure Keypairs

# Basic generation
nostress keys generate

# Multiple formats
nostress keys generate --format both --verbose

# Encrypted storage
nostress keys generate --encrypt --output secure-key.txt

Validate Any Key

# Validate hex keys
nostress keys validate abc123...def

# Validate bech32 keys with type checking
nostress keys validate nsec1... --type nsec
nostress keys validate npub1... --type npub

Format Conversion (Coming Soon)

# Convert between formats
nostress keys convert nsec1... --to hex
nostress keys convert abc123... --to bech32 --type private

Advanced Features

  • 🔒 Encryption Support: Password-protected key storage
  • 📊 Rich Output: Beautiful tables and formatted displays
  • 🤖 JSON Mode: Perfect for automation and scripting
  • 🔍 Verbose Logging: Detailed operation insights
  • 📁 File Operations: Save and load keys securely

🏗️ Architecture & Design

Nostress is built with a clean, modular architecture:

  • CLI Layer: Intuitive command interface with Typer
  • Core Logic: Cryptographic operations with the cryptography library
  • Utilities: Validation, formatting, and configuration management
  • Rich Integration: Beautiful terminal output with colors and tables

Tech Stack

  • Python 3.12+: Modern Python with type hints
  • Typer: Powerful CLI framework with auto-completion
  • Rich: Beautiful terminal formatting
  • Cryptography: Industry-standard cryptographic operations
  • Pydantic: Data validation and models

📖 Documentation

📚 For comprehensive documentation, tutorials, and API reference, visit our ReadTheDocs site

Quick Command Reference

# Main help
nostress --help

# Key management commands
nostress keys --help

# Specific command help
nostress keys generate --help
nostress keys validate --help

Configuration

Nostress follows XDG Base Directory standards for configuration:

  • Config: ~/.config/nostress/
  • Data: ~/.local/share/nostress/
  • Cache: ~/.cache/nostress/

🛣️ Roadmap

Current Features (v0.1.x)

  • ✅ Secure key generation (hex/bech32)
  • ✅ Key validation and verification
  • ✅ Rich terminal output and JSON support
  • ✅ Encrypted key storage

Coming Soon (v0.2.x)

  • 🔄 Format conversion between hex/bech32
  • 📝 Event creation and signing
  • 🔗 Relay connection management
  • 🏪 Event publishing and querying

Future Plans (v1.0+)

  • 📊 Advanced event filtering and search
  • 🔐 Multi-signature support
  • ⚡ Lightning integration
  • 🕸️ Web interface companion

💖 Support the Project

Love Nostress? Support its development by sending some sats or connecting on Nostr!

⚡ Lightning Payments

Lightning Address: hberaud@nostrcheck.me

Lightning QR Code

Scan to send lightning payments

Your support helps maintain and improve Nostress, ensuring it remains free and open-source for the entire Nostr community.

🫂 Follow on Nostr

Nostr Public Key: npub1azaaxhlx3v8lex2gnyxzq8ws9nxsh8ga30d64jeaqxw4e75vxufqm434ty

Nostr QR Code

Scan to follow me on Nostr

Other Ways to Contribute

  • 🌟 Star the repository to show your support
  • 🐛 Report bugs and suggest features
  • 💻 Contribute code via pull requests
  • 📖 Improve documentation and examples
  • 🗣️ Spread the word in the Nostr community

📄 License

Nostress is open-source software. Check the LICENSE file for details.

🤝 Contributing

We welcome contributions from the community! Whether it's:

  • Bug fixes and improvements
  • New features and commands
  • Documentation updates
  • Test coverage improvements

Please see our contribution guidelines and feel free to open issues and pull requests.

🔗 Connect


Built with ❤️ for the Nostr community

Nostress - Where cryptographic security meets developer experience

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nostress-0.1.5.tar.gz (700.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nostress-0.1.5-py3-none-any.whl (27.1 kB view details)

Uploaded Python 3

File details

Details for the file nostress-0.1.5.tar.gz.

File metadata

  • Download URL: nostress-0.1.5.tar.gz
  • Upload date:
  • Size: 700.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nostress-0.1.5.tar.gz
Algorithm Hash digest
SHA256 f22765bab66a212e3ecb5d17c923b4cb7683cfadd627f634815c012a3e80d8f1
MD5 4f460f7743567f2d416ab6eb67a25d31
BLAKE2b-256 3e79e2545a6f3f28ba3d2d666a1f0b7fe05088a38366733b10be450295a9077c

See more details on using hashes here.

Provenance

The following attestation bundles were made for nostress-0.1.5.tar.gz:

Publisher: ci.yml on 4383/nostress

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nostress-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: nostress-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 27.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nostress-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 33bd0f0f2703690a810eb48d08f20bff3fd75f2aadeddf7fd7e366b2bbf2a0a9
MD5 cdc79d79e0e1054aa3801486ca02f1b8
BLAKE2b-256 fc56d953ac6dafd139b96689d3b10c921837dfa41701bdb77ef0a0ac67d46e7b

See more details on using hashes here.

Provenance

The following attestation bundles were made for nostress-0.1.5-py3-none-any.whl:

Publisher: ci.yml on 4383/nostress

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page