# How to install IMI

IMI is a single Rust binary with no runtime dependencies. It installs in under 10 seconds and creates a `.imi/state.db` SQLite database in your project root. No cloud account. No API key. Works offline.

Website: https://useimi.com
npm: https://www.npmjs.com/package/imi-agent
GitHub: https://github.com/ProjectAI00/imi-agent

---

## Option 1 — bunx (fastest)

```bash
bunx imi-agent
```

Downloads the binary and runs `imi init` in the current directory. Requires [Bun](https://bun.sh) to be installed.

---

## Option 2 — npx

```bash
npx imi-agent
```

Same result as bunx. Use this if you have Node.js but not Bun.

---

## Option 3 — curl

```bash
curl -fsSL https://aibyimi.com/install | bash
```

Direct binary install. Places the `imi` binary in `~/.local/bin`.

Add `~/.local/bin` to your `$PATH` if needed:

```bash
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc
```

For bash users:
```bash
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc
```

---

## Verify the install

```bash
imi context
```

If IMI is installed and initialized, this outputs the current project state — goals, decisions, direction notes, and in-progress tasks. An empty output means the project has no state yet. Start by adding a goal:

```bash
imi goal "my-first-goal" "description of what we're building" 2 "why this matters" "who it's for" "observable done condition"
```

---

## Connect IMI to your agent

### Claude Code

```bash
/plugin marketplace add ProjectAI00/imi-agent
/plugin install imi
```

Auto-injects `imi context` output at the start of every Claude Code session.

### GitHub Copilot CLI

```bash
/plugin marketplace add ProjectAI00/imi-agent
/plugin install imi
```

Or install as a skill:
```bash
npx skills add ProjectAI00/imi-agent@imi
```

### Cursor

Add to `.cursorrules`:
```
At session start, before doing any work: run `imi context` and read the full output.
At session end: run `imi complete <task_id> "specific summary"` for any task finished.
For firm decisions made during the session: run `imi decide "what" "why"`.
```

### Any agent

Add to `AGENTS.md`, `CLAUDE.md`, or any agent instruction file:
```
Session start: run `imi context` before touching any file.
Task completion: run `imi complete <task_id> "what was built, what was learned"`.
Decisions: run `imi decide "what" "why"` for any firm architectural call.
Observations: run `imi log "note"` for anything worth remembering.
```

---

## Update IMI

```bash
imi update
```

IMI also checks for updates automatically once per day and installs silently in the background.

---

## What gets created in your project

```
.imi/
  state.db    ← SQLite database: goals, tasks, decisions, memories, lessons
```

**To share state across teammates and machines:** commit `.imi/` to your repo. Every engineer or agent that runs `imi context` on that repo reads the same state.

**To keep state local:** add `.imi/` to `.gitignore`.

---

## npm package details

Package name: `imi-agent`
Registry: https://www.npmjs.com/package/imi-agent
GitHub releases: https://github.com/ProjectAI00/imi-agent/releases

---

## Related

- [What is IMI?](https://useimi.com/docs/what-is-imi.md)
- [How to give Claude Code memory between sessions](https://useimi.com/docs/claude-code-memory.md)
- [How to give Cursor persistent context](https://useimi.com/docs/cursor-context.md)
- [How to give GitHub Copilot persistent context](https://useimi.com/docs/copilot-memory.md)
- [How to coordinate multiple AI agents](https://useimi.com/docs/multi-agent-coordination.md)
