import{exec as e}from"node:child_process";import{promisify as a}from"node:util";import{existsSync as i}from"node:fs";import{join as t}from"node:path";import{homedir as o}from"node:os";var n=a(e);async function u(){try{return await n("cursor-agent --version"),"cursor-agent"}catch{let c=[t(o(),".local","bin","cursor-agent"),t(o(),".cursor","bin","cursor-agent"),t(o(),".cursor-agent","bin","cursor-agent")];for(let r of c)if(i(r))try{return await n(`"${r}" --version`),r}catch{}return null}}async function b(){return await u()!==null}function y(){return`
\u274C cursor-agent CLI not found!

To use the Cursor agent, install it from:
\u{1F4E6} https://github.com/getcursor/cursor-agent

Installation:
  curl https://cursor.com/install -fsS | bash

After installation:
  1. Add ~/.local/bin to your PATH:
     For zsh: echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc
     For bash: echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc
  
  2. Or restart your terminal/shell

Then retry your command.
`}export{b as checkCursorAgentInstalled,u as findCursorAgentPath,y as getCursorAgentInstallInstructions};
