This repository contains TypeScript libraries and tools for working with the Cursor API.
This monorepo contains the following packages:
cursor-api
: TypeScript library for interacting with the Cursor APIcursor-tool
: CLI tools for Cursor IDE
- Node.js 18+
- pnpm 8+
# Clone the repository
git clone https://github.com/xwartz/cursor-api.git
cd cursor-api
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Run tests
pnpm test
# Run linting
pnpm lint
# Run type checking
pnpm type-check
# Extract Cursor token
pnpm get-token
cursor-api/
├── packages/
│ ├── cursor-api/ # Main API library
│ └── cursor-tool/ # CLI tools
├── e2e/ # End-to-end tests
└── .github/ # GitHub workflows
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Please make sure your code passes all tests, linting, and type checking before submitting a PR.
Packages are published to npm using the following workflow:
- Changes are merged to the
main
branch - The CI/CD pipeline runs tests and builds the packages
- 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
MIT