Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for toml configuration files + recursive flag definitions for subcommands #827

Merged
merged 3 commits into from
May 19, 2023

Conversation

anarcher
Copy link
Contributor

@anarcher anarcher commented May 17, 2023

Description

ffcli can take arguments to a config file and process them as follows (available with arguments)
IMHO, I think this is useful if you have a lot of arguments, like the gnokey cli. Unlike ENV, it is explicit e.g.-config=maketx.local

gnokey maketx call -config ./maketx.local.toml  -pkgpath "gno.land/r/demo/boards" -func "GetBoardIDFromName" -args test anarcher

maketx.local.toml

gas-fee = "1000000ugnot"
gas-wanted = 2000000
broadcast = true
chainid = "dev"
remote = "127.0.0.1:26657"

Contributors Checklist

  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests

Maintainers Checklist

  • Checked that the author followed the guidelines in CONTRIBUTING.md
  • Checked the conventional-commit (especially PR title and verb, presence of BREAKING CHANGE: in the body)
  • Ensured that this PR is not a significant change or confirmed that the review/consideration process was appropriate for the change

Copy link
Contributor

@jaekwon jaekwon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not as familiar with ffcli, so I'll leave to others to consider the ramifications.

@github-actions github-actions bot added the 📦 🌐 tendermint v2 Issues or PRs tm2 related label May 18, 2023
@moul
Copy link
Member

moul commented May 19, 2023

Related with #762
Addresses #731

This was referenced May 19, 2023
@moul moul changed the title chore: cli options for config chore: add support for toml configuration files + recursive flag definitions for subcommands.= May 19, 2023
@moul moul changed the title chore: add support for toml configuration files + recursive flag definitions for subcommands.= feat: add support for toml configuration files + recursive flag definitions for subcommands. May 19, 2023
@moul moul changed the title feat: add support for toml configuration files + recursive flag definitions for subcommands. feat: add support for toml configuration files + recursive flag definitions for subcommands May 19, 2023
@moul moul merged commit f1e8598 into gnolang:master May 19, 2023
66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🌐 tendermint v2 Issues or PRs tm2 related
Projects
Status: No status
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants