Skip to content

Installation

Chris Watson edited this page Nov 21, 2024 · 2 revisions

Installation Guide

Goshot can be installed either as a CLI tool for command-line usage or as a library for integration into your Go projects. This guide covers both installation methods and their requirements.

Prerequisites

Before installing Goshot, ensure you have:

  • Go 1.21 or later installed
  • Git (for installation from source)

CLI Tool Installation

Note

The CLI tool is a work in probress, but should be more or less functional.

The CLI tool allows you to create code screenshots directly from your terminal.

Basic Installation

go install github.com/watzon/goshot/cmd/goshot@latest

Note: The CLI tool is currently under development. Some features might be limited or in beta.

Verifying Installation

After installation, verify that Goshot is properly installed by running:

goshot --version

Library Installation

To use Goshot as a library in your Go projects:

Basic Library Installation

go get github.com/watzon/goshot

Import in Your Project

import "github.com/watzon/goshot"

Building from Source

If you want to build Goshot from source:

  1. Clone the repository:

    git clone https://github.com/watzon/goshot.git
    cd goshot
  2. Build the CLI tool:

    go build ./cmd/goshot

Troubleshooting

If you encounter any issues during installation:

  1. Ensure your Go version is up to date:

    go version
  2. Check that your GOPATH is correctly set:

    echo $GOPATH
  3. Make sure the Go bin directory is in your PATH:

    echo $PATH

For additional help, please open an issue on the GitHub repository.