Skip to content

xwartz/cursor-api

Repository files navigation

Cursor API Monorepo

This repository contains TypeScript libraries and tools for working with the Cursor API.

CI TypeScript

Packages

This monorepo contains the following packages:

  • cursor-api: TypeScript library for interacting with the Cursor API
  • cursor-tool: CLI tools for Cursor IDE

Getting Started

Prerequisites

  • Node.js 18+
  • pnpm 8+

Installation

# Clone the repository
git clone https://github.com/xwartz/cursor-api.git
cd cursor-api

# Install dependencies
pnpm install

# Build all packages
pnpm build

Development Workflow

# Run tests
pnpm test

# Run linting
pnpm lint

# Run type checking
pnpm type-check

# Extract Cursor token
pnpm get-token

Project Structure

cursor-api/
├── packages/
│   ├── cursor-api/        # Main API library
│   └── cursor-tool/        # CLI tools
├── e2e/                   # End-to-end tests
└── .github/               # GitHub workflows

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Please make sure your code passes all tests, linting, and type checking before submitting a PR.

Publishing

Packages are published to npm using the following workflow:

  1. Changes are merged to the main branch
  2. The CI/CD pipeline runs tests and builds the packages
  3. Packages are published to npm with the appropriate version

To manually publish packages:

# Publish all packages
pnpm run release

# Publish a specific package
cd packages/cursor-tool
pnpm publish

License

MIT

About

TypeScript library for the Cursor API

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •