{"id":16107733,"url":"https://github.com/n3d1117/cook","last_synced_at":"2026-02-18T15:31:47.818Z","repository":{"id":53575048,"uuid":"227448643","full_name":"n3d1117/cook","owner":"n3d1117","description":"macOS command line tool to automate common iOS development tasks","archived":false,"fork":false,"pushed_at":"2022-05-21T11:23:19.000Z","size":3430,"stargazers_count":92,"open_issues_count":1,"forks_count":15,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-16T13:35:46.796Z","etag":null,"topics":["altstore","apple","commandline-tool","iosdevelopment","provisioning-profiles","swift","xcode"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/n3d1117.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-11T19:55:33.000Z","updated_at":"2025-03-13T17:02:32.000Z","dependencies_parsed_at":"2022-08-28T21:22:20.225Z","dependency_job_id":null,"html_url":"https://github.com/n3d1117/cook","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n3d1117%2Fcook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n3d1117%2Fcook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n3d1117%2Fcook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n3d1117%2Fcook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/n3d1117","download_url":"https://codeload.github.com/n3d1117/cook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244078053,"owners_count":20394409,"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","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":["altstore","apple","commandline-tool","iosdevelopment","provisioning-profiles","swift","xcode"],"created_at":"2024-10-09T19:24:15.563Z","updated_at":"2025-03-17T17:31:39.960Z","avatar_url":"https://github.com/n3d1117.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cook 👨🏻‍🍳\nCook is a macOS command line tool wrapped around [Riley Testut's AltSign](https://github.com/rileytestut/AltSign) to automate common iOS development tasks, such as managing iOS certificates, app identifiers, devices, provisioning profiles and resigning `.ipa` files. It works with free Apple IDs (not enrolled in the developer program).\n\n\u003cimg src=\"https://user-images.githubusercontent.com/11541888/71422933-f1f39600-2685-11ea-8e03-06061e74398f.png\" alt=\"Cook demo\" title=\"cook\"\u003e\n\n## Usage\n```\n./cook [AUTHENTICATION] [RECIPE] [RECIPE_ARGUMENTS]\n```\n\n### Generic arguments\n\n`-h, --help` prints usage information\n \n`-v, --verbose` enables verbose mode\n \n`-j, --json` use json output (all --output-* args are ignored in this mode)\n\n### Authentication\nTo authenticate you can pass the following arguments to any recipe:\n`--appleId` (your Apple ID's email) and `--password` (Apple ID's Password).\n\nIf you prefer, you can set these environment variables instead: `COOK_APPLEID_EMAIL` and `COOK_APPLEID_PASSWORD`.\n\nPass `--2fa-code` to specify the six-digit two factor authentication code.\n\nYou can also specify `--base64-anisette-data` to use custom base64 encoded anisette data in your requests (for example, generated with `anisette_server` recipe).\n\n**NOTE:** Your Apple ID is **never** sent to anyone but Apple. Feel free to create a new Apple ID account to test it.\n\n### Recipes\n- **`create_certificate`** Create certificate (`.pem` or `.p12`) with arguments:\n\n\t```\n\t--machine-name      Optional machine name (defaults to 'cook')\n\t--input-csr         Optional path to an existing CSR file\n\t--output-pem        Path/Directory where to save output PEM file\n\t--output-p12        Path/Directory where to save output p12 file\n\t--p12-password      Optional P12 password, defaults to blank\n\t-f                  Force certificate revocation if needed\n\t```\n- **`register_app`** Register a new app with arguments:\n\n\t```\n\t--app-name          App name to register\n\t--app-bundle-id     Bundle identifier to register\n\t-f                  Force removal of previous app if needed\n\t```\n- **`register_device`** Register device with arguments:\n\n\t```\n\t--name              Device name (use quotes if it contains spaces)\n\t--udid              Device udid\n\t```\n- **`update_profile`** Update \u0026 download provisioning profile with arguments:\n\n\t```\n\t--bundle-id         Bundle identifier of the app\n\t--output-profile    Path/Directory where to save updated profile\n\t-f                  Force remove app ID and then readd it\n\t```\n- **`download_profiles`** Download provisioning profiles with arguments:\n\n\t```\n\t--bundle-id         Optional, to specify an app's identifier (defaults to all apps)\n\t--output-folder     Directory where to save the profiles\n\t```\n- **`resign`** Resign ipa file with arguments:\n\n\t```\n\t--ipa                 Path to .ipa file to resign\n\t--output-ipa          Optional path to resigned ipa (if not specified, original is overwritten)\n\t--p12                 Optional path to P12 certificate to use for resigning\n\t--p12-password        Optional P12 password\n\t--machine-name        Optional machine name to use when adding certificate (defaults to 'cook', ignored if --p12 is specified)\n\t-f                    Revoke certificate (if --p12 is not specified) if needed, register app id if needed\n\t```\n- **`anisette_server`** Listen to a specific port and respond with freshly generated base64 encoded anisette data. Arguments:\n\n\t```\n\t--port                Server port (defaults to 8080)\n\t--secret              Secret path (the url will be 127.0.0.1:{PORT}/{SECRET})\n\t```\n\n### JSON Mode\nIn JSON mode (`-j, --json` flag), command output is formatted as JSON. \n\u003cdetails\u003e\n\t\u003csummary\u003eSee possible JSON responses\u003c/summary\u003e\n\n```\n 'success':               '0' or '1'\n 'error':                 Error description (if success is 0)\n\n - create_certificate recipe\n   'pem_cert':            Plain text PEM cert\n   'base64_p12_cert':     Base 64 encoded P12 cert\n   'p12_password':        Plain text P12 password\n\n - update_profile recipe\n   'base_64_profile':     Base 64 encoded mobileprovision\n\n - download_profiles recipe\n   'profiles_count':      Number of profiles downloaded\n   'base64_profile_i':    i-th base 64 encoded mobileprovision (0\u003ci\u003c=profiles_count)\n \n - anisette_server recipe\n   'base64_encoded_data': Base 64 encoded anisette data\n```\n\u003c/details\u003e\n\n### Sample usage\nHere are some real world examples on how to use cook (authentication part is omitted):\n\u003cdetails\u003e\n\t\u003csummary\u003eSee examples\u003c/summary\u003e\n\n- Export `.pem` certificate generated using an existing `.csr` file:\n\n\t```bash\n\t./cook create_certificate --input-csr ~/desktop/req.csr --output-pem ~/desktop/cert.pem\n\t```\n\n- Export `.p12` certificate with password `123`:\n\t\n\t```bash\n\t./cook create_certificate --output-p12 ~/desktop/cert.p12 -—p12-password \"123\"\n\t```\n\n- Register app named `My Fancy App` with bundle identifier `my.fancy.app`:\n\t\n\t```bash\n\t./cook register_app --app-name \"My Fancy App\" --app-bundle-id my.fancy.app\n\t```\n\n- Register a device named `My iPhone 11 Pro` with udid `DEVICE_UDID`:\n\t\n\t```bash\n\t./cook register_device --name \"My iPhone 11 Pro\"  --udid \"DEVICE_UDID\"\n\t```\n\n- Update and export a provisioning profile for app with bundle identifier `my.fancy.app`:\n\t\n\t```bash\n\t./cook update_profile --bundle-id my.fancy.app --output-profile ~/desktop/profile.mobileprovision\n\t```\n\n- Download all existing provisioning profiles:\n\n\t```bash\n\t./cook download_profiles --output-folder ~/desktop/profiles/\n\t```\n\n- Resign `.ipa` file using a local p12 certificate (obtained with `create_certificate` recipe):\n\n\t```bash\n\t./cook resign --ipa ./app.ipa --p12 ./cert.p12 --p12-password \"123\"\n\t```\n\n- Resign `.ipa` file using a new certificate (`-f` revokes current one if necessary)\n\n\t```bash\n\t./cook resign --ipa ./app.ipa --output-ipa ./app_signed.ipa -f\n\t```\n\u003c/details\u003e\n\n## Installation\nDownload latest `cook.zip` release from the [releases page](https://github.com/n3d1117/cook/releases/latest) to your downloads folder and unzip it (or build manually from Xcode).\n\nIf you haven't already, you should install and enable the `Mail.app` plugin called `CookMailPlugin` (this is needed to fetch the correct headers to communicate with Apple's servers).\n\n\u003cdetails\u003e\n\t\u003csummary\u003eSee steps to install CookMailPlugin (only once):\u003c/summary\u003e\n\t\nRun the following commands:\n\n```bash\n$ cd ~/downloads/cook/\n$ sudo codesign -f -s - CookMailPlugin.mailbundle\n$ sudo mkdir -p /Library/Mail/Bundles\n$ sudo cp -R CookMailPlugin.mailbundle /Library/Mail/Bundles\n$ sudo defaults write \"/Library/Preferences/com.apple.mail\" EnableBundles 1\n```\nThen enable the plugin:\n\n* Open `Mail.app` and from the Menu bar go to `Mail` -\u003e `Preferences`\n* Click on `Manage Plug-ins...`\n* Enable `CookMailPlugin.mailbundle`\n* Click `Apply and Restart Mail`\n* Done!\n\n\u003cimg src=\"https://user-images.githubusercontent.com/11541888/71265083-c8fd9900-2345-11ea-9ac9-73031d9faf0e.png\" alt=\"Cook mail plugin\" title=\"mail plugin\" width=\"50%\"\u003e\n\n \u003c/details\u003e\n\nOnce the plugin is installed and enabled, you can use cook from the command line:\n\n```bash\n$ cd ~/downloads/cook/\n$ ./cook -h\n```\n\n## Build manually\nRun the following commands:\n\n```bash\n$ cd ~/downloads\n$ git clone https://github.com/n3d1117/cook.git\n$ cd cook/\n$ open cook.xcodeproj\n```\n\n## Credits\n* Riley Testut's [AltSign](https://github.com/rileytestut/AltSign) framework (part of [AltStore](https://altstore.io/))\n* Riley Testut's `AltPlugin.mailbundle` (part of [AltServer](https://github.com/rileytestut/AltStore/tree/master/AltServer))\n* [Kabir Oberai](https://twitter.com/kabiroberai) for the authentication code in AltSign\n* [appdb](https://appdb.to/) for the idea!\n* [Zond80](https://github.com/ZonD80/) for handling 2FA code\n\n## License\nLicensed under GNU General Public License v3.0. See [LICENSE](LICENSE) file for further information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn3d1117%2Fcook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fn3d1117%2Fcook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn3d1117%2Fcook/lists"}