feat(contribs): add gnopie - httpie-inspired CLI for gno.land#5444
Draft
feat(contribs): add gnopie - httpie-inspired CLI for gno.land#5444
Conversation
gnosh wraps gnokey as a Go library to provide a better day-to-day CLI experience for interacting with gno.land chains. Initial commands: - call: execute realm functions with auto-gas estimation - query: read-only qeval/render queries - version: print version info Features: --dry-run, --generate-gnokey, --json output, auto-gas.
Collaborator
🛠 PR Checks SummaryAll Automated Checks passed. ✅ Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):No automated checks match this pull request. ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
gnopie provides an opinionated, httpie-style interface for gno.land chains. Replaces the earlier gnosh prototype with a cleaner verb-based API. Verbs: GET (default, smart dispatch), EVAL, READ, INSPECT, CALL, RUN. Features: domain-based remotes, auto-gas, --dry-run, --generate-gnokey, --json output, shell completion (bash/zsh/fish).
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Replace hardcoded remotes with gnoconnect discovery: gnopie fetches the domain's gnoweb homepage and reads <meta name="gnoconnect:*"> tags to find RPC endpoint and chain ID. Results are cached locally for 24h. This removes the remotes subcommand entirely — no manual config needed.
- GET on realm now calls Render("") by default (like gnoweb)
- Pasting gnoweb URLs works: https://gno.land/r/gnoland/blog:p/beta-mainnet
- Strip https://, #fragments, handle $source/$help modifiers
- $source&file=admin.gno reads specific file
- $help#func-Name shows specific function signature
- /u/moul and /u/g1addr user lookup via r/sys/users
- g1... bare addresses show account info
- : separator now means render path (matching gnoweb)
15 tests covering all verbs against a real in-memory gno node: - GET (Render, render path, gnoweb URLs with fragments) - EVAL (function call, crossing function auto-inject) - READ (function source, file) - INSPECT (realm, network) - CALL (increment counter, verify state, generate-gnokey) - RUN (increment counter via maketx run, crossing auto-inject) - JSON output, address inspection Also fixes RUN to auto-inject `cross` for crossing functions in generated code.
28 table-driven test cases run twice (fresh + cached) against an in-memory node, plus 5 stateful tests for CALL/RUN mutations. Tests cover: GET (render, gnoweb URLs, address), EVAL, READ (source, file), INSPECT, JSON output, debug output, --print-gnokey-command, error cases. Stateful tests verify counter increment via CALL and RUN.
…password - INSPECT now shows Functions + Variables + Constants by default - Files only shown with --all flag - --dry-run no longer prompts for password (shows what would be sent) - Fix test names: default verb tests don't say "GET"
- Gas estimation buffer reduced from 50% to 20% (configurable) - gnopie config set gas-buffer=30 to change - Fix lint: remove unused functions, use tagged switch - Clarify query cache: only source code and function signatures cached
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gnopie — like httpie, but for gno.land
What
An opinionated CLI that wraps
gnokeyas a Go library with an httpie-inspired verb-based API.How
<meta name="gnoconnect:rpc">from domain — no config neededcrossauto-injected for realm functionshttps://,:renderpath,$source,$help)gnopie config set key=moul: Persist default signing keyTests
61 tests total:
gnovm/cmd/gno/run_test.gostyleTest plan
make installbuildsmake test— 61 tests passAI-assisted PR (Claude Code).