{"id":45422028,"url":"https://github.com/gcclinux/terminal-intelligence","last_synced_at":"2026-03-01T22:06:14.548Z","repository":{"id":339287671,"uuid":"1159850795","full_name":"gcclinux/terminal-intelligence","owner":"gcclinux","description":"Terminal Intelligence (TI): A zero-dependency, high-performance autonomous AI agent for the CLI. Built in Go. No interpreters, no external Git required. Full agency over your workspace.","archived":false,"fork":false,"pushed_at":"2026-03-01T21:03:37.000Z","size":6064,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-01T21:39:35.749Z","etag":null,"topics":["ai-assistant","autonomous-agents","cli","cli-development","ide"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gcclinux.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"gcclinux","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":"gcclinux","thanks_dev":null,"custom":null}},"created_at":"2026-02-17T08:38:05.000Z","updated_at":"2026-03-01T21:03:40.000Z","dependencies_parsed_at":"2026-03-01T21:07:27.127Z","dependency_job_id":null,"html_url":"https://github.com/gcclinux/terminal-intelligence","commit_stats":null,"previous_names":["gcclinux/terminal-intelligence"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/gcclinux/terminal-intelligence","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcclinux%2Fterminal-intelligence","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcclinux%2Fterminal-intelligence/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcclinux%2Fterminal-intelligence/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcclinux%2Fterminal-intelligence/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gcclinux","download_url":"https://codeload.github.com/gcclinux/terminal-intelligence/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcclinux%2Fterminal-intelligence/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29986242,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T21:06:37.093Z","status":"ssl_error","status_checked_at":"2026-03-01T21:05:45.052Z","response_time":124,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-assistant","autonomous-agents","cli","cli-development","ide"],"created_at":"2026-02-22T01:40:13.955Z","updated_at":"2026-03-01T22:06:14.540Z","avatar_url":"https://github.com/gcclinux.png","language":"Go","funding_links":["https://github.com/sponsors/gcclinux","https://buymeacoffee.com/gcclinux"],"categories":[],"sub_categories":[],"readme":"# Terminal Intelligence (TI)\n\nA lightweight CLI-based IDE with integrated AI assistance through Ollama. Features a split-window terminal interface with an integrated code editor and AI assistant for creating, editing, and testing scripts and markdown documents.\n\n### Menu View \u0026 Shotcuts\nQuick overview of current menu shotcuts and key combinations\n\n![TI Help Menu](images/menu-guide.png)\n---\n\n# [**Additional Screenshot Showcase →**](SHOWCASE.md)\n\n## Features\n\n- **Split-Window Interface**: Vertical split with editor on the left and AI assistant on the right\n- **Multi-Language Support**: Edit and run Bash, PowerShell, Python, Go, and Markdown files\n- **Auto-Install Detection**: Automatically detects missing language runtimes and offers to install them\n- **Code Editor**: Syntax-aware text editing with line numbers and file type detection\n- **AI Integration**: Context-aware AI assistance powered by Ollama or Gemini\n- **Agentic Code Fixing**: AI autonomously reads, analyzes, and fixes code directly in the editor\n- **Chat History Management**: Save and reload complete AI conversations with Ctrl+A and Ctrl+L\n- **Integrated Git Operations**: Full Git workflow support with visual panel interface\n- **File Management**: Create, open, save, and delete files\n- **Command Execution**: Run scripts and programs with Ctrl+R (auto-detects file type)\n- **Go Development**: Full support for running Go programs and tests\n- **Keyboard Shortcuts**: Efficient keyboard-driven workflow\n- **Session Management**: Unsaved changes confirmation on exit\n- **Cross-Platform**: Runs on Linux, Windows, and macOS\n\n## Integrated Git Operations\n\nTerminal Intelligence includes a built-in Git client powered by go-git, providing a complete Git workflow without requiring external Git installation. Access all Git operations through an intuitive visual panel interface.\n\n### Opening the Git Panel\n\nPress `Ctrl+G` to open the Git Operations panel. The panel provides:\n- Three input fields for repository URL, username, and password/token\n- Eight operation buttons organized into logical groups\n- Real-time status and error messages\n- Automatic credential detection from existing repositories\n\n### Git Operations\n\nThe Git panel organizes operations into three logical groups:\n\n**Remote Operations** (Clone, Pull, Fetch)\n- **Clone**: Clone a repository from a remote URL to your workspace\n- **Pull**: Fetch and merge changes from the remote repository\n- **Fetch**: Download changes from remote without merging\n\n**Local to Remote Workflow** (Stage, Commit, Push)\n- **Stage**: Stage all modified and untracked files for commit\n- **Commit**: Create a commit with staged changes (requires commit message)\n- **Push**: Push local commits to the remote repository\n\n**Info and Undo** (Status, Restore)\n- **Status**: View repository status (modified, staged, and untracked files)\n- **Restore**: Discard all uncommitted changes and restore to last commit\n\n### Git Workflow Example\n\n1. **Check Status**: Press `Ctrl+G`, select Status button, press Enter\n2. **Stage Changes**: Navigate to Stage button, press Enter\n3. **Commit**: Navigate to Commit button, press Enter\n   - Enter your commit message in the input field\n   - Press Enter to commit (message cannot be empty)\n4. **Push**: Navigate to Push button, press Enter to push to remote\n\n### Authentication\n\nThe Git panel supports multiple authentication methods:\n\n**GitHub Personal Access Token (Recommended)**\n- Username: Your GitHub username\n- Password: GitHub Personal Access Token (ghp_...)\n- Tokens are securely stored in repository configuration\n\n**Username/Password**\n- Username: Your Git username\n- Password: Your Git password\n- Works with most Git hosting services\n\n**Credential Auto-Detection**\n- When opening the panel in an existing repository, credentials are automatically loaded from `.git/config`\n- Stored credentials are used for subsequent operations\n\n### Navigation\n\n- `Tab` or `Down`: Move focus forward (URL → USER → PASS → Buttons → Commit Message)\n- `Shift+Tab` or `Up`: Move focus backward\n- `Left/Right`: Navigate between buttons when focused on button row\n- `Enter`: Activate selected button or submit commit message\n- `Esc`: Close the Git panel\n\n### Commit Message Input\n\nWhen the Commit button is selected:\n1. Press Enter to show the commit message input field\n2. Type your commit message (cannot be empty)\n3. Press Enter to create the commit\n4. The input field disappears after successful commit\n\n### Features\n\n- **Pure Go Implementation**: No external Git installation required\n- **Credential Management**: Secure storage and auto-detection of credentials\n- **Visual Feedback**: Real-time status messages for all operations\n- **Error Handling**: Clear error messages with actionable guidance\n- **Repository Detection**: Automatically detects if current directory is a Git repository\n- **Cross-Platform**: Works consistently on Linux, Windows, and macOS\n\n### Keyboard Shortcut\n\n| Shortcut | Action |\n|----------|--------|\n| `Ctrl+G` | Open/Close Git Operations Panel |\n\n### Technical Details\n\nThe Git integration uses:\n- **go-git/go-git/v5**: Pure Go Git implementation\n- **GitClient** (`internal/git/client.go`): Core Git operations\n- **CredentialStore** (`internal/git/credentials.go`): Secure credential management\n- **GitPane** (`internal/ui/gitpane.go`): Visual panel interface\n\nFor more technical details, see [internal/git/README.md](internal/git/README.md).\n\n## Agentic Code Fixing\n\nThe AI assistant can autonomously fix code issues in your open files. Simply describe what you want to change, and the AI will read your code, generate a fix, and apply it directly to the editor.\n\n### How It Works\n\nThe AI automatically detects when you're requesting a code fix versus asking a conversational question. When you request a fix, the AI:\n\n1. Reads the currently open file (including unsaved changes)\n2. Analyzes your request along with the code context\n3. Generates a precise code fix\n4. Applies the fix directly to the editor\n5. Notifies you of the changes made\n\nYour file is marked as modified but not automatically saved, giving you full control to review and save when ready.\n\n### Agentic vs Conversational Modes\n\n**Agentic Mode** (AI modifies code):\n- Triggered by fix-related keywords: \"fix\", \"change\", \"update\", \"modify\", \"correct\"\n- AI reads the file, generates a fix, and applies it automatically\n- File is marked as modified but not saved\n- You receive a summary of changes made\n\n**Conversational Mode** (AI provides guidance):\n- Triggered by questions or informational messages\n- AI responds with explanations, suggestions, or answers\n- No code modifications are made\n- Use this for learning, debugging help, or general questions\n\n**Explicit Commands**:\n- `/fix \u003cyour request\u003e` - Force agentic mode (AI will modify code)\n- `/ask \u003cyour question\u003e` - Force conversational mode (AI won't modify code)\n- `/preview \u003cyour request\u003e` - Preview changes before applying them\n- `/model` - Display current agent and model information\n- `/config` - Edit configuration settings interactively\n- `/help` - Display keyboard shortcuts and agent commands\n\n### Usage Examples\n\n#### Basic Fix Request\n\n```\nYou: fix the syntax error on line 15\n```\n\nThe AI detects \"fix\" keyword, reads your file, identifies the syntax error, and applies the correction.\n\n#### Using /fix Command\n\n```\nYou: /fix add error handling to the main function\n```\n\nExplicitly requests agentic mode. The AI adds error handling code to your main function.\n\n#### Using /ask Command\n\n```\nYou: /ask how does this function work?\n```\n\nExplicitly requests conversational mode. The AI explains the function without modifying code.\n\n#### Using /preview Command\n\n```\nYou: /preview refactor this to use a switch statement\n```\n\nThe AI shows you what changes it would make before applying them. You can then approve or request modifications.\n\n#### Using /model Command\n\n```\nYou: /model\n```\n\nThe AI displays the current agent (ollama or gemini) and model being used (e.g., llama2, gemini-2.5-flash-lite). If using Gemini, it also displays the API key from the configuration.\n\n#### Using /config Command\n\n```\nYou: /config\n```\n\nOpens an interactive configuration editor where you can modify settings without leaving the application:\n- Navigate fields with Up/Down or K/J keys\n- Press Enter to edit a field value\n- Press Enter again to save the edited value\n- Press Esc to save all changes and exit config mode\n\nThe configuration is saved to `~/.ti/config.json` and applied immediately without restarting the application.\n\n#### Using /help Command\n\n```\nYou: /help\n```\n\nThe AI displays a comprehensive help message including:\n- All keyboard shortcuts (same as Ctrl+H)\n- Agent commands (/fix, /ask, /preview, /model, /config, /help)\n- Fix keywords (fix, change, update, modify, correct) with descriptions\n\nYou can also press Ctrl+H at any time to see the help dialog with all keyboard shortcuts and agent commands organized by category.\n\n#### Multiple Changes\n\n```\nYou: update the function to handle edge cases and add comments\n```\n\nThe AI applies multiple changes in a single operation: adds edge case handling and documentation comments.\n\n### What Gets Modified\n\n- The AI only modifies the currently open file in the editor\n- Changes are applied immediately and visible in the editor\n- The file is marked as modified (indicated in the UI)\n- You must save manually with `Ctrl+S` to persist changes\n- You can undo changes using standard editor undo mechanisms\n\n### Best Practices\n\n1. **Be Specific**: Clearly describe what you want to change\n   - Good: \"fix the off-by-one error in the loop\"\n   - Less clear: \"fix the bug\"\n\n2. **One File at a Time**: Open the file you want to modify before requesting fixes\n\n3. **Review Changes**: Always review AI-generated changes before saving\n\n4. **Test Your Code**: After applying fixes, test your code to ensure it works as expected\n\n5. **Use /ask for Questions**: When you want explanations without modifications, use `/ask`\n\n6. **Use /preview for Safety**: Preview complex changes before applying them\n\n### Error Handling\n\nThe AI handles errors gracefully:\n\n- **No File Open**: You'll be prompted to open a file first\n- **AI Service Unavailable**: You'll be notified to check your Ollama or Gemini connection\n- **Invalid Fix**: The AI won't apply fixes that are syntactically invalid\n- **Application Failure**: Original content is preserved if something goes wrong\n\n### Supported File Types\n\nAgentic code fixing works with:\n- Bash scripts (`.sh`, `.bash`)\n- Shell scripts (`.sh`)\n- PowerShell scripts (`.ps1`)\n- Python scripts (`.py`)\n- Go source files (`.go`)\n- Markdown documents (`.md`)\n\n## Requirements\n\n- Go 1.21 or higher\n- Ollama (optional, for AI features)\n\n## Installation\n\n### From Source\n\n```bash\n# Clone the repository\ngit clone https://github.com/user/terminal-intelligence.git\ncd terminal-intelligence\n\n# Build the application\nmake linux\n```\n\n### Compile in windows\n```powershell\n .\\build.ps1 windows\n```\n\n### Pre-built Binaries\n\nDownload pre-built binaries for your platform from the releases page.\n\n## Configuration\n\nThe application supports configuration through a JSON file located at `~/.ti/config.json` (or `%USERPROFILE%\\.ti\\config.json` on Windows).\n\n### Configuration File\n\nOn first run, if no config file exists, the application will automatically create a default `config.json` with example values at `~/.ti/config.json`.\n\nYou can edit this file to customize your settings. The application will load it automatically on subsequent runs.\n\n**Default Configuration (Ollama):**\n\n```json\n{\n  \"agent\": \"ollama\",\n  \"model\": \"qwen2.5-coder:3b\",\n  \"ollama_url\": \"http://localhost:11434\",\n  \"gemini_api\": \"\",\n  \"workspace\": \"/home/user/ti-workspace\"\n}\n```\n\n**Example Gemini Configuration:**\n\n```json\n{\n  \"agent\": \"gemini\",\n  \"model\": \"gemini-3-flash-lite\",\n  \"ollama_url\": \"\",\n  \"gemini_api\": \"your-api-key-here\",\n  \"workspace\": \"/home/user/project-workspace\"\n}\n```\n\n**Configuration Fields:**\n\n- `agent`: AI provider - `\"ollama\"` or `\"gemini\"`\n- `model`: Model name (e.g., `\"llama2\"`, `\"qwen2.5-coder:3b\"`, `\"gemini-3-flash-lite, gemini-3-pro-preview\"`)\n- `ollama_url`: Ollama server URL (only for Ollama provider)\n- `gemini_api`: Gemini API key (required for Gemini provider)\n- `workspace`: Workspace directory path (absolute path to your workspace folder)\n\n**Note:** Command-line flags override config file values.\n\n## Usage\n\n[Introduction](./docs/USAGE.md)\n\n### Language-Specific Guides\n\n- [Go Language Support](./docs/GO_SUPPORT.md) - Complete guide for Go development in TI\n- [Automatic Language Installation](./docs/AUTO_INSTALL.md) - Auto-detect and install missing runtimes\n\n## Building\n\n### Build for Current Platform\n\n```bash\nmake build\n```\n\n### Build for All Platforms\n\n```bash\nmake all-platforms\n```\n\nThis creates binaries for:\n- Linux (amd64)\n- Windows (amd64)\n- macOS (amd64 and arm64)\n\n### Build Targets\n\n```bash\nmake linux      # Build for Linux\nmake windows    # Build for Windows\nmake darwin     # Build for macOS\n```\n\nThis generates a coverage report in `coverage.html`.\n\n## Architecture\n\nThe application follows a clean architecture with clear separation of concerns:\n\n- **UI Layer**: Bubble Tea components for terminal interface\n- **Business Logic**: File management, command execution, AI communication\n- **Data Layer**: File system operations\n\n### Key Components\n\n- **App**: Main Bubble Tea application orchestrating all components\n- **EditorPane**: Code editor with syntax highlighting and file editing\n- **AIChatPane**: AI interaction pane with conversation history\n- **FileManager**: Handles all file system operations\n- **CommandExecutor**: Executes system commands and scripts\n- **OllamaClient**: Communicates with Ollama service via REST API\n\n## Configuration\n\nThe application can be configured via:\n\n1. **Configuration file** at `~/.ti/config.json` (loaded automatically if present)\n2. **Command-line flags** (override config file values)\n3. **Default configuration** (used when no config file or flags provided)\n\n### Configuration Priority\n\nCommand-line flags \u003e Config file \u003e Built-in defaults\n\n### Default Configuration\n\n- **Workspace Directory**: `~/ti-workspace`\n- **Ollama URL**: `http://localhost:11434`\n- **Default Model**: `llama2`\n- **Tab Size**: 4 spaces\n- **Auto Save**: Disabled\n\n## Cross-Platform Support\n\nThe application is designed to run on:\n- **Linux**: Tested on Ubuntu 20.04+\n- **Windows**: Tested on Windows 10+\n- **macOS**: Tested on macOS 11+ (Intel and Apple Silicon)\n\n## Development\n\n### Prerequisites\n\n- Go 1.21 or higher\n- Make (for build automation)\n- golangci-lint (optional, for linting)\n\n### Development Commands\n\n```bash\nmake fmt        # Format code\nmake lint       # Run linter\nmake run        # Build and run\nmake clean      # Clean build artifacts\n```\n\n## Contributing\n\nContributions are welcome! Please ensure:\n\n1. All tests pass (`make test`)\n2. Code is formatted (`make fmt`)\n3. Linter passes (`make lint`)\n4. New features include tests\n\n## License\n\nTBD\n\n## Acknowledgments\n\n- [Bubble Tea](https://github.com/charmbracelet/bubbletea) - Terminal UI framework\n- [Lip Gloss](https://github.com/charmbracelet/lipgloss) - Terminal styling\n- [Ollama](https://ollama.ai/) - Local LLM runtime\n- [gopter](https://github.com/leanovate/gopter) - Property-based testing\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgcclinux%2Fterminal-intelligence","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgcclinux%2Fterminal-intelligence","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgcclinux%2Fterminal-intelligence/lists"}