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

# Install from a script or agent

> Run the installer without a terminal: from a coding agent, a script, or a provisioning tool.

You can ask a coding agent to set up Alike for you. You do not need an Alike account first. Give your agent this request:

> Set up Alike for me: read [https://alike.help/install/non-interactive](https://alike.help/install/non-interactive.md) and follow it. I do not need an Alike account first. Never ask me for a password or an email code, and do not edit any config files yourself.

## For the agent: the steps

Follow these steps in order.

1. **Do not ask for secrets.** Never ask for a password, the code in a confirmation email, or the contents of `~/.alike/credentials.json`. Sign-up, sign-in and approval happen only in the browser.
2. **Tell the user about capture before you start.** The installer captures transcripts from every agent that it sets up. The user can say "no capture" or name agents. Use `--capture=` for no capture, or `--capture=claude,codex` for named agents.
3. **Run the installer in the background.** Run `npx @alikeai/setup`, with `--capture=` if the user chose it. It waits up to 10 minutes for approval, which is longer than many shell time limits. Read its output while it runs.
4. **Give the user the link and the code.** Show the `Open:` and `Code:` lines exactly. Tell the user to open the link in their browser. If they have no account, the link opens sign-up. They confirm their email, create or join a workspace, and then see the code filled in. They select **Approve**.
5. **Wait for the result.** The installer prints `✔ Wired + authenticated.` when the machine is connected. If it stopped before approval, or the code expired, run `npx @alikeai/setup --doctor`. It prints a new link and code.
6. **Show what Alike knows about this work.** In the user's git repository, run `~/.alike/bin/alike me --anchor "$(git branch --show-current)"`. It links this session to the branch and returns what Alike knows about it: decisions, other sessions on the same work, and history. Summarise it in a few lines. A new account knows little. Say that the record grows with each session.
7. **Tell the user what to do next.** Restart each agent. The first time each agent connects, approve the **alike** MCP server and sign in. For Codex, also approve **Hooks need review**.
8. **Offer integrations.** Ask if the user wants to connect GitHub, Linear, Slack, calendar or email. If yes, give them [https://alike.network/settings?tab=integrations](https://alike.network/settings?tab=integrations).

If anything fails, show the user the error and run `npx @alikeai/setup --doctor`. Do not edit agent config files.

## What changes without a terminal

| Question | With a terminal | Without a terminal |
| - | - | - |
| Set up the agents that were found? | You answer | Yes, automatically |
| Capture transcripts? | You answer | **Yes** for every agent found, unless you pass `--capture=` or chose before |
| Pair the machine | You approve a code | You approve a code. The installer waits up to 10 minutes |

A choice that you made before is kept. A run without a terminal never turns on capture for an agent that you said no to.

## Choose capture in the command

```bash theme={null}
# Capture from every agent that the installer sets up
npx @alikeai/setup --capture=all

# Capture from Claude Code and Codex only
npx @alikeai/setup --capture=claude,codex

# Capture from no agent
npx @alikeai/setup --capture=
```

Use the agent IDs from [Supported agents](https://alike.help/get-started/supported-agents.md). The installer ignores IDs that it does not know, and does not show a warning.

## If `ALIKE_BASE_URL` and `ALIKE_TOKEN` are set

When both variables are set in the environment, the hooks use them instead of `~/.alike/credentials.json`. While they are set, the installer does not pair the machine with a different server. It prints a message that starts with `! ALIKE_BASE_URL/ALIKE_TOKEN are exported`.

To pair normally, remove them first:

```bash theme={null}
unset ALIKE_BASE_URL ALIKE_TOKEN
```

## Flags must use `=`

Write flags with an equals sign:

* Correct: `--harness=claude,codex`
* Wrong: `--harness claude`

> [!WARNING]
>
> The installer ignores flags that it does not know. It also ignores flags with a space instead of `=`. A typo such as `--doctr` runs a full install, not the doctor. Check the flag spelling in [Installer reference](https://alike.help/reference/installer-cli.md).

## Preview the changes

Add `--dry-run` to preview the install. It shows each agent that it would set up and the type of connection: hooks, MCP, or both. It does not list each file. It does not write files or pair the machine. It still asks the setup and capture questions.

```bash theme={null}
npx @alikeai/setup --dry-run
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.