본문 바로가기
AI

Cursor CLI

by 조병희 2025. 8. 8.

GPT-5가 출시되면서 오래만에 Cursor를 켰더니 Cursor CLI 출시했다는 팝업이 보였습니다.

https://cursor.com/cli

 

Cursor CLI | Cursor - The AI Code Editor

Install and use the Cursor command-line interface to run AI coding workflows and automate tasks from your terminal.

cursor.com

 

설치

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

Cursor Agent Installer

✓ Detected darwin/arm64
✓ Package downloaded and extracted
✓ Package installed successfully
✓ Bin directory ready
✓ Symlink created

✨ Installation Complete! 


Next Steps

1. Add ~/.local/bin to your PATH:
   For bash:
   echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
   source ~/.bashrc

   For zsh:
   echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
   source ~/.zshrc

2. Start using Cursor Agent:
   cursor-agent


Happy coding! 🚀

echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
   source ~/.zshrc
cursor-agent
 Signing in with the browser...

 ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
 │ ⬢ Welcome to Cursor Agent Beta                                                                                        │
 │                                                                                                                       │
 │ Cursor Agent CLI is in beta. Security safeguards are still evolving. It can read, modify, and delete files, and       │
 │ execute shell commands you approve. Use at your own risk and only in trusted environments.                            │
 │                                                                                                                       │
 │ Please read about our security at https://cursor.com/security.                                                        │
 └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘


  Cursor Agent
  ~ · (cwd is not a git repository, cursor rules and ignore files don't apply)
Error loading MCP config od [McpError]: MCP error -32000: Connection closed
    at pFe._onclose (file:///Users/bhjo/.local/share/cursor-agent/versions/2025.08.08-f57cb59/index.js:380:15645)
    at _transport.onclose (file:///Users/bhjo/.local/share/cursor-agent/versions/2025.08.08-f57cb59/index.js:380:14919)
    at ChildProcess.<anonymous> (file:///Users/bhjo/.local/share/cursor-agent/versions/2025.08.08-f57cb59/index.js:382:1302)
    at ChildProcess.emit (node:events:518:28)
    at maybeClose (node:internal/child_process:1101:16)
    at ChildProcess._handle.onexit (node:internal/child_process:304:5) {
  code: -32000,
  data: undefined
}
   
 ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
 │ → /                                                                                                                   │
 └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
   → /model <model>     Set or list models
     /auto-run [state]  Toggle auto-run (default) or set [on|off|status]
     /new-chat          Start a new chat session
     /clear             Start a new chat session
     /vim               Toggle Vim keys
     /help [command]    Show help (/help [cmd])

 

Cursor CLI 를 잠시 사용해보니. GPT-5 써 본다는 것과 IDE 통합이 다른 툴들보다 나은 것 같고, 급하게 내 놓은 느낌이 다소 든다.

 

사용량

작성시점인 25.8.8  현재 기준으로 동일한 내용으로 Cladue Code, Gemini Cli 를 같이 사용해 보니 Cursor CLI는 무제한으로 사용가능한 것 같다. 더 길뿐 할당량이 존재한다.

  ▶︎ Auto-run all commands (shift+tab to turn off)

  OpenAI GPT-5
  / for commands

  Error: You've hit your usage limit for GPT-5
  Get Cursor Pro for more Agents use, unlimited Tab, and more.
  fallbackModel: o3
  spendLimitHit: false
  chatMessage: *You've hit your free requests limit. [Upgrade to 
  Pro](https://www.cursor.com/api/auth/checkoutDeepControl?tier=pro) for more usage, 
  frontier models, Background Agents, and more. Your usage limits will reset when your 
  monthly cycle ends on 9/7/2025.*

https://cursor.com/dashboard?tab=usage 에서 사용량 확인 가능하다.

 

MCP

설명에 따르면 "The CLI will automatically detect and respect your mcp.json configuration file, enabling the same MCP servers and tools that you’ve configured for the IDE." IDE와 같이 쓴다고 하나 실제 mcp.json 파일에는 아무것도 기록되지 않았다.

 ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
 │ add mcp playwright.                                                                                                                         │
 └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

  작업을 시작하기 전에, 기존 MCP 툴 구조와 패턴을 파악하고 Playwright 툴 추가에 필요한 파일 위치와 등록 방식을 확인하겠습니다. 이어서 필요한
  파일을 생성/수정하고, playwright를 optional dependency로 선언하며, 동적 로딩과 에러 메시지를 포함하겠습니다.

  ⬢ Searched, Read 2 searches, 4 files
    … 3 earlier items hidden
    Grep "playwright" in .
    Read mcp-server/src/core/direct-functions/research.js
    Read mcp-server/src/tools/utils.js

  Playwright MCP 도구를 추가하기 위해 새 툴 파일을 만들고, MCP 툴 인덱스에 등록하겠습니다. 툴은 프로젝트 루트에서 npx playwright test를 JSON
  리포터로 실행하고 결과를 구조화해 반환합니다. 설치 여부를 점검하고 적절한 에러 메시지를 제공합니다.

 ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
 │ mcp-server/src/tools/playwright.js +176                                                                                               WRITE │
 │                                                                                                                                             │
 │    1 │ /**                                                                                                                                  │
 │    2 │  * tools/playwright.js                                                                                                               │
 │    3 │  * MCP tool to run Playwright tests within the user's project and return structured results                                          │
 │    4 │  */                                                                                                                                  │
 │    5 │                                                                                                                                      │
 │    6 │ import { z } from 'zod';                                                                                                             │
 │    7 │ import { spawnSync } from 'child_process';                                                                                           │
 │    8 │ import fs from 'fs';                                                                                                                 │
 │    9 │ import path from 'path';                                                                                                             │
 │   10 │ import {                                                                                                                             │
 │   11 │   createErrorResponse,                                                                                                               │
 │   12 │   handleApiResult,                                                                                                                   │
 │   13 │ … truncated (164 more lines)                                                                                                         │
 └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

  ⬢ Read mcp-server/src/tools/index.js

 ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
 │ mcp-server/src/tools/index.js +4                                                                                                            │
 │                                                                                                                                             │
 │     1    import { registerScopeUpTool } from './scope-up.js';                                                                               │
 │     2    import { registerScopeDownTool } from './scope-down.js';                                                                           │
 │     3 +  import { registerPlaywrightTool } from './playwright.js';                                                                          │
 │     4                                                                                                                                       │
 │     5    /**                                                                                                                                │
 │     6  ...                                                                                                                                  │
 │     7    		// Group 8: Research Features                                                                                                    │
 │     8    		registerResearchTool(server);                                                                                                    │
 │     9 +                                                                                                                                     │
 │    10 +  		// Group 9: QA & Test Runners                                                                                                    │
 │    11 +  		registerPlaywrightTool(server);                                                                                                  │
 │    12    	} catch (error) {                                                                                                                 │
 │    13  … truncated (1 more line)                                                                                                            │
 └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

  ⬢ Read package.json

  간단 상태 업데이트
  • MCP에 playwright 툴을 추가하고 툴 등록까지 완료했습니다. 프로젝트 루트에서 npx playwright test --reporter=json을 실행해 구조화 결과를
    반환합니다. 프로젝트에 Playwright가 없으면 친절한 설치 가이드를 에러로 제공합니다.


  추가/변경 사항

  • 새 툴: mcp-server/src/tools/playwright.js
  • 툴 등록: mcp-server/src/tools/index.js에 registerPlaywrightTool 임포트 및 등록


  사용 방법

  • MCP 툴 이름: playwright
  • 파라미터:
    • projectRoot(string, abs path): 필수·자동 보정
    • testPath(string, optional): 특정 테스트 파일/디렉터리
    • grep(string, optional): 테스트명 필터(-g)
    • project(string, optional): Playwright 프로젝트명(--project)
    • headed(boolean, optional): 헤디드 모드
    • debug(boolean, optional): 디버그 모드
    • workers(number, optional): 워커 수(--workers)
    • timeoutMs(number, optional): 실행 타임아웃(기본 300000)
  • 반환: 실행 커맨드, 종료코드, 소요시간, 성공 여부, reporterJson(JSON 파싱 성공 시), 실패 시 stdout/stderr

  예시 호출 컨텍스트(개념):
  • name: playwright
  • args: { projectRoot: "/abs/path/to/your-app", grep: "login", project: "chromium", headed: true }

  주의
  • 대상 프로젝트(projectRoot)에 Playwright가 설치되어 있어야 합니다:
    • 설치: npm i -D @playwright/test
    • 브라우저 설치: npx playwright install

  요약
  • playwright MCP 툴을 추가해 VS Code/Cursor MCP에서 바로 Playwright 테스트를 실행하고 JSON 리포트를 구조화해 받도록 했습니다.
  • 툴 파일 mcp-server/src/tools/playwright.js 생성, mcp-server/src/tools/index.js에 등록 완료.
  • 프로젝트에 미설치 시 명확한 설치 지시를 반환합니다.


  + mcp-server/src/tools/playwright.js (+176)
  ~ mcp-server/src/tools/index.js (+4)

 

Rules 

Rules도 IDE와 공유 되는 듯 했다.

 ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
 │ show rules.                                                                                                                                 │
 └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

  ⬢ Globbed, listed, Read 1 glob, 2 directories, 1 file
    … 1 earlier item hidden
    List .cursor
    List .cursor/rules
    Read .cursor/rules/glossary.mdc

  짧게 진행 상황: 규칙 모음은 .cursor/rules/에 있으며, 전체 개요가 담긴 glossary.mdc를 표시합니다. 원하시면 특정 규칙 파일도 바로 열어드릴게요.

   .cursor/rules/glossary.mdc lines 1-25

     1 │ ---
     2 │ description: Glossary of other Cursor rules
     3 │ globs: **/*
     4 │ alwaysApply: true
     5 │ ---
     6 │ # Glossary of Task Master Cursor Rules
     7 │
     8 │ This file provides a quick reference to the purpose of each rule file located in the `.cursor/rules` directory.
     9 │
    10 │ - **[`architecture.mdc`](mdc:.cursor/rules/architecture.mdc)**: Describes the high-level architecture of the Task Master CLI application,
       │ including the new tagged task lists system.
    11 │ - **[`changeset.mdc`](mdc:.cursor/rules/changeset.mdc)**: Guidelines for using Changesets (npm run changeset) to manage versioning and
       │ changelogs.
    12 │ - **[`commands.mdc`](mdc:.cursor/rules/commands.mdc)**: Guidelines for implementing CLI commands using Commander.js.
    13 │ - **[`cursor_rules.mdc`](mdc:.cursor/rules/cursor_rules.mdc)**: Guidelines for creating and maintaining Cursor rules to ensure consistency
       │  and effectiveness.
    14 │ - **[`dependencies.mdc`](mdc:.cursor/rules/dependencies.mdc)**: Guidelines for managing task dependencies and relationships across tagged
       │ task contexts.
    15 │ - **[`dev_workflow.mdc`](mdc:.cursor/rules/dev_workflow.mdc)**: Guide for using Task Master to manage task-driven development workflows
       │ with tagged task lists support.
    16 │ - **[`glossary.mdc`](mdc:.cursor/rules/glossary.mdc)**: This file; provides a glossary of other Cursor rules.
    17 │ - **[`mcp.mdc`](mdc:.cursor/rules/mcp.mdc)**: Guidelines for implementing and interacting with the Task Master MCP Server.
    18 │ - **[`new_features.mdc`](mdc:.cursor/rules/new_features.mdc)**: Guidelines for integrating new features into the Task Master CLI with
       │ tagged system considerations.
    19 │ - **[`self_improve.mdc`](mdc:.cursor/rules/self_improve.mdc)**: Guidelines for continuously improving Cursor rules based on emerging code
       │ patterns and best practices.
    20 │ - **[`taskmaster.mdc`](mdc:.cursor/rules/taskmaster.mdc)**: Comprehensive reference for Taskmaster MCP tools and CLI commands with tagged
       │ task lists information.
    21 │ - **[`tasks.mdc`](mdc:.cursor/rules/tasks.mdc)**: Guidelines for implementing task management operations with tagged task lists system
       │ support.
    22 │ - **[`tests.mdc`](mdc:.cursor/rules/tests.mdc)**: Guidelines for implementing and maintaining tests for Task Master CLI.
    23 │ - **[`ui.mdc`](mdc:.cursor/rules/ui.mdc)**: Guidelines for implementing and maintaining user interface components.
    24 │ - **[`utilities.mdc`](mdc:.cursor/rules/utilities.mdc)**: Guidelines for implementing utility functions including tagged task lists
       │ utilities.
    25 │ - **[`telemetry.mdc`](mdc:.cursor/rules/telemetry.mdc)**: Guidelines for integrating AI usage telemetry across Task Master.

  요약
  • 규칙 디렉터리: .cursor/rules/
  • 위 인덱스에서 원하는 파일명을 말씀해주시면 즉시 열람/표시해 드립니다.

 

'AI' 카테고리의 다른 글

gpt-oss CLI? ( codex-cli 0.20.0 )  (1) 2025.08.11
GPT-OSS 등장  (3) 2025.08.06
Super Claude  (3) 2025.07.26
Claude Code - Pro 사용자  (4) 2025.07.21
바이브 코딩으로 만들어 보기 - 3D 캐릭터로 글자 만들기(2)  (0) 2025.07.16

댓글