### Install and Run Pre-commit Hooks Source: https://github.com/keybase/client/blob/master/go/updater/README.md Instructions for setting up and running pre-commit hooks for development. This includes installing pre-commit, getting gometalinter, and installing the hooks. ```bash pip install pre-commit go get -u github.com/alecthomas/gometalinter gometalinter --install --update pre-commit install pre-commit run -a ``` -------------------------------- ### Quick Start iOS Build and Run Source: https://github.com/keybase/client/blob/master/shared/docs/ios.md Commands to set up project modules, install pods, build the Go library, and start the development server. ```bash yarn modules && yarn pod-install yarn rn-gobuild-ios # build the go library open ios/Keybase.xcworkspace # Open workspace, not xcodeproj yarn rn-start2 # start the packager ``` -------------------------------- ### Install CocoaPods and Setup Workspace Source: https://github.com/keybase/client/blob/master/osx/README.md Instructions for installing CocoaPods and generating the Keybase workspace. Ensure CocoaPods is installed before running 'pod install'. ```sh sudo gem install cocoapods pod setup pod install open Keybase.xcworkspace ``` -------------------------------- ### Install Multiple Keybase Components Source: https://github.com/keybase/client/blob/master/osx/README.md Installs several Keybase components including the helper tool, Fuse, the mount directory, and the KBFS service. This is useful for a full setup. ```sh keybase install --components=helper,fuse,mountdir,kbfs ``` -------------------------------- ### Install Keybase Service Component Source: https://github.com/keybase/client/blob/master/osx/README.md Installs the Keybase service using the go install package. This command ensures the service is set up in launchd. ```sh keybase install --components=service ``` -------------------------------- ### Pin Build Tool Version Source: https://github.com/keybase/client/blob/master/go/notes/modules.md Specify and install a particular version of a build tool using 'go get'. The version is recorded in go.mod, and 'go install' makes the tool available in your $GOPATH/bin. ```bash go get github.com/some/build/tool@version ``` -------------------------------- ### Install Keybase Native Messaging Client (kbnm) Source: https://github.com/keybase/client/blob/master/browser/README.md Manually install the Keybase Native Messaging client and its whitelist for the extension. Ensure you have Go installed. ```shell go get -u github.com/keybase/client/go/kbnm $GOPATH/bin/kbnm install ``` -------------------------------- ### Build the Installer Script Source: https://github.com/keybase/client/blob/master/osx/Scripts/README.md Execute this shell script to build the Keybase installer. Ensure all prerequisites are met and Xcode settings are configured. ```sh ./build_installer.sh ``` -------------------------------- ### Install KBFuse Source: https://github.com/keybase/client/blob/master/osx/Fuse/README.md Run this script to manually install KBFuse after building. It's recommended to uninstall any previous versions first. ```shell ./install.sh ``` -------------------------------- ### Install Dependencies Source: https://github.com/keybase/client/blob/master/shared/README.md Run this command within the 'shared/' directory to set up project dependencies. ```sh yarn modules ``` -------------------------------- ### Install npm Dependencies Source: https://github.com/keybase/client/blob/master/packaging/desktop/README.md Run this command to install the necessary dependencies for the build script. ```bash npm install ``` -------------------------------- ### Interact with KBFS Mount Source: https://github.com/keybase/client/blob/master/go/kbfs/README.md Example commands to interact with a mounted KBFS instance, showing listing directories and creating files. ```bash ls /keybase/private/strib ``` ```bash echo blahblah > /keybase/private/strib/foo ``` ```bash ls /keybase/private/strib,max ``` -------------------------------- ### Test the Keybase Installer Source: https://github.com/keybase/client/blob/master/osx/Scripts/README.md Run this command to test the Keybase installer application. Specify the application path, run mode, and timeout for the test. ```sh ./build/KeybaseInstaller.app/Contents/MacOS/Keybase --app-path=/Applications/Keybase.app --run-mode=prod --timeout=10 --install-helper ``` -------------------------------- ### Install Dependencies for KBFS Tests Source: https://github.com/keybase/client/blob/master/go/kbfs/README.md Install all necessary dependencies for running KBFS tests. ```bash go test -i ./... ``` -------------------------------- ### Build Debug Installer Source: https://github.com/keybase/client/blob/master/packaging/windows/readme.md Execute scripts to build debug executables and then create a debug installer using WiX. Restart CMD.exe after installing WIX to ensure it's found. ```cmd build_prerelease.cmd buildui.cmd doinstaller_wix.cmd debug ``` -------------------------------- ### Repackage App from Installed Binaries Source: https://github.com/keybase/client/blob/master/packaging/desktop/README.md Re-package the application bundle using binaries from an already installed Keybase application. This is useful for creating a distributable package from a local installation. ```bash KEYBASE_BINPATH=/Applications/Keybase.app/Contents/SharedSupport/bin/keybase KBFS_BINPATH=/Applications/Keybase.app/Contents/SharedSupport/bin/kbfs ./package_darwin.sh ``` -------------------------------- ### Configure Visual Studio Environment Source: https://github.com/keybase/client/blob/master/packaging/windows/readme.md Set up the environment for building installers by calling the Visual Studio 32-bit environment variables script. ```batch call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\vsvars32.bat" ``` -------------------------------- ### Verify KBFuse Installation Source: https://github.com/keybase/client/blob/master/osx/Fuse/README.md If you encounter issues loading the kext after installation, use this command to load it manually. This command is for verification purposes. ```shell sudo kextutil -l /Library/Filesystems/kbfuse.fs/Contents/Extensions/11/kbfuse.kext ``` -------------------------------- ### Build Debug Installer (Script) Source: https://github.com/keybase/client/blob/master/packaging/windows/readme.md A convenience script that combines the steps for building debug executables and the installer. ```cmd .\build_debug_installer.cmd ``` -------------------------------- ### Install Precommit Hooks for Code Style Source: https://github.com/keybase/client/blob/master/go/kbfs/README.md Install precommit hooks to ensure code passes gofmt and govet checks before committing. Requires Go 1.15+. ```bash go get golang.org/x/tools/cmd/vet ln -s $GOPATH/src/github.com/keybase/client/git-hooks/pre-commit $GOPATH/src/github.com/keybase/client/go/kbfs/.git/hooks/pre-commit ``` -------------------------------- ### Run Keybase after Installation Source: https://github.com/keybase/client/blob/master/packaging/linux/test/README.md Command to execute after installing the Keybase package on Arch Linux, typically run as a specific user. ```bash run_keybase ``` -------------------------------- ### Run the Keybase service Source: https://github.com/keybase/client/blob/master/go/README.md Starts the local Keybase service. The service can be run with a custom home directory and debug logging enabled. ```bash keybase service ``` ```bash keybase -H ~/Projects/Keybase/dev -d service ``` -------------------------------- ### Install Keybase Package on Arch Linux Source: https://github.com/keybase/client/blob/master/packaging/linux/test/README.md Installs the latest Keybase package from the local build directory on Arch Linux using pacman. The `ls -tr ... | tail -1` command selects the most recently built package. ```bash pacman -U --noconfirm `ls -tr /root/build/arch/keybase-bin/*.xz | tail -1` ``` -------------------------------- ### Run a Keybase Service Source: https://github.com/keybase/client/blob/master/packaging/linux/docker/README.md Starts a detached Keybase service container. Ensure to use a persistent volume or `--volumes-from` for state. ```bash $ docker run --name some-keybase -d keybaseio/client ``` -------------------------------- ### Start React Native Packager Source: https://github.com/keybase/client/blob/master/shared/docs/android.md If you cannot reach the packager, run this command in your project directory. ```bash yarn rn-start2 ``` -------------------------------- ### Release Keybase Browser Extension Source: https://github.com/keybase/client/blob/master/browser/README.md Use this command to build a release version of the extension. Assumes jq is installed. ```shell make release ``` -------------------------------- ### Set up Go environment and build Keybase client Source: https://github.com/keybase/client/blob/master/go/README.md This snippet outlines the steps to set up the Go environment (GOPATH) and build the Keybase command-line client using Git. Ensure Go 1.19 or higher is installed. ```bash mkdir ~/gopath export GOPATH="$HOME/gopath" export PATH="$PATH:$GOPATH/bin" git clone https://github.com/keybase/client.git cd client/go go install -tags production github.com/keybase/client/go/keybase keybase ``` -------------------------------- ### Get Dokan SHA1 Hash Source: https://github.com/keybase/client/blob/master/packaging/windows/readme.md Use PowerShell to calculate the SHA1 hash of the Dokan installer executable. This is needed for updating the installer project. ```powershell powershell Get-FileHash -Algorithm sha1 DokanSetup_redist.exe ``` -------------------------------- ### Install Yarn with Chocolatey Source: https://github.com/keybase/client/blob/master/packaging/windows/readme.md Install Yarn using the Chocolatey package manager. This is a quick alternative to manual installation. ```bash choco install yarn ``` -------------------------------- ### Build kbfsdokan Source: https://github.com/keybase/client/blob/master/go/kbfs/kbfsdokan/README.md Navigate to the kbfsdokan directory and build the executable using Go. ```bash cd kbfs/kbfsdokan && go build ``` -------------------------------- ### Package from Existing Binaries Source: https://github.com/keybase/client/blob/master/packaging/desktop/README.md Package the application using pre-existing Keybase and KBFS binaries. Specify the full paths to these binaries. ```bash KEYBASE_BINPATH=/path/to/keybase KBFS_BINPATH=/path/to/kbfs ./package_darwin.sh ``` -------------------------------- ### KBFS Service Install (macOS) Source: https://github.com/keybase/client/blob/master/shared/docs/installer_and_updater_architecture.md Installs or updates the Keybase Filesystem (KBFS) service component. This command is part of the native installer's process for updating system services. ```sh keybase install --components=kbfs ``` -------------------------------- ### Build Keybase Services Locally Source: https://github.com/keybase/client/blob/master/packaging/prerelease/README.md Builds Keybase services (go binaries) directly into an existing app install for faster debugging/testing. Specify the BUILD_DIR and PLATFORM environment variables. ```bash BUILD_DIR=/Applications/Keybase.app/Contents/SharedSupport/bin PLATFORM=darwin ./build_keybase.sh ``` ```bash BUILD_DIR=/Applications/Keybase.app/Contents/SharedSupport/bin PLATFORM=darwin ./build_kbfs.sh ``` -------------------------------- ### Create Github Release and Upload Binary Source: https://github.com/keybase/client/blob/master/packaging/github/README.md Run this script with a VERSION environment variable to create a Github release, build the binary, and upload it. Use 'keybase.sh' for the main Keybase application. ```shell VERSION=1.0.9 ./keybase.sh ``` -------------------------------- ### Install Dependencies Source: https://github.com/keybase/client/blob/master/shared/docs/ios.md Installs necessary tools like watchman and cocoapods for iOS development. ```bash brew install watchman cocoapods #install the file watcher ``` -------------------------------- ### Build Keybase Browser Extension for Development Source: https://github.com/keybase/client/blob/master/browser/README.md Run these commands to build a fresh extension for development and loading into browsers. ```shell yarn make ``` -------------------------------- ### macOS Watchman Installation Source: https://github.com/keybase/client/blob/master/shared/README.md Install Watchman using Homebrew if you encounter issues with file descriptors. ```sh brew install watchman ``` -------------------------------- ### Create Github Release and Upload Binary (KBFS) Source: https://github.com/keybase/client/blob/master/packaging/github/README.md Run this script with a VERSION environment variable to create a Github release, build the binary, and upload it. Use 'kbfs.sh' for the Keybase File System (KBFS) application. ```shell VERSION=1.0.0 ./kbfs.sh ``` -------------------------------- ### Install NDK Bundle Source: https://github.com/keybase/client/blob/master/shared/docs/android.md Install the NDK bundle using the sdkmanager command-line tool. This is required for `yarn rn-gobuild-android`. ```bash sdkmanager --install "ndk-bundle" ``` -------------------------------- ### Prepare and Build Keybase Package in Arch Docker Source: https://github.com/keybase/client/blob/master/packaging/linux/test/README.md Commands to execute inside the Arch Linux Docker environment to prepare the build directory, create a user, switch to that user, build the Keybase package, and exit. ```bash chmod a+rw /root/build useradd -m strib su - strib cd /root/client/packaging/linux/arch/ ./build_test_package.sh /root/build exit ``` -------------------------------- ### Build KBFuse Bundle Source: https://github.com/keybase/client/blob/master/osx/Fuse/README.md Execute this command to build the kbfuse.bundle and fsbundle.tgz. Ensure you have the correct VERSION set. ```shell VERSION=4.2.4 ./build.sh ``` -------------------------------- ### Package from Github Release Source: https://github.com/keybase/client/blob/master/packaging/desktop/README.md Build the application by specifying Keybase and KBFS versions from a Github release. Ensure you have the necessary permissions and environment variables set. ```bash KEYBASE_VERSION=1.0.9-0 KBFS_VERSION=1.0.0 ./package_darwin.sh ``` -------------------------------- ### Example PVL Kit Structure Source: https://github.com/keybase/client/blob/master/pvl-tools/README.md This is an example of the structure of a PVL kit, which is an object containing PVL chunks for each supported PVL version. ```json { "kit_version": 1, "ctime": 1489075972, "tab": { "1": { "pvl_version": 1, "revision": 3, "services": {... etc ...} }, "2": { "pvl_version": 2, "revision": 4, "services": {... etc ...} } } } ```