# Quickstart

Install the CLI, sign in, create or push a repository, open your first pull request and find where to go next.

You need a Sailfork account and git. Everything below also works with plain git and the website. The `sailfork` command saves the steps in between.

```sh
curl -fsSL https://sailfork.com/install | sh
sailfork auth login
sailfork repo create tide-chart --about "Tide tables as a chart"
```

Those three commands give you the CLI, a signed-in terminal and an empty repository. The sections below explain each step and finish with a pull request.

## Install the CLI

One command puts a single binary in `~/.local/bin` after checking its SHA-256. It works on macOS and Linux, on x86_64 and arm64, and needs no sudo.

```sh
curl -fsSL https://sailfork.com/install | sh
```

On Windows, run `irm https://sailfork.com/install.ps1 | iex` in PowerShell. You can read the script first at [https://sailfork.com/install](https://sailfork.com/install). Homebrew, updates and uninstalling are in [Install the CLI](https://sailfork.com/docs/install).

## Sign in

```sh
sailfork auth login
```

This opens the browser. Approve once and the terminal is signed in. On a machine with no browser, `sailfork auth login --device` prints a code to approve at `https://sailfork.com/device`.

Sign-in also makes `sailfork` git's credential helper, so `git push` and `git pull` never ask for a password. If you skipped that with `--no-git`, or another helper answered first, run `sailfork auth setup-git` to do it. `sailfork whoami` shows who you are, and `sailfork doctor` checks the whole setup.

No account yet? Create one at [https://sailfork.com/sign-up](https://sailfork.com/sign-up), or sign in with GitHub, then run the commands above.

## Create a repository

```sh
sailfork repo create tide-chart --about "Tide tables as a chart"
```

The repository is private unless you pass `--public`. To create it in an organization you belong to, name it `org/name`. You can also use the form at `https://sailfork.com/new`. See [Repositories](https://sailfork.com/docs/repositories).

Push an existing project to it. The address is `https://git.sailfork.com/<you>/tide-chart.git`, and the **Clone** box on the repository page shows it.

```sh
git remote add origin https://git.sailfork.com/<you>/tide-chart.git
git push -u origin main
```

To work on a repository that is already on Sailfork, clone it instead:

```sh
sailfork repo clone <owner>/<repo>
```

For SSH, access tokens and what a push can refuse, see [Git over HTTPS and SSH](https://sailfork.com/docs/git-access).

## Open a pull request

Commit on a branch, then open the pull request from the same folder. `pr create` pushes the branch first.

```sh
git switch -c tide-fix
git commit -am "Fix the tide math"
sailfork pr create --title "Fix the tide math"
```

The command prints the pull request's number and address. Add `--fill` to take the title and description from your commits, `--draft` to open it as a draft, and `--reviewer <handle>` to ask someone to review it. When the review and checks are done, merge it:

```sh
sailfork pr merge
```

`pr merge` with no number merges the pull request for the branch you are on. Add `--auto` to have the server merge when the checks pass, or `--method squash` to choose how the commits land. A repository can require approvals and passing checks first: see [Branches and protection](https://sailfork.com/docs/branches).

## Next steps

- Understand the pieces: [How Sailfork works](https://sailfork.com/docs/concepts).
- Run your tests on every push: [CI](https://sailfork.com/docs/ci).
- Let an agent make the change without a clone: [Caissons](https://sailfork.com/docs/caissons).
- Connect an AI assistant to your repositories: [MCP server](https://sailfork.com/docs/mcp).
- Bring your GitHub repositories over: [Move from GitHub](https://sailfork.com/docs/migrate).
- Publish a version with files to download: [Releases](https://sailfork.com/docs/releases).
- See every command: [the CLI guide](https://sailfork.com/cli), or `sailfork --help`.

---

Every docs page: https://sailfork.com/llms.txt
