Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ anyhow = "1"
thiserror = "1"
chrono = { version = "0.4", features = ["clock"] }
tuirealm = { version = "3", features = ["crossterm"] }
serde_json = "1"

[dev-dependencies]
tempfile = "3"
Expand Down
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,37 @@ cargo install --path .

irona scans your home directory for build artifact folders and shows their size. Select what you want to clean up and press `d` to delete.

### MCP server

irona can also run as a stdio [Model Context Protocol](https://modelcontextprotocol.io) server for AI tools:

Install irona and make sure Cargo's bin directory is on your `PATH`:

```bash
cargo install irona-cli
export PATH="$HOME/.cargo/bin:$PATH"
```

Using `irona` from `PATH` keeps MCP client configs portable and avoids hardcoding a local binary path such as `/home/alice/.cargo/bin/irona`.

```json
{
"mcpServers": {
"irona": {
"command": "irona",
"args": ["--mcp"]
}
}
}
```

The MCP server exposes two tools:

| Tool | Description |
|---|---|
| `scan_artifacts` | Scan a path and return artifact directories with sizes and detected language/source |
| `clean_artifacts` | Delete a provided list of artifact directories and return per-path results plus freed bytes |

## Supported Languages

| Language / Ecosystem | Marker file(s) | Artifact folder(s) |
Expand Down
9 changes: 9 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
mod components;
mod deleter;
mod errors;
mod mcp;
mod model;
mod render;
mod scanner;
Expand Down Expand Up @@ -28,12 +29,20 @@ use tuirealm::{
#[derive(Parser)]
#[command(name = "irona", about = "Reclaim disk space from build artifacts")]
struct Args {
/// Run irona as a Model Context Protocol server over stdio.
#[arg(long)]
mcp: bool,

#[arg(default_value = ".")]
path: PathBuf,
}

fn main() -> Result<()> {
let args = Args::parse();
if args.mcp {
return mcp::run();
}

let root = args.path.canonicalize().unwrap_or(args.path);

let original_hook = std::panic::take_hook();
Expand Down
Loading