{"id":27754312,"url":"https://github.com/alvinunreal/tmuxai","last_synced_at":"2026-01-20T13:08:38.883Z","repository":{"id":289099898,"uuid":"968983324","full_name":"alvinunreal/tmuxai","owner":"alvinunreal","description":"AI-Powered, Non-Intrusive Terminal Assistant","archived":false,"fork":false,"pushed_at":"2026-01-13T23:41:44.000Z","size":358,"stargazers_count":1445,"open_issues_count":2,"forks_count":83,"subscribers_count":11,"default_branch":"main","last_synced_at":"2026-01-14T01:31:44.095Z","etag":null,"topics":["ai","assistant","chatgpt","tmux","warp"],"latest_commit_sha":null,"homepage":"https://tmuxai.dev","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alvinunreal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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":["alvinunreal"]}},"created_at":"2025-04-19T05:51:47.000Z","updated_at":"2026-01-13T23:40:53.000Z","dependencies_parsed_at":"2025-05-31T08:39:20.960Z","dependency_job_id":"a9c6985c-9476-4b00-b9db-52822c10d98f","html_url":"https://github.com/alvinunreal/tmuxai","commit_stats":null,"previous_names":["alvinunreal/tmuxai","boringdystopiadevelopment/tmuxai"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/alvinunreal/tmuxai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvinunreal%2Ftmuxai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvinunreal%2Ftmuxai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvinunreal%2Ftmuxai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvinunreal%2Ftmuxai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alvinunreal","download_url":"https://codeload.github.com/alvinunreal/tmuxai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvinunreal%2Ftmuxai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28603437,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T12:01:53.233Z","status":"ssl_error","status_checked_at":"2026-01-20T12:01:46.545Z","response_time":117,"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","chatgpt","tmux","warp"],"created_at":"2025-04-29T06:01:38.678Z","updated_at":"2026-01-20T13:08:38.877Z","avatar_url":"https://github.com/alvinunreal.png","language":"Go","funding_links":["https://github.com/sponsors/alvinunreal"],"categories":["🚀 AI Tools for Vim, Neovim, and Terminal","🤖 AI, ML \u0026 Deep Learning","Go","CLIs","UIs","Terminal Integration Tools","Miscellaneous","Domain-Specific Tools"],"sub_categories":["Command-line(shell) interface","Shell Enhancements","Development and testing","Terminal \u0026 Shell"],"readme":"\u003cbr/\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/alvinunreal/tmuxai\"\u003e\n    \u003cimg src=\"https://tmuxai.dev/gh.svg?v=2\" alt=\"TmuxAI Logo\" width=\"100%\"\u003e\n  \u003c/a\u003e\n  \u003ch3 align=\"center\"\u003eTmuxAI\u003c/h3\u003e\n  \u003cp align=\"center\"\u003e\n    Your intelligent pair programmer directly within your tmux sessions.\n    \u003cbr/\u003e\n    \u003cbr/\u003e\n    \u003ca href=\"https://github.com/alvinunreal/tmuxai/blob/main/LICENSE\"\u003e\u003cimg alt=\"License\" src=\"https://img.shields.io/github/license/alvinunreal/tmuxai?style=flat-square\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/alvinunreal/tmuxai/releases/latest\"\u003e\u003cimg alt=\"Release\" src=\"https://img.shields.io/github/v/release/alvinunreal/tmuxai?style=flat-square\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/alvinunreal/tmuxai/issues\"\u003e\u003cimg alt=\"Issues\" src=\"https://img.shields.io/github/issues/alvinunreal/tmuxai?style=flat-square\"\u003e\u003c/a\u003e\n    \u003cbr/\u003e\n    \u003cbr/\u003e\n    \u003cbr/\u003e\n    \u003ca href=\"https://tmuxai.dev/screenshots\" target=\"_blank\"\u003eScreenshots\u003c/a\u003e |\n    \u003ca href=\"https://github.com/alvinunreal/tmuxai/issues/new?labels=bug\u0026template=bug_report.md\" target=\"_blank\"\u003eReport Bug\u003c/a\u003e |\n    \u003ca href=\"https://github.com/alvinunreal/tmuxai/issues/new?labels=enhancement\u0026template=feature_request.md\" target=\"_blank\"\u003eRequest Feature\u003c/a\u003e\n    \u003cbr/\u003e\n    \u003cbr/\u003e\n    \u003ca href=\"https://tmuxai.dev/tmux-cheat-sheet/\" target=\"_blank\"\u003eTmux Cheat Sheet\u003c/a\u003e |\n    \u003ca href=\"https://tmuxai.dev/tmux-getting-started/\" target=\"_blank\"\u003eTmux Getting Started\u003c/a\u003e |\n    \u003ca href=\"https://tmuxai.dev/tmux-config/\" target=\"_blank\"\u003eTmux Config Generator\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n## Table of Contents\n\n- [About The Project](#about-the-project)\n  - [Human-Inspired Interface](#human-inspired-interface)\n- [Installation](#installation)\n  - [Quick Install](#quick-install)\n  - [Manual Download](#manual-download)\n  - [Install from Main](#install-from-main)\n- [Post-Installation Setup](#post-installation-setup)\n- [TmuxAI Layout](#tmuxai-layout)\n- [Observe Mode](#observe-mode)\n- [Prepare Mode](#prepare-mode)\n- [Watch Mode](#watch-mode)\n  - [Activating Watch Mode](#activating-watch-mode)\n  - [Example Use Cases](#example-use-cases)\n- [Knowledge Base](#knowledge-base)\n  - [Creating Knowledge Bases](#creating-knowledge-bases)\n  - [Using Knowledge Bases](#using-knowledge-bases)\n  - [Auto-Loading Knowledge Bases](#auto-loading-knowledge-bases)\n- [Model Configuration](#model-configuration)\n  - [Setting Up Multiple Models](#setting-up-multiple-models)\n  - [Switching Between Models](#switching-between-models)\n- [Squashing](#squashing)\n  - [What is Squashing?](#what-is-squashing)\n  - [Manual Squashing](#manual-squashing)\n- [Multiline Input](#multiline-input)\n- [Core Commands](#core-commands)\n- [Command-Line Usage](#command-line-usage)\n- [Configuration](#configuration)\n  - [Environment Variables](#environment-variables)\n  - [Session-Specific Configuration](#session-specific-configuration)\n- [Contributing](#contributing)\n- [License](#license)\n\n## About The Project\n\n![Product Demo](https://tmuxai.dev/demo.png)\n\nTmuxAI is an intelligent terminal assistant that lives inside your tmux sessions. Unlike other CLI AI tools, TmuxAI observes and understands the content of your tmux panes, providing assistance without requiring you to change your workflow or interrupt your terminal sessions.\n\nThink of TmuxAI as a _pair programmer_ that sits beside you, watching your terminal environment exactly as you see it. It can understand what you're working on across multiple panes, help solve problems and execute commands on your behalf in a dedicated execution pane.\n\n### Human-Inspired Interface\n\nTmuxAI's design philosophy mirrors the way humans collaborate at the terminal. Just as a colleague sitting next to you would observe your screen, understand context from what's visible, and help accordingly, TmuxAI:\n\n1. **Observes**: Reads the visible content in all your panes\n2. **Communicates**: Uses a dedicated chat pane for interaction\n3. **Acts**: Can execute commands in a separate execution pane (with your permission)\n\nThis approach provides powerful AI assistance while respecting your existing workflow and maintaining the familiar terminal environment you're already comfortable with.\n\n## Installation\n\nTmuxAI requires only tmux to be installed on your system. It's designed to work on Unix-based operating systems including Linux and macOS.\n\n### Quick Install\n\nThe fastest way to install TmuxAI is using the installation script:\n\n```bash\n# install tmux if not already installed\ncurl -fsSL https://get.tmuxai.dev | bash\n```\n\nThis installs TmuxAI to `/usr/local/bin/tmuxai` by default. If you need to install to a different location or want to see what the script does before running it, you can view the source at [get.tmuxai.dev](https://get.tmuxai.dev).\n\n### Manual Download\n\nYou can also download pre-built binaries from the [GitHub releases page](https://github.com/alvinunreal/tmuxai/releases).\n\nAfter downloading, make the binary executable and move it to a directory in your PATH:\n\n```bash\nchmod +x ./tmuxai\nsudo mv ./tmuxai /usr/local/bin/\n```\n\n### Install from Main\n\nTo install the latest development version directly from the main branch:\n\n```bash\ngo install github.com/alvinunreal/tmuxai@main\n```\n\n**Note:** The main branch contains the latest features and fixes but may be less stable than official releases.\n\n## Post-Installation Setup\n\nTmuxAI reads its configuration from `~/.config/tmuxai/config.yaml`. To get running, create the file with a model entry that points at the provider you use.\n\n1. **Create the config path**\n\n   ```bash\n   mkdir -p ~/.config/tmuxai\n   vim ~/.config/tmuxai/config.yaml\n   ```\n\n2. **Add a minimal config**\n\n   ```yaml\n   models:\n     primary:\n       provider: openrouter  # openrouter, openai or azure\n       model: anthropic/claude-haiku-4.5\n       api_key: sk-your-api-key\n   ```\n\n   Swap the provider name and fill in the model/API key required by your account.\n\n3. **Start TmuxAI**\n\n   ```bash\n   tmuxai\n   ```\n\nSee [Model Configuration](#model-configuration) for more details.\n\n## TmuxAI Layout\n\n![Panes](https://tmuxai.dev/shots/panes.png?lastmode=1)\n\nTmuxAI is designed to operate within a single tmux window, with one instance of\nTmuxAI running per window and organizes your workspace using the following pane structure:\n\n1. **Chat Pane**: This is where you interact with the AI. It features a REPL-like interface with syntax highlighting, auto-completion, and readline shortcuts.\n\n2. **Exec Pane**: TmuxAI selects (or creates) a pane where commands can be executed.\n\n3. **Read-Only Panes**: All other panes in the current window serve as additional context. TmuxAI can read their content but does not interact with them.\n\n## Observe Mode\n\n![Observe Mode](https://tmuxai.dev/shots/demo-observe.png)\n_TmuxAI sent the first ping command and is waiting for the countdown to check for the next step_\n\nTmuxAI operates by default in \"observe mode\". Here's how the interaction flow works:\n\n1. **User types a message** in the Chat Pane.\n\n2. **TmuxAI captures context** from all visible panes in your current tmux window (excluding the Chat Pane itself). This includes:\n\n   - Current command with arguments\n   - Detected shell type\n   - User's operating system\n   - Current content of each pane\n\n3. **TmuxAI processes your request** by sending user's message, the current pane context, and chat history to the AI.\n\n4. **The AI responds** with information, which may include a suggested command to run.\n\n5. **If a command is suggested**, TmuxAI will:\n\n   - Check if the command matches whitelist or blacklist patterns\n   - Ask for your confirmation (unless the command is whitelisted). The confirmation prompt includes a risk indicator (✓ safe, ? unknown, ! danger) for guidance only - always review commands carefully as the risk scoring is not exhaustive and should not be relied upon for security decisions\n   - Execute the command in the designated Exec Pane if approved\n   - Wait for the `wait_interval` (default: 5 seconds) (You can pause/resume the countdown with `space` or `enter` to stop the countdown)\n   - Capture the new output from all panes\n   - Send the updated context back to the AI to continue helping you\n\n6. **The conversation continues** until your task is complete.\n\n![Observe Mode Flowchart](https://tmuxai.dev/shots/observe-mode.png)\n\n## Prepare Mode\n\n![Prepare Mode](https://tmuxai.dev/shots/demo-prepare.png?lastmode=1)\n_TmuxAI customized the pane prompt and sent the first ping command. Instead of the countdown, it's waiting for command completion_\n\nPrepare mode is an optional feature that enhances TmuxAI's ability to work with your terminal by customizing\nyour shell prompt and tracking command execution with better precision. This\nenhancement eliminates the need for arbitrary wait intervals and provides the AI\nwith more detailed information about your commands and their results.\n\nWhen you enable Prepare Mode, TmuxAI will:\n\n1. **Detects your current shell** in the execution pane (supports bash, zsh, and fish)\n2. **Customizes your shell prompt** to include special markers that TmuxAI can recognize\n3. **Will track command execution history** including exit codes, and per-command outputs\n4. **Will detect command completion** instead of using fixed wait time intervals\n\nTo activate Prepare Mode, simply use:\n\n```\nTmuxAI » /prepare\n```\n\nBy default, TmuxAI will attempt to detect the shell running in the execution pane. If you need to specify the shell manually, you can provide it as an argument:\n\n```\nTmuxAI » /prepare bash\n```\n\n**Prepared Fish Example:**\n\n```shell\n$ function fish_prompt; set -l s $status; printf '%s@%s:%s[%s][%d]» ' $USER (hostname -s) (prompt_pwd) (date +\"%H:%M\") $s; end\nusername@hostname:~/r/tmuxai[21:05][0]»\n```\n\n## Watch Mode\n\n![Watch Mode](https://tmuxai.dev/shots/demo-watch.png)\n_TmuxAI watching user shell commands and better alternatives_\n\nWatch Mode transforms TmuxAI into a proactive assistant that continuously\nmonitors your terminal activity and provides suggestions based on what you're\ndoing.\n\n### Activating Watch Mode\n\nTo enable Watch Mode, use the `/watch` command followed by a description of what you want TmuxAI to look for:\n\n```\nTmuxAI » /watch spot and suggest more efficient alternatives to my shell commands\n```\n\nWhen activated, TmuxAI will:\n\n1. Start capturing the content of all panes in your current tmux window at regular intervals (`wait_interval` configuration)\n2. Analyze content based on your specified watch goal and provide suggestions when appropriate\n\n### Example Use Cases\n\nWatch Mode could be valuable for scenarios such as:\n\n- **Learning shell efficiency**: Get suggestions for more concise commands as you work\n\n  ```\n  TmuxAI » /watch spot and suggest more efficient alternatives to my shell commands\n  ```\n\n- **Detecting common errors**: Receive warnings about potential issues or mistakes\n\n  ```\n  TmuxAI » /watch flag commands that could expose sensitive data or weaken system security\n  ```\n\n- **Log Monitoring and Error Detection**: Have TmuxAI monitor log files or terminal output for errors\n\n  ```\n  TmuxAI » /watch monitor log output for errors, warnings, or critical issues and suggest fixes\n  ```\n\n## Squashing\n\nAs you work with TmuxAI, your conversation history grows, adding to the context\nprovided to the AI model with each interaction. Different AI models have\ndifferent context size limits and pricing structures based on token usage. To\nmanage this, TmuxAI implements a simple context management feature called\n\"squashing.\"\n\n### What is Squashing?\n\nSquashing is TmuxAI's built-in mechanism for summarizing chat history to manage\ntoken usage.\n\nWhen your context grows too large, TmuxAI condenses previous\nmessages into a more compact summary.\n\nYou can check your current context utilization at any time using the `/info` command:\n\n```bash\nTmuxAI » /info\n\nContext\n────────\n\nMessages            15\nContext Size~       82500 tokens\n                    ████████░░ 82.5%\nMax Size            100000 tokens\n```\n\nThis example shows that the context is at 82.5% capacity (82,500 tokens out of 100,000). When the context size reaches 80% of the configured maximum (`max_context_size` in your config), TmuxAI automatically triggers squashing.\n\n### Manual Squashing\n\nIf you'd like to manage your context before reaching the automatic threshold, you can trigger squashing manually with the `/squash` command:\n\n```bash\nTmuxAI » /squash\n```\n\n## Multiline Input\n\nFor longer or more complex prompts, you can open your current input in an external text editor. This is similar to how bash allows editing commands with `Ctrl+X Ctrl+E`.\n\n**Keyboard Shortcuts:**\n- `Ctrl+O` - Open current prompt in external editor (works on all platforms)\n- `Alt+E` - Alternative binding (may not work on macOS due to Option key behavior)\n\nWhen triggered, TmuxAI will:\n1. Open your `$EDITOR` (falls back to `vim` if not set) with the current prompt content\n2. Wait for you to edit, save, and close the editor\n3. Replace the prompt with the edited content\n\nThis is useful for:\n- Writing multi-line prompts or detailed instructions\n- Editing long commands more comfortably\n- Pasting and formatting complex content\n\n## Knowledge Base\n\nThe Knowledge Base feature allows you to create pre-defined context files in markdown format that can be loaded into TmuxAI's conversation context. This is useful for sharing common patterns, workflows, or project-specific information with the AI across sessions.\n\n### Creating Knowledge Bases\n\nKnowledge bases are text files stored in `~/.config/tmuxai/kb/`. To create one:\n\n1. Create the knowledge base directory if it doesn't exist:\n   ```bash\n   mkdir -p ~/.config/tmuxai/kb\n   ```\n\n2. Create a file with your knowledge base content:\n   ```bash\n   cat \u003e ~/.config/tmuxai/kb/docker-workflows \u003c\u003c 'EOF'\n   # Docker Workflows\n\n   ## Common Commands\n   - Always use `docker compose` (not `docker-compose`)\n   - Prefer named volumes over bind mounts for databases\n   - Use `.env` files for environment-specific configuration\n\n   ## Project Structure\n   - Development: `docker compose -f docker-compose.dev.yml up`\n   - Production: `docker compose -f docker-compose.prod.yml up -d`\n   EOF\n   ```\n\n### Using Knowledge Bases\n\nOnce created, you can load knowledge bases into your TmuxAI session:\n\n```bash\n# List available knowledge bases\nTmuxAI » /kb\nAvailable knowledge bases:\n  [ ] docker-workflows\n  [ ] git-conventions\n  [ ] testing-procedures\n\n# Load a knowledge base\nTmuxAI » /kb load docker-workflows\n✓ Loaded knowledge base: docker-workflows (850 tokens)\n\n# List again to see loaded status\nTmuxAI » /kb\nAvailable knowledge bases:\n  [✓] docker-workflows (850 tokens)\n  [ ] git-conventions\n  [ ] testing-procedures\n\nLoaded: 1 KB(s), 850 tokens\n\n# Unload a knowledge base\nTmuxAI » /kb unload docker-workflows\n✓ Unloaded knowledge base: docker-workflows\n\n# Unload all knowledge bases\nTmuxAI » /kb unload --all\n✓ Unloaded all knowledge bases (2 KB(s))\n```\n\nYou can also load knowledge bases directly from the command line when starting TmuxAI:\n\n```bash\n# Load single knowledge base\ntmuxai --kb docker-workflows\n\n# Load multiple knowledge bases (comma-separated)\ntmuxai --kb docker-workflows,git-conventions\n```\n\n### Auto-Loading Knowledge Bases\n\nYou can configure knowledge bases to load automatically on startup by adding them to your `~/.config/tmuxai/config.yaml`:\n\n```yaml\nknowledge_base:\n  auto_load:\n    - docker-workflows\n    - git-conventions\n  # path: /custom/path  # Optional: use custom KB directory\n```\n\n**Important Notes:**\n- Loaded knowledge bases consume tokens from your context budget\n- Use `/info` to see how many tokens your loaded KBs are using\n- Knowledge bases are injected after the system prompt but before conversation history\n- Unloading a KB removes it from future messages immediately\n\n## Model Configuration\n\nTmuxAI supports configuring multiple AI model configurations and easily switching between them. This allows you to define different AI providers, models, and settings for various use cases.\n\n### Setting Up Multiple Models\n\nConfigure multiple AI models in your `~/.config/tmuxai/config.yaml`:\n\n```yaml\n# Optional: specify which model to use by default\n# If not set, the first model alphabetically will be used automatically\ndefault_model: \"fast\"\n\nmodels:\n  fast:\n    provider: \"openrouter\"\n    model: \"anthropic/claude-haiku-4.5\"\n    api_key: \"sk-or-your-openrouter-key\"\n\n  smart:\n    provider: \"openrouter\"\n    model: \"google/gemini-2.5-prod\"\n    api_key: \"sk-or-your-openrouter-key\"\n\n  # You can use any chat completion compatible endpoint as base_url\n  anthropic:\n    provider: \"openrouter\"\n    model: \"claude-3-5-sonnet-20241022\"\n    api_key: \"your-anthropic-api-key\"\n    base_url: \"https://api.anthropic.com\"\n\n  github-copilot:\n    provider: \"openrouter\"\n    model: \"claude-sonnet-4.5\"\n    api_key: \"your-github-copilot-api-key\"\n    base_url: \"https://api.githubcopilot.com\"\n\n  local-llama:\n    provider: \"openrouter\"\n    model: \"gemma3:1b\"\n    api_key: \"sk-or-your-openrouter-key\"\n    base_url: http://localhost:11434/v1\n\n  # Responses API\n  codex:\n    provider: \"openai\"\n    model: \"gpt-5-codex\"\n    api_key: \"sk-or-your-openrouter-key\"\n\n  azure-gpt4:\n    provider: \"azure\"\n    model: \"gpt-4o\"\n    api_key: \"your-azure-openai-api-key\"\n    api_base: \"https://your-resource.openai.azure.com/\"\n    api_version: \"2025-04-01-preview\"\n    deployment_name: \"gpt-4o\"\n\n  # Gemini API (direct access)\n  gemini-flash:\n    provider: \"gemini\"\n    model: \"gemini-2.5-flash\"\n    api_key: \"${GOOGLE_API_KEY}\"\n```\n\n**Supported Providers:**\n- `openai` - OpenAI Responses API (GPT-4, GPT-5, etc.)\n- `openrouter` - Universal Chat Completion API, defaults to openrouter base url\n- `azure` - Azure Chat Completions API\n- `gemini` - Google Gemini API (direct access via go-genai SDK)\n\n**Interactive Commands:**\n```bash\n# List available models and see current selection\nTmuxAI » /model\n\nAvailable Models\n  [ ] claude-sonnet (openrouter: anthropic/claude-3.5-sonnet)\n  [ ] fast (openrouter: anthropic/claude-haiku-4.5)\n  [✓] smart (openrouter: google/gemini-2.5-prod)\n  [ ] local-llama (openrouter: meta-llama/llama-3.1-8b-instruct:free)\n\nCurrent Model:\n  Configuration: smart\n  Provider: openrouter\n  Model: google/gemini-2.5-prod\n\n# Switch to a different model\nTmuxAI » /model claude-sonnet\n✓ Switched to claude-sonnet (openrouter: anthropic/claude-3.5-sonnet)\n\n# Status bar shows current model when using non-default\nTmuxAI [claude-sonnet] »\n```\n\n## Core Commands\n\n| Command                     | Description                                                      |\n| --------------------------- | ---------------------------------------------------------------- |\n| `/info`                     | Display system information, pane details, and context statistics |\n| `/clear`                    | Clear chat history.                                              |\n| `/reset`                    | Clear chat history and reset all panes.                          |\n| `/config`                   | View current configuration settings                              |\n| `/config set \u003ckey\u003e \u003cvalue\u003e` | Override configuration for current session                       |\n| `/model`                    | List available models and show current active model              |\n| `/model \u003cname\u003e`             | Switch to a different model configuration                        |\n| `/squash`                   | Manually trigger context summarization                           |\n| `/prepare [shell]`          | Initialize Prepared Mode for the Exec Pane (e.g., bash, zsh)    |\n| `/watch \u003cdescription\u003e`      | Enable Watch Mode with specified goal                            |\n| `/kb`                       | List available knowledge bases with loaded status                |\n| `/kb load \u003cname\u003e`           | Load a knowledge base into conversation context                  |\n| `/kb unload \u003cname\u003e`         | Unload a specific knowledge base                                 |\n| `/kb unload --all`          | Unload all knowledge bases                                       |\n| `/exit`                     | Exit TmuxAI                                                      |\n\n## Command-Line Usage\n\nYou can start `tmuxai` with an initial message, task file, model configuration, or knowledge bases from the command line:\n\n- **Direct Message:**\n\n  ```sh\n  tmuxai your initial message\n  ```\n\n- **Task File:**\n  ```sh\n  tmuxai -f path/to/your_task.txt\n  ```\n\n- **Specify Model:**\n  ```sh\n  # Use a specific model configuration\n  tmuxai --model gpt4 \"Write a Go function\"\n  tmuxai --model claude-sonnet\n  ```\n\n- **Load Knowledge Bases:**\n  ```sh\n  # Single knowledge base\n  tmuxai --kb docker-workflows\n\n  # Multiple knowledge bases\n  tmuxai --kb docker-workflows,git-conventions\n  ```\n\n- **Combine Options:**\n  ```sh\n  tmuxai --model gpt4 --kb docker-workflows \"Debug this Docker issue\"\n  ```\n\n- **Yolo Mode (Skip Confirmations):**\n  ```sh\n  # Skip all confirmation prompts - commands execute immediately\n  tmuxai --yolo \"Install and configure nginx\"\n  ```\n  \n  \u003e **Warning**: Use `--yolo` with caution. This mode skips all safety confirmations and executes commands directly. Only use when you trust the AI's command suggestions completely.\n\n## Configuration\n\nThe configuration can be managed through a YAML file, environment variables, or via runtime commands.\n\nTmuxAI looks for its configuration file at `~/.config/tmuxai/config.yaml`.\nFor a sample configuration file, see [config.example.yaml](https://github.com/alvinunreal/tmuxai/blob/main/config.example.yaml).\n\n### Environment Variables\n\nAll configuration options can also be set via environment variables, which take precedence over the config file. Use the prefix `TMUXAI_` followed by the uppercase configuration key:\n\n```bash\n# General settings\nexport TMUXAI_DEBUG=true\nexport TMUXAI_MAX_CAPTURE_LINES=300\nexport TMUXAI_MAX_CONTEXT_SIZE=150000\n\n# Quick setup with environment variables (alternative to model configurations)\nexport TMUXAI_OPENAI_API_KEY=\"your-openai-api-key-here\"\nexport TMUXAI_OPENAI_MODEL=\"gpt-4\"\nexport TMUXAI_OPENROUTER_API_KEY=\"your-openrouter-api-key-here\"\n```\n\nYou can also use environment variables directly within your configuration file values. The application will automatically expand these variables when loading the configuration:\n\n```yaml\n# Example config.yaml with environment variable expansion\nopenai:\n  api_key: \"${OPENAI_API_KEY}\"\n  model: \"${OPENAI_MODEL:-gpt-4}\"\n\nopenrouter:\n  api_key: \"${OPENROUTER_API_KEY}\"\n  base_url: \"${OPENROUTER_BASE_URL:-https://openrouter.ai/api/v1}\"\n```\n\n### Session-Specific Configuration\n\nYou can override configuration values for your current TmuxAI session using the `/config` command:\n\n```bash\n# View current configuration\nTmuxAI » /config\n\n# Override a configuration value for this session\nTmuxAI » /config set max_capture_lines 300\nTmuxAI » /config set wait_interval 3\n```\n\nThese changes will persist only for the current session and won't modify your config file.\n\n## Contributing\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request.\nYou can also simply open an issue.\n\u003cbr\u003e\nDon't forget to give the project a star!\n\n## License\n\nDistributed under the Apache License. See [Apache License](https://github.com/alvinunreal/tmuxai/blob/main/LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvinunreal%2Ftmuxai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falvinunreal%2Ftmuxai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvinunreal%2Ftmuxai/lists"}