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

Add a specification document #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions doc/specification.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Specification
=============

The goal of rayr is to have various *sources* (local folders) synchronized with *destinations* - or remotes (public or private repositories hosting servers).
When we talk about synchronization, it is a stateless sync, ala rsync or rclone. The tool has no memory of what the previous synchronization did.
However, it will do its best to put both ends at the same state, repository wise.

As such, we can base some of the way to interact with rayr as with rsync or rclone.

Repositories format
-------------------

For now, rayr only deals with git repositories. It should be fairly easy, and desirable, to add mercurial to the list. Other SCMs could be added, provided they have a similar push/pull paradigm and some online servers supports them.

Providers
---------

The following providers will be supported
* Github
* Gitlab
* Bitbucket
* Gogs and Gitea

We possibly could support Rhodecode in the community edition variation.

Configuration format
--------------------

[This is a proposal and not the current way of configuration]
Configuration should done in a format that is human readable, such as json, yaml, or config file format.
Configuration should also be doable with the tool itself, upon invoking ``rayr config``

We should display current remotes and a way to add, modify and delete a remote.

Remotes have short names that allow the user to remember them. In a classic scenario, we can provide reasonable defaults (such as ``github``, ``gitlab`` and so on).

Authentication
--------------

Most providers provide two ways to authenticate. With OAuth or with application password. As **rayr** is open source, it cannot embed its own set of credentials.
Therefore, the user must provide them. Alternatively, we can ask the user to provide an application password for the providers that supports them.

Synchronization
---------------

We can synchronize with the following command:

.. code:: bash

rayr sync <localfolder> <remotename>
rayr sync <remotename> <localfolder>


Options
-------

We should support classic options: log location, verbosity, config file location override.