{"id":29055841,"url":"https://github.com/xfenix/bootstrap-macbook-for-python","last_synced_at":"2025-06-27T04:35:40.499Z","repository":{"id":80343618,"uuid":"432806623","full_name":"xfenix/bootstrap-macbook-for-python","owner":"xfenix","description":"Do you have a new MacBook, and are you a web developer who prefers working with languages like Python and TypeScript? This guide will assist you in setting up a highly efficient environment","archived":false,"fork":false,"pushed_at":"2023-12-25T00:51:36.000Z","size":561,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-04-14T07:14:26.992Z","etag":null,"topics":["apple","bootstrap","configuration","initial","m1","m1pro","macbook","macbook-pro","nodejs","poetry","pyenv","python","vscode"],"latest_commit_sha":null,"homepage":"","language":null,"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/xfenix.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}},"created_at":"2021-11-28T19:34:31.000Z","updated_at":"2024-03-24T07:57:47.000Z","dependencies_parsed_at":"2023-06-05T23:45:12.176Z","dependency_job_id":null,"html_url":"https://github.com/xfenix/bootstrap-macbook-for-python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xfenix/bootstrap-macbook-for-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xfenix%2Fbootstrap-macbook-for-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xfenix%2Fbootstrap-macbook-for-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xfenix%2Fbootstrap-macbook-for-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xfenix%2Fbootstrap-macbook-for-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xfenix","download_url":"https://codeload.github.com/xfenix/bootstrap-macbook-for-python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xfenix%2Fbootstrap-macbook-for-python/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262188403,"owners_count":23272344,"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":["apple","bootstrap","configuration","initial","m1","m1pro","macbook","macbook-pro","nodejs","poetry","pyenv","python","vscode"],"created_at":"2025-06-27T04:35:01.756Z","updated_at":"2025-06-27T04:35:40.471Z","avatar_url":"https://github.com/xfenix.png","language":null,"readme":"# Fresh macbook bootstrap\nSay for example you got new macbook and you are web developer with stack consist of python for backend and/or typescript for frontend. This instruction will help you to prepare your macbook for work in cutting edge environment.\n- [Fresh macbook bootstrap](#fresh-macbook-bootstrap)\n  - [Basic setup](#basic-setup)\n  - [Python part](#python-part)\n  - [VSCode configuration](#vscode-configuration)\n\n## Basic setup\n1. Setup o my zsh\n    ```bash\n    sh -c \"$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)\"\n    ```\n1. Generate ssh key:\n    ```bash\n    ssh-keygen -o -a 100 -t ed25519 -C \"ad@xfenix.ru\"\n    ```\n    Copy you key in the clipboard:\n    ```\n    cat ~/.ssh/id_ed25519.pub | pbcopy\n    ```\n1. Install FiraCode font: https://github.com/tonsky/FiraCode\n1. Install chrome: https://www.google.com/chrome/\n1. Reccomended extensions:\n   1. https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm?hl=en\n   1. https://chrome.google.com/webstore/detail/tab-suspender/fiabciakcmgepblmdkmemdbbkilneeeh?hl=en\n   1. Also for Russian users: https://chrome.google.com/webstore/detail/%D0%BE%D0%B1%D1%85%D0%BE%D0%B4-%D0%B1%D0%BB%D0%BE%D0%BA%D0%B8%D1%80%D0%BE%D0%B2%D0%BE%D0%BA-%D1%80%D1%83%D0%BD%D0%B5%D1%82%D0%B0/npgcnondjocldhldegnakemclmfkngch?hl=ru\n   1. https://chrome.google.com/webstore/detail/grammar-spell-checker-%E2%80%94-l/oldceeleldhonbafppcapldpdifcinji\n1. Install homebrew:\n    ```bash\n    /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\n    ```\n1. Install all necessary packages:\n    ```bash\n    brew install postman stats itsycal git iterm2 visual-studio-code pyenv gpg-suite shottr marta node dozer appcleaner keyboardcleantool karabiner-elements\n    ```\n    1. \u003ca href=\"https://github.com/Mortennn/Dozer\" target=\"_blank\"\u003eDozer\u003c/a\u003e help you to organize your menu bar, since macbook notch gain troubles in this area\n    1. \u003ca href=\"https://marta.sh\" target=\"_blank\"\u003eMarta\u003c/a\u003e is the sublime-like completely free file manager\n    1. AppCleaner help you clean garbage after application removal\n    1. \u003ca href=\"https://folivora.ai/keyboardcleantool\"\u003eKeyboardCleanTool\u003c/a\u003e helps you to clean you keyboard! Very useful app for every developer\n    1. \u003ca href=\"https://shottr.cc/\"\u003eShottr\u003c/a\u003e literally best screenshot tool\n    1. (Optional) Karabiner elements will be useful for remapping keys on the Russian keyboard layout. This really helps for ~ symbol return. On other keyboard layouts it not so useful by default\n1. Configure Iterm2:\n   1. It helps not to disturb you ![](iterm2-part1.png)\n   1. Best font ![](iterm2-part2.png)\n   1. Good looking + Guake/Quake like behavior ![](iterm2-part3.png)\n1. For macbook with Apple chip (M1, M1 pro, M1 max) install Rosetta2: \n    ```\n    softwareupdate --install-rosetta\n    ```\n1. Install docker dekstop: https://www.docker.com/products/docker-desktop\n1. Setup git client:\n   1. Generate GPG key in GPG keychain\n   1. Run command:\n        ```bash\n        gpg --list-secret-keys\n        ```\n        Then copy following key:\n        ![gpg key](./gpg-key.png)\n   1. Setup:  \n        ```bash\n        git config --global user.name \"Denis Anikin\"\n        git config --global user.email ad@xfenix.ru\n        git config --global user.signingkey KEY_FROM_PREVIOUS_STEP\n        git config --global commit.gpgsign true\n        ```\n    1. Export GPG key in GPG keychain\n    1. Paste it in https://github.com/settings/gpg/new\n1. File things:\n   1. Create projects dir `mkdir ~/web/`\n   1. Exclude from spotlight indexing (greatly reduce CPU pressure):  -\u003e Settings -\u003e Spotlight -\u003e Privacy, press +, then `⌘ + shift + g` and enter following paths:\n      1. `~/web/`\n      1. `~/Library/Containers`\n\n## Python part\n1. Setup pyenv\n    ```bash\n    echo 'eval \"$(pyenv init --path)\"' \u003e\u003e ~/.zprofile\n    echo 'eval \"$(pyenv init -)\"' \u003e\u003e ~/.zshrc\n    ```\n1. Install and select desired python\n   ```bash\n   pyenv install 3.12.1\n   pyenv global 3.12.1\n   ```\n1. Install all necessary packages\n    ```bash\n    pip install ruff mypy\n    ```\n1. Configure poetry:\n    ```\n    poetry config cache-dir ~/.cache/pypoetry/\n    ```\n1. Dont forget to restart bash/zsh session!\n\n## VSCode configuration\nThis config meant for python development. But you can grab any part of it for other purposes.\u003cbr\u003e\n1. Open the Command Palette (⌘ + ⇧ + P on Mac) OR View ❯ Command Palette\n1. Type shell command to find Shell Command: Install 'code' command in PATH command\n1. Install extensions:\n    ```bash\n    code --install-extension wk-j.save-and-run\n    code --install-extension esbenp.prettier-vscode\n    code --install-extension GitHub.github-vscode-theme\n    code --install-extension helgardrichard.helium-icon-theme\n    code --install-extension mde.select-highlight-minimap\n    code --install-extension miguelsolorio.fluent-icons\n    code --install-extension ms-python.mypy-type-checker\n    code --install-extension ms-python.python\n    code --install-extension ms-python.vscode-pylance\n    code --install-extension yzhang.markdown-all-in-one\n    ```\n1. Place following in you `settings.json`:\n    ```json\n    {\n        \"workbench.colorTheme\": \"GitHub Dark\",\n        \"workbench.iconTheme\": \"helium-icon-theme\",\n        \"workbench.productIconTheme\": \"fluent-icons\",\n\n        \"markdown.preview.typographer\": true,\n        \"markdown.extension.orderedList.marker\": \"one\",\n\n        \"editor.wordBasedSuggestions\": false,\n        \"editor.fontFamily\": \"FiraCode-Retina\",\n        \"editor.fontSize\": 14,\n        \"editor.fontLigatures\": true,\n        \"editor.formatOnPaste\": true,\n        \"editor.formatOnType\": true,\n        \"editor.formatOnSave\": true,\n        \"editor.renderWhitespace\": \"all\",\n        \"editor.rulers\": [120],\n\n        \"debug.console.fontSize\": 14,\n\n        \"terminal.integrated.fontSize\": 14,\n\n        \"emmet.triggerExpansionOnTab\": true,\n        \"emmet.includeLanguages\": {\n            \"plaintext\": \"html\"\n        },\n\n        \"saveAndRun\": {\n            \"commands\": [\n                {\n                    \"match\": \".py\",\n                    \"cmd\": \"ruff check --config=${workspaceFolder}/pyproject.toml ${file}\",\n                    \"silent\": true,\n                },\n                {\n                    \"match\": \".py\",\n                    \"cmd\": \"ruff format --config=${workspaceFolder}/pyproject.toml ${file}\",\n                    \"silent\": true,\n                },\n            ]\n        },\n    }\n    ```\n1. Dont forget to replace `xfenix` with you user!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxfenix%2Fbootstrap-macbook-for-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxfenix%2Fbootstrap-macbook-for-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxfenix%2Fbootstrap-macbook-for-python/lists"}