{"id":38525630,"url":"https://github.com/phantomydn/fabric-ai.nvim","last_synced_at":"2026-01-18T17:01:11.662Z","repository":{"id":332210927,"uuid":"1132970972","full_name":"PhantomYdn/fabric-ai.nvim","owner":"PhantomYdn","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-12T21:33:40.000Z","size":62,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-13T01:53:57.110Z","etag":null,"topics":["ai","fabric","lua","neovim","neovim-plugin","text-processing"],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PhantomYdn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-01-12T17:46:17.000Z","updated_at":"2026-01-13T01:42:50.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/PhantomYdn/fabric-ai.nvim","commit_stats":null,"previous_names":["phantomydn/fabric-ai.nvim"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/PhantomYdn/fabric-ai.nvim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhantomYdn%2Ffabric-ai.nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhantomYdn%2Ffabric-ai.nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhantomYdn%2Ffabric-ai.nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhantomYdn%2Ffabric-ai.nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PhantomYdn","download_url":"https://codeload.github.com/PhantomYdn/fabric-ai.nvim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhantomYdn%2Ffabric-ai.nvim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28543510,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T14:59:57.589Z","status":"ssl_error","status_checked_at":"2026-01-18T14:59:46.540Z","response_time":98,"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","fabric","lua","neovim","neovim-plugin","text-processing"],"created_at":"2026-01-17T06:46:44.377Z","updated_at":"2026-01-18T17:01:11.649Z","avatar_url":"https://github.com/PhantomYdn.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fabric-ai.nvim\n\nA Neovim plugin that integrates [Fabric AI](https://github.com/danielmiessler/fabric)'s 220+ text processing patterns directly into your editor.\n\n\u003cimg width=\"2460\" height=\"1902\" alt=\"image\" src=\"https://github.com/user-attachments/assets/51dfb3f3-6e3c-474c-99ba-30a2c059b908\" /\u003e\n\n\n## Features\n\n- **Visual Selection Processing** - Select text and apply any Fabric pattern\n- **URL Processing** - Process YouTube transcripts and web page content\n- **Pattern Picker** - Fuzzy search with Telescope (or vim.ui.select fallback)\n- **Pattern Preview** - See pattern descriptions before applying\n- **Streaming Output** - Real-time display as Fabric processes\n- **Floating Window** - Clean, centered output display\n- **Output Actions** - Replace, yank, or open in new buffer\n- **Cancel Support** - Cancel long-running operations anytime\n\n## Requirements\n\n- Neovim 0.10.0+\n- [Fabric AI CLI](https://github.com/danielmiessler/fabric) (`fabric-ai`)\n- Optional: [Telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) for enhanced picker with preview\n\n## Installation\n\n### rocks.nvim\n\n```vim\n:Rocks install fabric-ai.nvim\n```\n\n### lazy.nvim\n\n```lua\n{\n  \"PhantomYdn/fabric-ai.nvim\",\n  cmd = { \"Fabric\" },\n  dependencies = {\n    { \"nvim-telescope/telescope.nvim\", optional = true },\n  },\n  opts = {\n    -- Default configuration (all optional)\n    fabric_path = \"fabric-ai\",     -- Path to Fabric CLI\n    patterns_path = nil,           -- Custom patterns dir (auto-detect if nil)\n    timeout = 300000,              -- Command timeout in ms (5 minutes)\n    window = {\n      width = 0.8,                 -- 80% of editor width\n      height = 0.8,                -- 80% of editor height\n      border = \"rounded\",\n    },\n  },\n  keys = {\n    -- fabric-ai.nvim doesn't have default keymappings\n    { \"\u003cleader\u003efa\", \":'\u003c,'\u003eFabric\u003cCR\u003e\", mode = \"v\", desc = \"Fabric AI\" },\n    { \"\u003cleader\u003efu\", \":Fabric url\u003cCR\u003e\", mode = \"n\", desc = \"Fabric URL\" },\n  },\n}\n```\n\n### Alternative: Load on VeryLazy\n\n```lua\n{\n  \"PhantomYdn/fabric-ai.nvim\",\n  event = \"VeryLazy\",\n  dependencies = {\n    { \"nvim-telescope/telescope.nvim\", optional = true },\n  },\n  opts = {},\n}\n```\n\n### Note on Lazy-Loading\n\nWhen using `cmd = { \"Fabric\" }`, the plugin loads on first command invocation. Run `:Fabric health` to trigger loading and verify your setup. If you prefer the plugin to load at startup (for immediate CLI validation), use `event = \"VeryLazy\"` instead.\n\n## Usage\n\n### Text Processing\n\nThe plugin supports three input modes:\n\n#### 1. Visual Selection\n\n1. Select text in visual mode (`v`, `V`, or `\u003cC-v\u003e`)\n2. Run `:Fabric`\n3. Pick a pattern from the fuzzy finder\n4. View streaming output in floating window\n5. Choose an action\n\n#### 2. Range Selection\n\nProcess specific lines without visual selection:\n\n- `:%Fabric` - Process entire file\n- `:10,20Fabric` - Process lines 10-20\n- `:.Fabric` - Process current line\n\n#### 3. Direct Prompt\n\nRun `:Fabric` without any selection to enter a prompt directly:\n\n1. Run `:Fabric` (with no selection)\n2. Enter your prompt in the input field (\"Ask Fabric: \")\n3. Pick a pattern\n4. View output\n\n**Note:** Replace action (`r`) is not available in prompt mode since there's nothing to replace.\n\n### Output Actions\n\n| Key | Action | Description |\n|-----|--------|-------------|\n| `r` | Replace | Replace original selection with output (not available in prompt mode) |\n| `y` | Yank | Copy output to system clipboard |\n| `n` | New Buffer | Open output in new markdown buffer |\n| `q` | Quit | Close window, discard output |\n| `\u003cEsc\u003e` | Quit | Same as `q` |\n| `\u003cC-c\u003e` | Quit | Same as `q` |\n\n### URL Processing\n\nProcess web pages and YouTube videos without copying content manually:\n\n1. Place cursor on a URL in your buffer\n2. Run `:Fabric url`\n3. Pick a pattern\n4. View output and choose an action\n\n**YouTube URLs** (youtube.com, youtu.be) automatically extract transcripts using Fabric's `-y` flag.\n\n**Other URLs** fetch and process web page content using Fabric's `-u` flag.\n\n### During Processing\n\nWhile Fabric is processing, you can cancel at any time by pressing `q`, `\u003cEsc\u003e`, or `\u003cC-c\u003e`.\n\n### Commands\n\n| Command | Description |\n|---------|-------------|\n| `:Fabric` | Process visual selection, or prompt for input if no selection |\n| `:'\u003c,'\u003eFabric` | Process visual selection (explicit range) |\n| `:%Fabric` | Process entire file |\n| `:10,20Fabric` | Process lines 10-20 |\n| `:Fabric run` | Same as `:Fabric` |\n| `:Fabric url` | Process URL under cursor |\n| `:Fabric health` | Run health check (`:checkhealth fabric-ai`) |\n\n## Use Case Examples\n\n### Summarize Long Text\n\n```\n1. Select a long article or documentation\n2. :Fabric\n3. Select \"summarize\" pattern\n4. Press `r` to replace with summary, or `y` to copy\n```\n\n### Extract Wisdom from YouTube Video\n\n```\n1. Paste a YouTube URL in your buffer\n2. Place cursor on the URL\n3. :Fabric url\n4. Select \"extract_wisdom\" pattern\n5. Press `n` to open insights in new buffer\n```\n\n### Clean Text for Obsidian Notes\n\n```\n1. Select messy text (web copy, email, etc.)\n2. :Fabric\n3. Select \"clean_text\" or \"improve_writing\" pattern\n4. Press `r` to replace with clean version\n```\n\n### Explain Code\n\n```\n1. Select a function or code block\n2. :Fabric\n3. Select \"explain_code\" pattern\n4. Press `n` to open explanation in new buffer\n```\n\n### Improve Writing\n\n```\n1. Select your draft text\n2. :Fabric\n3. Select \"improve_writing\" pattern\n4. Press `r` to replace, or `y` to compare\n```\n\n### Analyze Web Article\n\n```\n1. Paste article URL in buffer\n2. Place cursor on URL\n3. :Fabric url\n4. Select \"analyze_paper\" or \"extract_main_idea\"\n5. Press `n` to review analysis\n```\n\n## Configuration\n\n### Default Configuration\n\n```lua\nrequire(\"fabric-ai\").setup({\n  -- Path to Fabric CLI executable\n  fabric_path = \"fabric-ai\",\n  \n  -- Custom patterns directory (nil = auto-detect ~/.config/fabric/patterns)\n  patterns_path = nil,\n  \n  -- Command timeout in milliseconds (5 minutes)\n  timeout = 300000,\n  \n  -- Floating window settings\n  window = {\n    width = 0.8,    -- Fraction of editor width (0.0-1.0)\n    height = 0.8,   -- Fraction of editor height (0.0-1.0)\n    border = \"rounded\",  -- Border style\n  },\n  \n  -- Default output action (reserved for future use)\n  default_action = \"window\",\n})\n```\n\n### Border Styles\n\nValid border styles: `\"none\"`, `\"single\"`, `\"double\"`, `\"rounded\"`, `\"solid\"`, `\"shadow\"`\n\n### Configuration Validation\n\nThe plugin validates your configuration on setup. Invalid values trigger a warning via `vim.notify()` and fall back to sensible defaults. For example:\n\n- `timeout = -100` warns and uses `300000`\n- `window.width = 2.0` warns and uses `0.8`\n\n### Fabric CLI Check\n\nOn setup, the plugin checks if the Fabric CLI is available. If not found, a warning is displayed. This helps catch configuration issues early.\n\n## How It Works\n\n1. **Selection Capture** - Captures your visual selection and stores the range\n2. **Pattern Discovery** - Runs `fabric-ai -l` to list available patterns\n3. **Pattern Picker** - Shows Telescope picker (or vim.ui.select) with pattern preview\n4. **Streaming Execution** - Runs `fabric-ai -s -p \u003cpattern\u003e` with your text as stdin\n5. **Real-time Display** - Shows output in floating window as it streams\n6. **Output Actions** - Apply chosen action (replace, yank, new buffer, or discard)\n\nFor URL processing, the flow is similar but uses `-y` (YouTube) or `-u` (web) flags instead of stdin.\n\n## Health Check\n\nVerify your setup with:\n\n```vim\n:checkhealth fabric-ai\n```\n\nOr:\n\n```vim\n:Fabric health\n```\n\nThis checks:\n- Neovim version (0.10.0+ required)\n- Fabric CLI availability and version\n- Patterns directory existence\n\n## Known Limitations\n\n- **Block-wise visual mode** (`\u003cC-v\u003e`) is not fully supported for the replace action. Character-wise (`v`) and line-wise (`V`) modes work correctly.\n- **Telescope recommended** - Without Telescope, the fallback picker (vim.ui.select) lacks pattern preview.\n\n## Troubleshooting\n\n### \"Fabric CLI not found\"\n\nEnsure `fabric-ai` is in your PATH, or configure the full path:\n\n```lua\nopts = {\n  fabric_path = \"/path/to/fabric-ai\",\n}\n```\n\n### \"No patterns found\"\n\nRun `fabric-ai -U` to download/update patterns, then verify:\n\n```bash\nfabric-ai -l\n```\n\n### Plugin not loading\n\nIf using `cmd = { \"Fabric\" }`, the plugin loads lazily. Run `:Fabric health` to trigger load and check status.\n\n### Processing times out\n\nIncrease the timeout for long content or slow connections:\n\n```lua\nopts = {\n  timeout = 300000,  -- 5 minutes\n}\n```\n\n## Documentation\n\nFull documentation available via:\n\n```vim\n:help fabric-ai\n```\n\n## Contributing\n\nSee [AGENTS.md](AGENTS.md) for development guidelines.\n\n## License\n\nMIT License - see [LICENSE](LICENSE)\n\n## Credits\n\n- [Fabric AI](https://github.com/danielmiessler/fabric) by Daniel Miessler\n- Inspired by the Neovim plugin ecosystem\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphantomydn%2Ffabric-ai.nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphantomydn%2Ffabric-ai.nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphantomydn%2Ffabric-ai.nvim/lists"}