Expand description
Shared configuration for hashtree tools
Reads from ~/.hashtree/config.toml
Structs§
- Blossom
Config - File server (blossom) configuration
- Config
- Top-level config structure
- KeyEntry
- A stored key entry from the keys file
- Nostr
Config - Nostr relay configuration
- S3Config
- S3-compatible storage configuration
- Server
Config - Server configuration
- Storage
Config - Storage configuration
- Sync
Config - Background sync configuration
Enums§
- Storage
Backend - Storage backend type
Constants§
- DEFAULT_
READ_ SERVERS - Default read-only file servers
- DEFAULT_
RELAYS - Default nostr relays
- DEFAULT_
WRITE_ SERVERS - Default write-enabled file servers
Functions§
- detect_
local_ daemon_ url - Detect a local hashtree daemon on localhost and return its Blossom base URL.
- detect_
local_ relay_ urls - Detect local Nostr relay URLs (e.g., hashtree daemon or local relay on common ports).
- get_
aliases_ path - Get the public alias file path (~/.hashtree/aliases)
- get_
auth_ cookie_ path - Get the auth cookie path (~/.hashtree/auth.cookie)
- get_
config_ path - Get the config file path (~/.hashtree/config.toml)
- get_
data_ dir - Get the data directory from config (defaults to ~/.hashtree/data) Can be overridden with HTREE_DATA_DIR environment variable
- get_
hashtree_ dir - Get the hashtree directory (~/.hashtree)
- get_
keys_ path - Get the keys file path (~/.hashtree/keys)
- parse_
keys_ file - Parse the keys file content into key entries
Format:
<identity> [alias]per line Lines starting with # are comments - read_
first_ key - Read and parse keys file, returning the first key’s secret Returns None if file doesn’t exist or is empty
- resolve_
relays - Resolve relays using environment overrides and optional local relay discovery.