Search, create, and manage your CodePen Pens, collections, and assets from Raycast
cp_user_…) for your own work, or a team key (cp_team_…) for that team's work.Your key is stored as a password preference. The extension sends it only to https://api.codepen.io/v2/ and does not store API results in a persistent cache.
| Command | What you can do |
|---|---|
| Search Pens | Search titles and descriptions; filter by editor, privacy, templates, or deployment; open, preview, copy links, edit metadata, fork, or trash Pens. |
| Create Pen | Create a 2.0 Pen with CodePen starter files or HTML, CSS, and JavaScript. Choose privacy and tags. |
| Search Collections | Browse collections and their Pens, edit collection details, or trash a collection. Add a Pen from its action menu. |
| Create Collection | Create a public or private collection. |
| Search Assets | Copy asset URLs, open files, read text source, rename files, or permanently delete assets. |
| Upload Asset | Upload a local file up to 30 MB and copy its URL. Requires PRO Asset Hosting. |
Within a Pen's actions, use Browse Source Files to read or copy source, edit text files, or add a text file. Browse Versions opens historical source files read-only. Use Deploy Pen to publish the latest successful saved build, or Take Deployment Down to remove the hosted deployment.
Pen searches use CodePen's search syntax: words must all match, "quoted phrases" stay together, and -word excludes a word. The API accepts up to 200 characters. Collections, collection contents, and assets search the loaded items; Load More includes another page. Only Pens owned by the API key appear inside a collection, even when it contains other people's Pens.
This release focuses on Pens, source files, collections, and assets. Collaborator management, editor settings, version restoration, and binary Pen-file uploads remain available in CodePen's editor.
Use @codepen to find your work, read source and build diagnostics, create or edit Pens, fork, deploy, manage collections, and create text assets. Mutations show a confirmation before they run.
Examples:
npm install
npm run dev
Validation:
npm run build
npx tsc --noEmit
npm run lint
npm test
npx ray evals -I --exit-on-error -s
The test suite uses mocked HTTP responses to exercise API contracts, version conflicts, multipart uploads, privacy, pagination, and uncertain write outcomes. AI evals use the fixtures in ai.yaml. Live verification requires your own CodePen key; do not commit it.
Manual smoke test: search an existing Pen, inspect its source, create a small Pen, edit one file, refresh after its build, add it to a collection, and upload a small asset if your plan supports it. Verify Classic Pens expose only supported actions. Deployment and deletion can be checked on disposable content.