Skip to content

Command Reference

nsyte provides a comprehensive set of commands for managing nostr sites. Each command is documented in detail on its own page.

Core Commands

Project Management

  • nsyte init — Initialize a new nsyte project with configuration
  • nsyte validate — Validate your nsyte configuration file

File Operations

Development

  • nsyte serve — Serve files locally for development
  • nsyte run — Run resolver server with npub subdomains
  • nsyte debug — Debug nsites by checking relays and servers

Authentication

  • nsyte bunker — Manage NIP-46 bunker connections
  • nsyte ci — Generate CI/CD credentials (nbunksec)

Legacy

Global Options

These options are available for all commands:

  • --help — Show help information
  • --version — Show version information
  • --verbose — Enable verbose output
  • --quiet — Suppress all output except errors

Authentication Options

Many commands support these authentication options:

  • -k, --privatekey <nsec> — Private key (nsec/hex) for signing
  • -b, --bunker <url> — NIP-46 bunker URL for signing
  • --nbunksec <nbunksec> — NIP-46 bunker encoded as nbunksec

Configuration

nsyte uses a configuration file at .nsite/config.json which can store:

  • Default relays
  • Default blossom servers
  • Bunker connections
  • Project metadata

Use nsyte init to create a new configuration or nsyte validate to check an existing one.

Environment Variables

  • NSITE_CONFIG — Path to configuration file (default: .nsite/config.json)
  • NSITE_RELAYS — Comma-separated list of relay URLs
  • NSITE_SERVERS — Comma-separated list of server URLs
  • NSITE_BUNKER — Bunker connection string
  • NSITE_NBUNKSEC — nbunksec string for authentication

Exit Codes

  • 0 — Success
  • 1 — General error
  • 2 — Configuration error
  • 3 — Authentication error
  • 4 — Network error
  • 5 — File system error

Getting Started

  1. Initialize a new project:

    nsyte init
    

  2. Deploy your site:

    nsyte deploy ./dist
    

  3. View your published files:

    nsyte browse
    

Common Workflows

Publishing a Website

# Initialize project
nsyte init

# Deploy files
nsyte deploy ./dist --publish-profile --publish-relay-list

# Verify deployment
nsyte ls

Managing Files

# Interactive file browser
nsyte browse

# List files in terminal
nsyte ls

# Remove specific files
nsyte purge --paths "*.old" --include-blobs

CI/CD Integration

# Generate CI credentials
nsyte ci

# Use in CI pipeline
nsyte deploy ./dist --nbunksec $NSYTE_NBUNKSEC

See Also