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

Interaction between CLI and Server #6

Closed
joepio opened this issue Sep 10, 2020 · 4 comments
Closed

Interaction between CLI and Server #6

joepio opened this issue Sep 10, 2020 · 4 comments

Comments

@joepio
Copy link
Member

joepio commented Sep 10, 2020

The CLI and Server both use the same atomic_lib library. Currently, both even use the same store. Both can write to the local store directly. Since they both require a file lock, this means that you can't run the server and the CLI from the same machine. That makes the CLI pretty much useless.

I think the CLI should be a companion tool, which does not use local storage. This means that running the delta command, for example, should change deltas on the server. To do this, the CLI should be linked to a specific server. This means the CLI needs some setup and authentication.

The Server has no authentication at this point (and no write capabilities at all), but I'm expecting to implement OAuth / OIDC sometime in the future. The CLI might get a token using this process, and store that in the config folder (combined with the server URL) for future use.

@joepio
Copy link
Member Author

joepio commented Sep 16, 2020

Besides storing personal data, it might make sense to use the Server as a personal cache for data that you use.

The CLI setup process could be initiated when a write command new or delta is called.

We might need a different Storelike implementation for the CLI, since mutations are to be executed somewhere else.

@joepio
Copy link
Member Author

joepio commented Sep 23, 2020

Relates to authentication #13

@joepio
Copy link
Member Author

joepio commented Oct 31, 2020

One of the things that I want to do, is edit some existing field. But what kind of behaviour would make most sense in a CLI setting?

  • Set the new stringified content in your cli command: atomic-cli set myresource someprop somenewval. Seems kind of inconvenient, but easy to build. I could add set, destroy and remove methods - same as in Commits.
  • Select a property, open your favorite text editor, save and exit! A commit will be dispatched. Here's some thoughts on how to do that.-
  • Select a resource, show some fancy form-editor like GUI and edit things. Less cli-like, but probably powerful
  • Atomic Console! Maybe even allow for some cool ORM-like syntax mything.set(description, "hi there")

joepio added a commit that referenced this issue Nov 22, 2020
joepio added a commit that referenced this issue Nov 22, 2020
joepio added a commit that referenced this issue Nov 23, 2020
@joepio
Copy link
Member Author

joepio commented Nov 23, 2020

Added some cool stuff to the CLI, and hid non-functioning commands that don't interact with server yet:

@joepio joepio closed this as completed Dec 26, 2020
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

1 participant