Skip to content

itisuniqueofficial-gh/openmind

OpenMind

OpenMind — Open-source AI Agent CLI for Developers

OpenMind () is a terminal-based AI agent for developers. It can inspect a codebase, reason over indexed context, edit files with visible diffs, run approved commands, and work with multiple AI providers through a unified adapter interface.

Website: https://om.itisuniqueofficial.com

Repository: https://github.com/itisuniqueofficial-gh/openmind

Features

  • Codebase-aware CLI agent with .gitignore-aware workspace indexing and persistent local conversation history.
  • Rich Ink-based terminal UI with main transcript, context sidebar, bottom input bar, command palette, and plain-mode fallback.
  • Syntax highlighting for AI code blocks, file previews, and diffs across common developer languages.
  • Project instruction-file support for AGENTS.md, INSTRUCTIONS.md, .openmind.md, and .github/copilot-instructions.md.
  • Provider adapters for OpenAI, Anthropic, and Gemini.
  • Tool/function calling mapped to each provider's native format.
  • Safe file tools: read_file, write_file, edit_file, list_files, and search_files.
  • Command tools: run_command, git_status, git_diff, and git_commit.
  • Mandatory confirmation before file writes, edits, command execution, and commits.
  • Diff display before every write or edit.
  • Protected path handling for .env, private keys, certificates, and credentials.
  • TypeScript strict mode, Vitest tests, ESLint, Prettier, and tsup builds.

Providers

OpenMind uses this provider interface:

interface AIProvider {
  name: string
  sendMessage(input: AgentInput): Promise<AgentOutput>
  streamMessage?(input: AgentInput): AsyncIterable<string>
}

Supported providers:

Provider Environment variable Tool support
OpenAI OPENAI_API_KEY Chat Completions function calling
Anthropic ANTHROPIC_API_KEY Claude Messages API tool use
Gemini GEMINI_API_KEY Gemini function declarations

Install

npm install -g openmind

For local development:

git clone https://github.com/itisuniqueofficial-gh/openmind.git
cd openmind
npm install
npm run build
npm link

Configuration

Create a workspace config:

openmind init

Default .openmind.json:

{
  "provider": "openai",
  "model": "gpt-5.1",
  "approvalMode": "safe",
  "maxContextFiles": 80,
  "ui": "auto",
  "watch": false
}

Set provider and model:

openmind provider set openai
openmind provider set anthropic
openmind provider set gemini
openmind model set gpt-5.1
openmind ui set auto
openmind watch set off

Configure API keys:

OPENAI_API_KEY=
ANTHROPIC_API_KEY=
GEMINI_API_KEY=

Usage

openmind
openmind init
openmind chat
openmind ask "explain this project"
openmind edit "fix navbar issue"
openmind run "npm test"
openmind index
openmind config
openmind preview README.md
openmind doctor

Terminal UI

OpenMind starts the rich Ink UI automatically in supported terminals. Use plain mode when running in minimal terminals, scripts, or CI-like environments.

openmind chat --plain
openmind --plain
openmind ui set plain

Rich UI shortcuts:

  • Ctrl+C: exit.
  • Esc: interrupt an in-flight provider request or reject pending approval.
  • Ctrl+P: command palette.
  • Ctrl+L: clear transcript.
  • Ctrl+R: re-index workspace.
  • Ctrl+Y: approve pending action.
  • Ctrl+N: reject pending action.

The right sidebar shows provider, model, approximate token usage, indexed files, loaded instruction files, current workspace, git status, and agent todo state.

Instruction Files

OpenMind automatically detects and follows project-level instruction files when building agent context:

AGENTS.md
INSTRUCTIONS.md
.openmind.md
.github/copilot-instructions.md

Instruction files are included in the system prompt after OpenMind safety rules. Safety rules always take priority.

Example session:

openmind init
openmind provider set openai
openmind ask "explain this project"
openmind edit "add tests for the auth helper"

Safety Model

OpenMind is designed for explicit approval and local control.

  • File writes and edits always show a diff first.
  • File writes and edits always ask for confirmation.
  • Command execution always asks for confirmation.
  • Dangerous system-level commands such as sudo, mkfs, diskpart, shutdown, reboot, and registry deletion are blocked.
  • Destructive commands such as rm -rf, forced recursive deletion, broad permission changes, and force push are marked dangerous and require explicit approval.
  • Protected files such as .env, private keys, certificates, and credentials.json are blocked by path guardrails.
  • Command output is sanitized for common API key and private key patterns.

Architecture

src/
├─ cli/          Commander.js commands and process entrypoint
├─ core/         agent loop, planner, executor, memory, context, safety, config
├─ providers/    OpenAI, Anthropic, Gemini adapters
├─ tools/        tool registry and file/shell/git tools
├─ ui/           Ink terminal UI, plain prompts, and terminal capability detection
├─ utils/        diff, syntax highlighting, JSON, and terminal output helpers
└─ types/        shared TypeScript interfaces

Development

npm install
npm run lint
npm run typecheck
npm run test
npm run build

Run the CLI from source:

npm run dev -- ask "what does this repo do?"

Documentation Website

The static website lives in docs/ and is ready for Cloudflare Pages.

Cloudflare Pages settings:

  • Framework preset: None
  • Build command: empty
  • Build output directory: docs
  • Custom domain: om.itisuniqueofficial.com

Contribution Guide

Contributions are welcome. Read CONTRIBUTING.md, CODE_OF_CONDUCT.md, and SECURITY.md before opening issues or pull requests.

Good first contribution areas:

  • Additional provider adapters.
  • More precise command safety patterns.
  • Context indexing and instruction-file improvements.
  • Better provider streaming support.
  • Tool execution tests across Windows, macOS, and Linux.

Roadmap

  • Provider streaming with tool call deltas across all providers.
  • Pluggable tool packages.
  • Workspace policy files for team-level permissions.
  • Richer code search and symbol indexing.
  • Model-specific default recommendations.
  • Signed release provenance.

License

OpenMind is released under the MIT License. See LICENSE.

About

OpenMind — Open-source AI Agent CLI for Developers

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors