# Getting started

This assumes you have [installed](installing.md) the client and there is a
gateway to talk to. If there is not, [run one](self-hosting.md) first — it
takes about a minute.

## Point the client at a host

```sh
otisk host set git@git.otisk.dev
otisk whoami
```

```
yuritomanek (1 key(s))
```

If `whoami` names you, your key is registered and everything else will work.
If it does not, the host has no record of your key, and someone with access to
that host has to add it — that is the one thing you cannot do for yourself.

If you use a non-default key or SSH options, otisk honours
`OTISK_SSH_COMMAND` and falls back to `GIT_SSH_COMMAND`, so a setup that
already works for `git` needs no second configuration.

## Create a repository and push to it

```sh
otisk repo create notes

mkdir notes && cd notes
git init -b main
echo "# notes" > README.md
git add . && git commit -m "first"
git remote add origin ssh://git@git.otisk.dev/yuritomanek/notes.git
git push origin main
```

A path is `owner/name`, or just `name` for your own.

## Clone it back

From somewhere other than the directory you just pushed from:

```sh
cd ..
otisk clone yuritomanek/notes roundtrip
git -C roundtrip log --oneline
```

`otisk clone` is `git clone` with the URL worked out for you.

## What next

Pushing to `main` directly works and always will. But otisk's reason for
existing is the other way of working: one commit per change, amended rather
than piled on, reviewed and landed. [Concepts](concepts.md) says why, and
[reviewing](reviewing.md) is how. Between them they are worth ten minutes.

Everything the client does is also an ssh command you can type by hand:

```sh
ssh git@git.otisk.dev otisk repo list
```

The client is a convenience, not a requirement.
