Skip to content

Repository files navigation

Mantis CLI

Spaces, maps, and MCP tools for AI coding agents, straight from your terminal.

Docs · npm · Get an API key · Issues

npm versionnpm downloadsNode ≥18MCP readyLicense: MITBuilt at MIT CSAIL

Mantis CLI overview


Mantis is a spatial data workspace. It embeds records (dataset rows, documents, code files, anything with text) into a 2D semantic map where proximity means similarity, then auto-groups them into labelled clusters so the shape of a dataset is visible at a glance.

This CLI puts the whole workspace in your terminal. Every Mantis MCP tool is reachable through mantis use <tool> (no editor plugin required), so AI coding agents (Claude Code, OpenCode, Codex, Cursor, and more) can inspect, search, and reshape spatial data directly.

🧰 Full MCP surfaceEvery Mantis tool via mantis use <tool>: inspect, search, compare, set algebra, bags, pages, export. JSON in, JSON out. No MCP plugin needed.
🤖 Agent skill syncOne command installs editor skills for Claude Code, OpenCode, Codex, Cursor, Windsurf, Copilot, and Antigravity.
🔗 URI substrateEvery entity has a stable mantis:// URI you pipe from one tool into the next: spaces, maps, clusters, bags, points, dimensions.
📦 Build maps locallyTurn a CSV/XLSX into a Mantis map, or index an entire codebase into a searchable semantic map in one call.
⚡ Fast cold startShips as a single bundled artifact, ~2.5× faster startup than an unbundled install. Bundled with Bun, runs on plain Node.
🔍 ScriptableSpaces, threads, and tools all emit JSON. Drop it straight into jq, pipelines, or agent loops.

Quick Start

npm install -g mantisai-cli # Node ≥18, no Bun needed
mantis setup # API key + space + thread
mantis setup claude # optional: install Claude Code skills
mantis use get_space_context # confirm you're connected

Config lives at ~/.mantis/config.json. Grab a developer key at mantis.csail.mit.edu/developer.

Naming: repo KellisLab/mantis-cli · npm package mantisai-cli · binary mantis.

Using with Claude Code

Run mantis setup claude once to install the Mantis skills, then drive your spaces and maps straight from a Claude Code session, no MCP plugin required.

Mantis CLI in Claude Code

See the Claude Code guide for the full workflow.

Commands

CommandDescription
mantis setup [editor]API + space/thread, or sync skills for claude/opencode/codex/cursor/windsurf/copilot/antigravity
mantis statusShow current space, thread, and config
mantis select [space|thread|both]Switch the active space and/or thread
mantis spaces list|resolve|setScriptable space ops (JSON)
mantis threads list|new|setScriptable thread ops (JSON)
mantis toolsList every MCP tool and its arguments
mantis use <tool>Call any MCP tool (JSON output)
mantis create map <file>Build a map from a local CSV/XLSX
mantis create codebase [root]Index a repo into CSV; add --create-map to embed it

The mantis use toolbox

Reach for these through mantis use <tool> (run mantis tools for full argument schemas):

TierTools
Orientget_space_context, inspect
Reasonsearch, compare, intersect, diff, union, export
Actcreate_bag, add_to_bag, remove_from_bag, rename_bag, delete_bag, filter_to_bag, set_plot_variables, legend_command, create_page, project, install_extension
# Orient: what's in this space?
mantis use get_space_context
# Reason: semantically search a map
mantis use search --args '{"query":"memory systems","kind":"point","scope":["mantis://map/<id>"]}'# Act: save a cluster as a reusable bag
mantis use create_bag --from-uri "mantis://map/<id>/cluster/<cid>" --name "My Bag"# Act: project text (or a file's contents) onto a map as a new point, get its URI back
mantis use project --text "attention is all you need" --map-id <id>
mantis use project --file notes.md --map-id <id>

Documentation

Requirements

Contributing

git clone https://github.com/KellisLab/mantis-cli.git
cd mantis-cli
bun install # or: npm install
bun run build # bundles bin/mantis.js -> dist/mantis.js
node dist/mantis.js --version

Publishing is automated: push a v* tag and the GitHub Actions workflow builds the bundle and publishes to npm.


Built at MIT CSAIL · MIT License

About

Mantis developer CLI — manage spaces, create maps, and configure Claude Code integration.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages