{"id":31817691,"url":"https://github.com/crossmint/crossmint-purchasing-devin-tool","last_synced_at":"2025-10-11T10:23:30.379Z","repository":{"id":282257985,"uuid":"947658586","full_name":"Crossmint/crossmint-purchasing-devin-tool","owner":"Crossmint","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-31T13:29:31.000Z","size":140,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-31T17:14:27.385Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Crossmint.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-13T03:26:53.000Z","updated_at":"2025-07-31T13:29:34.000Z","dependencies_parsed_at":"2025-03-13T19:15:08.187Z","dependency_job_id":null,"html_url":"https://github.com/Crossmint/crossmint-purchasing-devin-tool","commit_stats":null,"previous_names":["crossmint/crossmint-purchasing-devin-tool"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Crossmint/crossmint-purchasing-devin-tool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Crossmint%2Fcrossmint-purchasing-devin-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Crossmint%2Fcrossmint-purchasing-devin-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Crossmint%2Fcrossmint-purchasing-devin-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Crossmint%2Fcrossmint-purchasing-devin-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Crossmint","download_url":"https://codeload.github.com/Crossmint/crossmint-purchasing-devin-tool/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Crossmint%2Fcrossmint-purchasing-devin-tool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006851,"owners_count":26084204,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-11T10:23:16.309Z","updated_at":"2025-10-11T10:23:30.373Z","avatar_url":"https://github.com/Crossmint.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Devin Tool for Purchasing Physical Products\n\nA CLI tool for Devin to buy physical products. It pays using cryptocurrency via [Crossmint's Headless Checkout API](https://docs.crossmint.com/nft-checkout/headless/guides/physical-good-purchases). \n\n![image](https://github.com/user-attachments/assets/a0f6ae07-5799-4aad-98fc-28982156ef0c)\n\nQuestions? DM [@flymperopoulos](https://x.com/flymperopoulos) or [@alfongj](https://x.com/alfongj) on X.\n\n## Overview\n\nThis tool allows Devin to purchase physical products from various sources. It is entirely headless,\nnot requiring any slow and unreliable browser automations, and sidestepping automated bot prevention\nsuch as captchas, typical on e-commerce websites like Amazon. \n\nTo use this tool, you must copy this code in a repo Devin has access to, set up an API key and crypto\nwallet for Devin as secrets, and fill it up with USDC.\n\n## Under the hood\n\nThis is a CLI tool wrapping [Crossmint's Headless Checkout API](https://docs.crossmint.com/nft-checkout/headless/guides/physical-good-purchases). \n\nIt takes a URL or product ID, desired payment method (including crypto) and shipping information, and it returns \na transaction that, when signed, will cause the product to be delivered. \n\nCrossmint acts as merchant of record, takes care of shipping, and acts as merchant of record. \n\n## Features\n\n- Purchase physical products using cryptocurrency\n- Support for multiple product sources (currently Amazon, with more to come)\n- Same price as Amazon Prime, incl free shipping\n- Payment can be token across most EVM chains (e.g. Polygon, Base)\n- US only for now\n\n## Code setup\n\n- Node.js 16+\n- Crossmint API key \n- Crypto wallet funded in EVM (Base and Polygon supported)\n\n### Crossmint API Key\n\nGet a server-side Crossmint API key on [its console](https://www.crossmint.com/console/overview).\n\n- Required API key scopes: `orders.create` \n\n### Wallet Setup\n\nYou can use any existing EVM wallet of yours or create a new one and fund it. \n\n*Use existing wallet*\n- Specify the wallet's private key as part of the CLI command when using the tool \n\n*Create new wallet*\n- [Create a new wallet](https://docs.crossmint.com/api-reference/wallets/create-wallet) with Crossmint and fund it with some USDC and ETH\n  - Required API key scopes: `wallets.create` and `wallets.fund`\n \nYou can obtain USDC and ETH on coinbase (or ping the Crossmint team for help).\n\n## Devin Setup\n\n### Repository \n\nFork this repository inside your organization or copy the folder into an existing repo that Devin has access to. \n\nthen, on Devin's machine, run the installation steps below, so it's ready to use.\n\n### Knowledge Prompt\nLet Devin know about the tool under Settings \u003e\u003e Knowledge. Click on \"Add Knowledge\", name the knowledge \"Purchasing items\" and add the following notes: \n\n```\nYou have a tool available to purchase amazon items programmatically.\nIt's in \u003cpath where tool was installed\u003e.\nIf a user asks you to buy something, use this tool.\nYou can learn how to invoke the tool by reading the README.md file, Usage section\n```\n\nMake sure the prompt for the tool above points to the right repository.\n\n### Secrets\n\n- Define a `CROSSMINT_API_KEY` secret in Devin's knowledge for Devin to be able to access and use\n- Define an `EVM_PRIVATE_KEY` secret in Devin's knowledge for Devin to be able to sign and execute onchain transactions\n\n## Installation\n\n```bash\n# Install dependencies\npnpm install\n\n# Build the tool\npnpm build\n```\n\n## Usage\nThese instructions are for Devin\n\n```bash\n# Using an Amazon product URL (direct method)\nnode dist/cli.js buy --source amazon --url \"https://www.amazon.com/dp/B01DFKC2SO\" --api-key \"your-crossmint-api-key\" --private-key \"your-private-key\"\n\n# Using an Amazon product ID (ASIN) (direct method)\nnode dist/cli.js buy --source amazon --id \"B01DFKC2SO\" --api-key \"your-crossmint-api-key\" --private-key \"your-private-key\"\n\n# Check order status (direct method)\nnode dist/cli.js status --order-id \"your-order-id\" --api-key \"your-crossmint-api-key\"\n\n# Alternative: Using pnpm start (note: arguments must be passed without spaces in the command)\npnpm start buy --source amazon --url \"https://www.amazon.com/dp/B01DFKC2SO\" --api-key \"your-crossmint-api-key\" --private-key \"your-private-key\"\n```\n\nYou can also set the API key and private key using environment variables:\n\n```bash\n# Create a .env file based on the example\ncp .env.example .env\n\n# Edit the .env file with your keys\nnano .env\n\n# Run the command without passing the keys\nnode dist/cli.js buy --source amazon --url \"https://www.amazon.com/dp/B01DFKC2SO\"\n```\n\n### Command Options\n\n```\nUsage: crypto-physical-buyer [options] [command]\n\nA tool for buying physical products using cryptocurrency via Crossmint\n\nOptions:\n  -V, --version             output the version number\n  -h, --help                display help for command\n\nCommands:\n  buy [options]             Buy a physical product using cryptocurrency\n  status [options]          Check the status of an existing order\n  help [command]            display help for command\n```\n\n### Buy Command Options\n\n```\nUsage: crypto-physical-buyer buy [options]\n\nBuy a physical product using cryptocurrency\n\nOptions:\n  -s, --source \u003csource\u003e              Product source (e.g., amazon) (default: \"amazon\")\n  -u, --url \u003curl\u003e                    Product URL\n  -i, --id \u003cid\u003e                      Product ID (e.g., ASIN for Amazon)\n  -k, --api-key \u003ckey\u003e                Crossmint API key\n  -e, --email \u003cemail\u003e                Buyer email address\n  -p, --private-key \u003ckey\u003e            Private key for transaction signing\n  --address-name \u003cname\u003e              Shipping address name\n  --address-line1 \u003cline1\u003e            Shipping address line 1\n  --address-line2 \u003cline2\u003e            Shipping address line 2\n  --address-city \u003ccity\u003e              Shipping address city\n  --address-state \u003cstate\u003e            Shipping address state\n  --address-postal-code \u003ccode\u003e       Shipping address postal code\n  --address-country \u003ccountry\u003e        Shipping address country\n  -h, --help                         display help for command\n```\n\n### Status Command Options\n\n```\nUsage: crypto-physical-buyer status [options]\n\nCheck the status of an existing order\n\nOptions:\n  -i, --order-id \u003cid\u003e       Order ID (required)\n  -k, --api-key \u003ckey\u003e       Crossmint API key\n  -h, --help                display help for command\n```\n\n### Environment Variables\n\nThe tool supports the following environment variables:\n- `CROSSMINT_API_KEY` - Your Crossmint API key for authentication\n- `PRIVATE_KEY` - Private key for transaction signing\n- `NODE_ENV` - Environment setting (production or staging)\n\n## Development\n\n### Building\n```bash\npnpm build\n```\n\n### Testing\n```bash\npnpm test\n```\n\n## API Reference\n\nFor more information about the Crossmint API, see the [official documentation](https://docs.crossmint.com/nft-checkout/headless/guides/physical-good-purchases).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrossmint%2Fcrossmint-purchasing-devin-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrossmint%2Fcrossmint-purchasing-devin-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrossmint%2Fcrossmint-purchasing-devin-tool/lists"}