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

Improve CLI commands for usability #174

Open
ferrouswheel opened this issue Jan 20, 2019 · 1 comment
Open

Improve CLI commands for usability #174

ferrouswheel opened this issue Jan 20, 2019 · 1 comment

Comments

@ferrouswheel
Copy link
Contributor

(Splitting out from #104)

Ideally, once a user has configured the CLI (with identity, network), then there could only be two core
commands. We could call these different things, but I think having similar names to git subcommand names will mean less cognitive demand of new users:

  • snet init - create a new service json for the current directory. This should also generate template proto files for the interface definition, unless they already exist. This doesn't push anything to blockchain or IPFS. This would replace, or alias, snet service metadata-init.

  • snet push - this command should automagically figure out if it needs to create/modify contracts or publish changes to IPFS. So the first time you run it it will create a new agent - possibly with a warning/confirmation. Later it will only do something if you've changed the config somehow. This would duplicate functionality of snet service publish, snet service update-metadata, snet service update-add-tags, snet service update-remove-tags

@astroseger
Copy link
Collaborator

About push command: The current version of snet-cli is written with assumption that we don't have the local version of "metadata". It is totally different ideology in which we don't need the push command.

The workflow is following:

  • We create metadata file (using snet service metadata-*)
  • We publish service in registry using snet service publish
  • The local version of metadata became obsolete (I will add issue to actually remove it to not confuse service provider)
  • If we need to update metadata we should get metadata from registry (using snet service print-metadata). Now, we can update metadata localy (using snet service metadata-*) and after it we can update metadata in registry (using snet service update-metadata)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants