magi-code 0.63.0

Repository-aware CLI coding agent for terminal work
Documentation
# Installation and updates

[Feature docs index](README.md) · [Repository README](../../README.md)

## Purpose

Install, run, and manually update `magi-code` from crates.io, a source checkout, or a GitHub release tag.

## Requirements

- Rust 1.88.0+ toolchain with Cargo: <https://rustup.rs/>
- Network access for live provider calls.
- Credentials for at least one provider:
  - ChatGPT/Codex OAuth for `openai-codex`;
  - or a configured OpenAI-compatible custom provider.
- Content search is in-process; external `rg`/ripgrep is not required for `ffgrep`.

Check your local tools:

```sh
rustc --version
cargo --version
rg --version   # optional
```

## Quick start

```sh
git clone https://github.com/magimetal/magi-code.git
cd magi-code
cargo build
cargo run --bin magi-code -- --help
```

Start an interactive shell through Cargo:

```sh
cargo run --bin magi-code --
```

Authenticate from the interactive shell:

```text
/login openai-codex
```

Run a script-safe one-shot prompt:

```sh
cargo run --bin magi-code -- --print "Summarize this repository."
```

Launch Mission Control:

```sh
cargo run --bin magi-code -- --tui
```

## Install and run

### Run through Cargo

```sh
cargo run --bin magi-code
cargo run --bin magi-code -- --print "Find the main entrypoints."
cargo run --bin magi-code -- --tui
```

A trailing prompt without `--print` uses the same one-shot print path:

```sh
cargo run --bin magi-code -- "Summarize the current directory."
```

### Run a built binary

```sh
cargo build
./target/debug/magi-code

cargo build --release
./target/release/magi-code
```

### Install from this clone

```sh
cargo install --path . --locked
magi-code
```

Make sure Cargo's bin directory is on `PATH`:

```sh
export PATH="$HOME/.cargo/bin:$PATH"
```

### Install from crates.io

After first publication, install exact version:

```sh
cargo install magi-code --version X.Y.Z --locked
```

Update by choosing and reinstalling an exact version:

```sh
cargo install magi-code --version X.Y.Z --locked --force
```

Publication and updates are manual operator actions. `magi-code` has no self-update command and does not access Cargo credentials.

### Install from GitHub

GitHub tags remain release references and source-install fallback:

```sh
cargo install --git ssh://git@github.com/magimetal/magi-code.git --tag vX.Y.Z --locked magi-code
```

Do not use `main` as normal install target.

For a moving development snapshot:

```sh
cargo install --git ssh://git@github.com/magimetal/magi-code.git --branch main --locked --force magi-code
```

### Recommended aliases

```sh
alias mc='magi-code'
alias mcp='magi-code --print'
alias mcc='magi-code --continue'
```

For a checked-out development copy that you do not want to install:

```sh
alias magi-code-dev='cargo run --manifest-path /absolute/path/to/magi-code/Cargo.toml --bin magi-code --'
```

Use it from any repository:

```sh
magi-code-dev
magi-code-dev --print "Summarize this repo."
```

---

[Back to feature docs](README.md) · [Back to repository README](../../README.md)