0%

Install

You can complete the three steps below to install Cogent Core on your system. You can also explore the demo, basics, tutorials, and widgets. You can also see how to build apps.

    1. Download and install Go from the Go website if you do not already have Go 1.27.0+ installed.

    2. Run the following command to install the Cogent Core command line tool. You should run this command again each time you update to a new version of Cogent Core.

go install cogentcore.org/core@main
  1. 1. After reading the info for your platform below, run the following command to install platform-specific dependencies. You must restart your shell/prompt/terminal after running the command.
core setup

Later, you can update the Cogent Core command line tool and the tools that it uses (such as the GoScript compiler and bun for the js platform) to their latest versions with the following command. Add -check to only see which tools have updates.

core update

macOS

This installs the xcode-tools. You may need to follow installer prompts.

Windows

This installs w64devkit and Git. You must run the setup command from a shell/prompt/terminal (such as Command Prompt or Git Bash) explicitly “Run as administrator”. You may need to follow steps in installers; the default options are good. After running this command, you must run all future commands related to Cogent Core in Git Bash.

Linux

This installs Go, gcc, and various graphics libraries. You may need to enter your password so that it can run sudo commands.

If you want to install manually instead, the commands for each distro are listed below.

Linux install commands

Debian/Ubuntu:  sudo apt install gcc libgl1-mesa-dev libegl1-mesa-dev mesa-vulkan-drivers xorg-dev libwayland-dev libxkbcommon-dev
Fedora:         sudo dnf install gcc libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel mesa-libGL-devel libXi-devel libXxf86vm-devel mesa-vulkan-drivers wayland-devel libxkbcommon-devel
Arch:           sudo pacman -S xorg-server-devel libxcursor libxrandr libxinerama libxi vulkan-swrast wayland libxkbcommon
Solus:          sudo eopkg it -c system.devel mesalib-devel libxrandr-devel libxcursor-devel libxi-devel libxinerama-devel vulkan wayland-devel libxkbcommon-devel
openSUSE:       sudo zypper install gcc libXcursor-devel libXrandr-devel Mesa-libGL-devel libXi-devel libXinerama-devel libXxf86vm-devel libvulkan1 wayland-devel libxkbcommon
Void:           sudo xbps-install -S base-devel xorg-server-devel libXrandr-devel libXcursor-devel libXinerama-devel vulkan-loader wayland-devel libxkbcommon-devel
Alpine:         sudo apk add gcc libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev linux-headers mesa-dev vulkan-loader wayland-dev libxkbcommon-dev
NixOS:          nix-shell -p libGL pkg-config xorg.libX11.dev xorg.libXcursor xorg.libXi xorg.libXinerama xorg.libXrandr xorg.libXxf86vm mesa.drivers vulkan-loader wayland libxkbcommon

Demo

You can run the Cogent Core Demo to verify Cogent Core is properly installed on your system:

go run cogentcore.org/core/examples/demo@main

You can also see the web version of the demo.

Troubleshooting

If you run into any issues while installing Cogent Core or trying to run the demo, please re-read all of the install instructions above and make sure that you have followed them.

If the problem still happens, it is probably related to WebGPU and/or Vulkan. If you are on Linux, please follow these instructions (or other ones for your distro) to make sure you have your device-specific Vulkan drivers installed.

If you still have problems, please file an issue. Please include the output of webgpuinfo in your bug report. If you are on Linux, please also include the output of vulkaninfo.

After the demo is working, you can explore the basics, tutorials, and widgets. You can also see how to build apps.