fortify-ai-cli
v0.2.2
Published
AI powered developer-focused CLI for error explanation, git commit generation, codebase summarization, and terminal first workflows
Downloads
780
Maintainers
Readme
Fortify · 
Fortify (fortify-ai-cli) is a developer-focused terminal assistant that helps you explain errors, generate commit messages, summarize codebases, and streamline daily workflows directly from the CLI.
Built for developers who live in the terminal.
Demo

Features
- Streaming AI responses directly in terminal
- Git-aware commit message generation
- Error and stack trace explanation
- File and folder summarization
- Interactive chat mode
- Local CLI configuration and chat history persistence
- Clean terminal UX with colors, prompts, and spinners
Example workflow:
# Explain a stack trace
fortify explain ./logs/error.txt
# Generate a commit message from staged changes
fortify commit --style conventional
# Summarize a codebase
fortify summarize ./src
# Interactive AI chat
fortify chat
# Inspect saved chat sessions
fortify history --listRequirements
- Node.js 20+
- An OpenAI API key with billing or credits enabled
Get your API key here:
https://platform.openai.com/api-keys
Installation
Install globally:
npm install -g fortify-ai-cliThe installed command is:
fortifyRun directly without installing:
npx fortify-ai-cli --helpQuick Start
Authenticate once:
fortify authThis stores your API key locally in:
~/.fortify/config.jsonThen start using Fortify:
fortify chat
fortify explain ./crash.log
fortify commit
fortify summarize ./src
fortify history --listUse help anytime:
fortify --help
fortify <command> --helpHistory Storage
Fortify stores local chat history in:
~/.fortify/historyUse:
fortify history --list
fortify history --show <session-id>
fortify history --clearCancellation Behavior
All interactive and streaming flows handle Ctrl+C gracefully:
- In
fortify chat,Ctrl+Cexits the chat loop cleanly. - During streaming commands (
explain,summarize,commit),Ctrl+Ccancels the active generation without noisy stack traces. - Cancelled flows return exit code
130.
Configuration
Example configuration:
{
"modelPreferences": {
"defaultModel": "gpt-5.4",
"fallbackModels": ["gpt-5.3", "gpt-5.4-mini"]
}
}If your OpenAI account has no billing or credits enabled, requests will fail regardless of fallback models.
Manage billing here:
https://platform.openai.com/account/billing
Package Name vs CLI Name
The npm package is published as:
fortify-ai-clibecause the shorter package name was unavailable on npm.
The installed CLI command remains:
fortifyBuilt With
- Node.js
- Commander.js
- OpenAI Responses API
- Streaming async iterators
- Chalk
- Ora
- Inquirer
License
MIT - see LICENSE
