Thanks to visit codestin.com
Credit goes to github.com

Skip to content

gnostr-org/gnostr

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6,191 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gnostr:a git+nostr workflow utility

README

--

Temp for CI

Docker

Blossom server and Git tooling containers are available with:

docker compose -f docker-compose.blossom.yml up --build blossom-server
docker compose -f docker-compose.blossom.yml run --rm blossom-git blossom-cli --help
docker compose -f docker-compose.blossom.yml run --rm --service-ports blossom-git blossom-lfs daemon

The blossom-git tools image includes git, git-lfs, blossom-cli, and blossom-lfs. The blossom-server image wraps upstream blossom-server defaults and persists data under the blossom_server_data volume.

Test wrappers

The repo keeps a few shell wrappers for the most common test paths:

./scripts/gnostr-tests.sh [--list] [--test <name>] [--ignored] [--nocapture]
./scripts/asyncgit-tests.sh [--quiet] [--release] [--locked] [--offline] [--target-dir <dir>] [--target-tmpdir] [--target-tmpdir-clean] [--ignored] [--nocapture]
./scripts/gnostr-asyncgit-tests.sh [--quiet] [--release] [--locked] [--offline] [--target-dir <dir>] [--target-tmpdir] [--target-tmpdir-clean] [--ignored] [--nocapture]
./scripts/gnostr-ngit-tests.sh [--features <list>] [--all-features] [--no-default-features] [--ignored] [--nocapture]
./scripts/gnostr-p2p-tests.sh [tests|integration] [--test <name>] [--ignored] [--help]
./scripts/cargo-install-feature-variants.sh [--features <list>] [--allow-all] [--no-default-features]

gnostr-tests.sh runs the workspace test suite, gnostr-asyncgit-tests.sh adds the asyncgit DM/NIP regressions and queries the real event ids it emits, including the shared NIP-34 repo URL vector regression and the extended plain/mined commit, plain/mined note, and plain/PoW matrix, and gnostr-ngit-tests.sh exercises the ngit library with optional cargo feature switches. gnostr-p2p-tests.sh runs the p2p cargo tests by default and the integration relay/subscriber/publisher flow in integration mode. cargo-install-feature-variants.sh runs cargo install --path . for the default feature set, --all-features, and --no-default-features.

For the workspace runner, a handy targeted example is:

./scripts/gnostr-tests.sh --test blossom_remote_push_list_and_fetch_round_trip -- --nocapture

The matrix workflow ./.github/workflows/gnostr-test-matrix.yml runs the asyncgit and ngit wrappers on the stable toolchain, which keeps the script paths covered in CI.

JS web app relay control

The js crate now exposes relay process control through the web server:

cargo run -p gnostr-js --bin gnostr-js -- web
cargo run -p gnostr-js --bin gnostr-js -- relay
cargo run -p gnostr-js --bin gnostr-js -- relay --detach
cargo run -p gnostr-js --bin gnostr-js-relay --detach

The web UI uses these backend endpoints to manage the local relay:

  • GET /api/relay/status
  • POST /api/relay/start
  • POST /api/relay/stop

Detached launches write their PID to .gnostr/gnostr-js-relay.pid, and the startup path refuses to spawn a duplicate relay when port 8080 is already in use.

The web server now starts the detached local relay automatically on boot, so the browser UI comes up with the relay already available.

About

gnostr:a git+nostr workflow utility

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Rust 55.3%
  • C 20.3%
  • JavaScript 10.0%
  • Swift 3.9%
  • CSS 3.3%
  • Less 2.0%
  • Other 5.2%