Getting started with Porjay

This guide takes you from nothing to sharing code, then covers daily work. Commands are the same on Linux and macOS.

1. Install

$ curl -fsSL https://porjay.labmirai.org/install.sh | sh

See Install Porjay for manual downloads and building from source.

2. Create an account and a repository

Sign up with a username, email and password, then open the link we email you. Next, use New repository. Your project lives at https://porjay.labmirai.org/you/project.

3. Clone and commit

Cloning copies the whole project, history included, and opens a working folder. Put your username in the address so Porjay can push for you; it asks for your password once and can remember it.

$ porjay clone https://[email protected]/you/project
$ cd project
$ porjay user default you
$ porjay add notes.md
$ porjay commit -m "First notes"

porjay user default makes your check-ins show your Porjay username. Commits sync to the server automatically while you’re online (this is called autosync). Offline, keep committing and run porjay push later.

4. Daily work

  • porjay status shows what changed; porjay diff shows how.
  • porjay add FILE tracks new files; porjay addremove adds every new file and forgets deleted ones.
  • porjay commit -m "Message" saves all changes to tracked files. There is no staging step.
  • porjay update pulls others’ work and updates your folder.
  • porjay timeline lists recent check-ins.
  • porjay revert FILE throws away local edits; porjay undo reverses the last update, merge or revert.

5. Branches and merging

$ porjay commit --branch idea -m "Try a new layout"
$ porjay update trunk
$ porjay merge idea
$ porjay commit -m "Merge idea"

The main branch is called trunk. porjay branch list shows all branches.

6. The web interface

Every repository has a web interface with its timeline, files, wiki, tickets and forum. Open https://porjay.labmirai.org/user/project in your browser, or run a private copy on your own computer:

$ porjay ui

7. Sharing and collaborators

  • Public repositories can be browsed and cloned by anyone. Only people you add can push.
  • To add a collaborator, open your repository, log in with your Porjay username and password, then go to Admin, then Users, and add them with the Developer role.
  • Private repositories ask everyone to log in before showing anything.
  • If you reset your Porjay password, your repositories switch to the new one. On each computer, run porjay remote scrub and then porjay sync, enter the new password, and answer y to remember it.

8. Coming from git

gitporjayWhat it does
git initporjay init NAME.porjayCreate a new repository file, then open it.
git clone URLporjay clone URLCopy a repository and open a working folder.
git add FILEporjay add FILEStart tracking a file. There is no staging step.
git commit -am MSGporjay commit -m MSGSave every changed tracked file as a new stage.
git pushporjay pushSend your stages to the server (commit does this automatically).
git pullporjay updatePull new stages and bring your folder up to date.
git statusporjay statusSee what changed in your folder.
git logporjay timelineList recent check-ins, newest first.
git diffporjay diffShow line-by-line changes.
git switch -c NAMEporjay commit --branch NAMEStart a branch with your next commit.
git switch NAMEporjay update NAMEMove your folder to another branch.
git stashporjay stashSet changes aside and get them back later.
git restore FILEporjay revert FILEThrow away local edits to a file.
git rm / git mvporjay rm / mvRemove or rename tracked files.
git tag NAMEporjay tag add NAME currentName a check-in.
(none)porjay uiOpen the full web interface for your repository locally.

To convert a git project with its history:

$ git fast-export --all | porjay import --git project.porjay

9. Getting help

Run porjay help for all commands, or porjay help commit for one. Porjay is built on Fossil, so Fossil’s documentation applies too: read fossil as porjay.