---
title: "Getting started"
description: "Install the maruhi CLI, connect it to a server, sign in, and push your first secret."
image: "https://maruhi.app/og.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://maruhi.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting started

## 1. Install the CLI

The recommended path is the install script (Linux and macOS; Bun is not required). Releases are pre-release tags until `v0.1.0`, so name the tag explicitly:

```sh
# Replace V with the latest tag on https://github.com/maruhiapp/maruhi/releases
V=<latest-tag>
curl -fsSL "https://raw.githubusercontent.com/maruhiapp/maruhi/${V}/packaging/install.sh" -o maruhi-install.sh
less maruhi-install.sh          # read the script before running it
sh maruhi-install.sh --version "${V}"
```

Other options — prebuilt binaries with checksums, Homebrew (from `v0.1.0`), and npm on Linux and macOS (`bun install -g maruhi@next`) — are described in the [README](https://github.com/maruhiapp/maruhi#install-cli), together with the install script's trust model.

## 2. Point the CLI at a server

```sh
maruhi config set server https://my.maruhi.app   # or the URL of your own deployment
```

## 3. Sign in

```sh
maruhi login
```

`maruhi login` opens your browser for a GitHub sign-in and shows a confirmation code in both places — compare them before approving. During the private preview, creating an account requires an invite code; see [how to get access](https://maruhi.app/#access) on the landing page.

The token is stored in the OS keychain. On a headless Linux box, in WSL, or in a dev container there may be no keychain yet and this command fails — [Keychain on Linux and in containers](https://maruhi.app/docs/linux-keychain) shows the five-line setup, and `maruhi agent -- bash` for a session that keeps the token and key in memory only.

## 4. Generate your keys (first time only)

```sh
maruhi key generate
```

This creates two keys: this device's key, which stays in this machine's keychain, and a reserve key that lives only in the recovery ledger, sealed with the recovery code the command shows. It runs on a human's machine. Keep the code somewhere safe: maruhi is zero-knowledge, so nobody can recover your key for you. A second machine does not get a copy: run `maruhi device add` there and approve it from this one — [Devices](https://maruhi.app/docs/devices) covers that, and [Recover your key](https://maruhi.app/docs/recover-your-key) covers the reserve key, the code, passkeys, and guardians (teammates who can help when every device is lost).

## 5. Create a project and push a secret

```sh
maruhi project init                               # prints the new project ID
maruhi config set defaultProject <project-id>     # the ID printed above
maruhi env create dev
maruhi config set defaultEnvironment dev
maruhi push DATABASE_URL        # reads the value from stdin
maruhi run -- your-command      # values arrive as environment variables
```

The two `maruhi config set` lines make that project and environment the defaults, so later commands need no `--project` or `--env`. `maruhi push` encrypts the value it reads from stdin before anything leaves your machine. `maruhi run` decrypts in memory and passes the values to `your-command` as environment variables. Nothing is written to disk.

> **Note**
>
> Commands that display plaintext values are refused when the CLI detects it is not attached to an
> interactive terminal, including inside AI agent environments.

## Next steps

Deploying to Cloudflare Workers, Vercel, or Netlify, or keeping a few GitHub Actions secrets in step with maruhi? [Deploy targets](https://maruhi.app/docs/deploy-targets) shows how to copy values there with `maruhi sync` and the platform's CLI or API. Running tests or deploys in GitHub Actions? [GitHub Actions](https://maruhi.app/docs/github-actions) shows how a job leases values with no secrets stored on GitHub. Working on a server, in WSL, or in a dev container where sign-in fails? [Keychain on Linux and in containers](https://maruhi.app/docs/linux-keychain) has the setup. Ready to share the project? [Invite a teammate](https://maruhi.app/docs/invite-a-teammate) walks through the invite link, and registering your key on GitHub with `maruhi key publish` so members can be added without a call.

Source: https://maruhi.app/docs/getting-started/index.mdx
