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

Quality of life CLI options --config-file & --ignore-plugin-network #3337

Open
ixje opened this issue Jun 15, 2024 · 4 comments
Open

Quality of life CLI options --config-file & --ignore-plugin-network #3337

ixje opened this issue Jun 15, 2024 · 4 comments
Labels
Backlog Backlog issues and PRs discussion Initial issue state - proposed but not yet accepted

Comments

@ixje
Copy link
Contributor

ixje commented Jun 15, 2024

Summary or problem description
Switching between networks with neo-cli has always been a hassle because

  1. it automatically reads from config.json
  2. most plugins equally have a config.json in which a Network field is defined that must match the global config.json

This means that every time you wish to switch you must update the global config.json and all plugin config files, or duplicate the whole setup in another directory. Compare this to neo-go where you can specify a config file and the rest just works.

Do you have any solution you want to propose?
I want to propose 2 command line options

  1. --config-file allows you to override which file is loaded as the global config
  2. --ignore-plugin-network allows you to ignore the Network field check e.g.
    if (system.Settings.Network != Settings.Default.Network)
    return;

If the options are omitted the old behaviour will be used.

Where in the software does this update applies to?

  • CLI
  • Plugins
@ixje ixje added the discussion Initial issue state - proposed but not yet accepted label Jun 15, 2024
@cschuchardt88
Copy link
Member

The current CLI can't do this at the moment. Environment.CommandLine won't work in plugins either. But will be noted.

@ixje
Copy link
Contributor Author

ixje commented Jun 16, 2024

Apparently --config was already added and I didn't realize it.

new Option<string>(new[] { "-c", "--config","/config" }, "Specifies the config file."),

So that leaves --ignore-plugin-network

@Jim8y
Copy link
Contributor

Jim8y commented Jun 16, 2024

console command currently only work on cli itself. ww can mark this and add it before the next version.

@cschuchardt88
Copy link
Member

All plugins will need to be updated as well.

@cschuchardt88 cschuchardt88 added the Backlog Backlog issues and PRs label Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backlog Backlog issues and PRs discussion Initial issue state - proposed but not yet accepted
Projects
None yet
Development

No branches or pull requests

3 participants