Command Palette

Search for a command to run…

ZarynZaryn
Getting started·4 min read

Share your work on Zaryn

Sign in, put a project on Zaryn, clone someone else's, and keep everyone in sync with push and pull.

Your commits live on your computer until you **push** them. Pushing sends them to Zaryn, where others can see them, clone the project, and send their own work back. **Pull** brings their new commits to you. ## Sign in (once per computer) **New to Zaryn?** Create an account from inside any zev project folder: ```bash zev login zaryn.xyz --register your-username --email you@example.com ``` zev emails you a 6-digit code. Type it when asked. If you closed the terminal before the code arrived, finish later with: ```bash zev login zaryn.xyz --register your-username --code 123456 ``` **Already have an account** (made on the website)? Sign in through your browser: ```bash zev login zaryn.xyz --device ``` zev prints a link and a code. Open the link, check that the code matches, choose what this computer may do, and approve. Check who you are signed in as, or sign out: ```bash zev whoami zev logout ``` Your sign-in is saved in `~/.config/zev/credentials`, readable only by you. Every zev command uses it, so you never paste tokens. ## Put a project on Zaryn From your project folder: ```bash zev new ``` ```text Repository name: notes What kind of repository is this? 1) code 2) model 3) dataset 4) agent 5) topology Visibility? 1) public 2) private License? 1) MIT 2) Apache-2.0 3) GPL-3.0 4) BSD-3-Clause 5) Unlicense 6) None ``` `zev new` creates the repository on Zaryn and saves its address as a **remote** called `origin`. Then send your commits: ```bash zev push ``` With nothing after it, `zev push` sends the branch you're on to `origin`. Your project is now at `https://zaryn.xyz/your-username/notes`. ## Get a copy of a project (clone) ```bash zev clone someone/their-project cd their-project ``` `zev clone` makes a folder named after the project, downloads its full history, puts the files in place, and sets `origin` to where it came from. Add a folder name to put it somewhere else, or `--branch` to start on another branch: ```bash zev clone someone/their-project my-copy --branch dev ``` Every repository page on Zaryn shows its clone command, ready to copy. Clones and pulls download in batches: a few requests carry the whole history (four at a time for large repositories), and every file is checked against its hash before it's kept. Large files come in chunks, and a later pull downloads only the chunks that changed. Private repositories need you to be signed in with access to them. ## Stay up to date (pull) ```bash zev pull ``` `zev pull` downloads new commits on your branch from `origin` and updates your files to match. zev never overwrites work you haven't committed. If a file you've changed would be replaced, `zev pull` changes no files and tells you which file is in the way. The new commits are still saved, so nothing is lost. Commit or stash your changes, then run `zev checkout <branch>` to bring your files up to date. ## The team routine When several people work on one project, this order avoids most trouble: ```bash zev pull # 1. get everyone's latest work # ...edit files... zev add . zev commit -m "What you did" # 2. save your work zev pull # 3. get anything new since step 1 zev push # 4. share ``` If someone else pushed while you were working, pull before you push (step 3): `zev pull` brings their commits in and updates your files, and then your push goes on top of them. For bigger changes, work on a [branch](/docs/en/branches) and open a pull request with `zev pr`, so teammates can review before it goes into `main`. ## Remotes A *remote* is a named address of another copy of the repository. `zev new` and `zev clone` set up `origin` for you. To see or change remotes: ```bash zev remote # list them zev remote add upstream team/project zev remote show upstream zev remote remove upstream ``` Push or pull a particular remote and branch by naming them: ```bash zev push upstream feature-x zev pull upstream main ``` ### Addresses | Address | Means | |---|---| | `owner/repo` | a repository on Zaryn | | `owner/repo@dev` | ... on its `dev` branch | | `https://zaryn.xyz/owner/repo` | the link from your browser: any page of the repository works, and `?branch=` is kept | | `example.com/owner/repo` | a repository on another zev server, by its website | | `localhost:8090/owner/repo` | a zev server of your own (a port means plain HTTP) | | `file:///home/me/backup` | another folder on this computer | | `ipfs://<cid>` | a published snapshot on IPFS | `zev push`, `zev pull` and `zev clone` work with all of them. (SSH addresses are not supported yet.) ## Servers, CI and AI agents Machines without a person at the keyboard can't type an email code. Use the device flow, which you approve in your browser, and give the token only the permissions it needs: ```bash zev login zaryn.xyz --device --client "build server" ``` Or put a token in the `ZEV_TOKEN` environment variable (and the server in `ZEV_SERVER`). Settings → AI agents and tokens on Zaryn lists every token and lets you revoke one at any time. See [Scripting and AI agents](/docs/en/automation-and-agents).