---
title: "AI Shell · Marco Dong"
description: "AI Shell turns plain words into shell commands, runs the ones that only look, and stops before anything destructive."
canonical_url: "https://madong.me/shell"
meta:
  "og:description": "AI Shell turns plain words into shell commands, runs the ones that only look, and stops before anything destructive."
  "og:image": "https://madong.me/_og/s/o_add5d209e70c4283.png"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "AI Shell · Marco Dong"
  "twitter:image": "https://madong.me/_og/s/o_add5d209e70c4283.png"
---

> Index of every page on this site: [llms.txt](https://madong.me/llms.txt)

# AI Shell

Plain words in, a shell command out.

Type `?` and say what you want in ordinary words. AI Shell writes the command, and how much happens by itself depends on what the command would do.

## Looks, changes, can't be undone.

Each one as it lands on your line.

### Looks

A command that only reads runs straight away, the way it would if you'd typed it.

### Changes

One that deletes or overwrites lands on your line with a note saying what it would do, and waits for Enter.

### Can't be undone

One that's genuinely destructive explains itself and asks first. Saying yes only puts it on your line, so it takes two deliberate acts.

### One answer from a pipe

`ai -p` works like `claude -p`. Pipe in a staged diff and get a commit message back.

## A second model rates every command

Whether a command is dangerous is never a question put to the model that wrote it.

-
-
-
-

? find the five biggest files in here, skip node\_modules and .git

find . -type d \\( -name node\_modules -o -name .git \\) -prune -o -type f -exec stat -f '%z %N' {} + | sort -rn | head -5

safe

- Looks
- Changes
- Can't be undone

## The numbers

- \~25 ms to start
- 0 dependencies
- 82 offline tests
- 10 min of follow-up memory

## Questions

<details>

<summary>Does it run anything by itself?

</summary>

Only a command that just looks, the way it would if you'd typed it.

</details>

<details>

<summary>What leaves the machine?

</summary>

Your ask and a little context, with the history redacted of key shapes, auth headers and credentials in URLs.

</details>

<details>

<summary>What if the rating is wrong?

</summary>

A separate model rates every command, and the one that wrote it never does. When it can't answer, the command is treated as a change and waits. It's a seatbelt, not a locked door. Read what lands on your line.

</details>

<details>

<summary>Can I pipe into it?

</summary>

<code>ai -p</code> works like <code>claude -p</code>.

</details>

## Built with

TypeScript for the model calls and a small zsh widget for the Enter key. A separate model rates every command before you see it, so whether a command is dangerous is never a question put to the model that wrote it. The bundle has no dependencies and starts in about 25 milliseconds.

- TypeScript
- zsh

## Next

## Sidecar

Sidecar sits next to Claude Code. You review what it changed, line by line, and when you comment on a page it built, the comment lands back in the conversation.

[See Sidecar](https://madong.me/sidecar)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://madong.me/#website","@type":"WebSite","description":"Marco Dong, AI product engineer in Milan. I build AI products end to end: Sidecar, Sage and AI Shell at Cela, and agents at Klarna and Moneyfarm.","name":"Marco Dong","url":"https://madong.me/","publisher":{"@id":"https://madong.me/#identity"}},{"@id":"https://madong.me/shell#webpage","@type":"WebPage","description":"AI Shell turns plain words into shell commands, runs the ones that only look, and stops before anything destructive.","name":"AI Shell","url":"https://madong.me/shell","isPartOf":{"@id":"https://madong.me/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://madong.me/shell"]}]},{"@id":"https://madong.me/#identity","@type":"Person","jobTitle":"AI Product Engineer","name":"Marco Dong","url":"https://madong.me","address":{"addressLocality":"Milan","addressCountry":"IT"},"alumniOf":[{"@type":"CollegeOrUniversity","name":"University of Bologna"},{"@type":"CollegeOrUniversity","name":"Bologna Business School"}],"knowsLanguage":["it","en"],"sameAs":["https://www.linkedin.com/in/marcodong-838453","https://github.com/EthanITA"],"worksFor":{"@type":"Organization","name":"Klarna"}},{"@id":"https://madong.me/shell#/schema/software-application/1","@type":"SoftwareApplication","applicationCategory":"DeveloperApplication","description":"AI Shell turns plain words into shell commands, runs the ones that only look, and stops before anything destructive.","name":"AI Shell","author":{"@id":"https://madong.me/#identity"}}]}
```

## Sitemap

See the full [sitemap](https://madong.me/sitemap.md) for all pages.
