Install gnaw

TL;DR

bash
cargo install gnaw-ctx

Prerequisite

Make sure Rust and cargo are installed on your system.

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

This is the official way to install the latest stable version of Rust and Cargo. Make sure to refresh your PATH variable after installing Rust. Restart your terminal or run the instructions proposed by the installer.

source $HOME/.cargo/env

You can check that everything is installed correctly by running:

cargo --version
git --version

Command Line Interface (CLI) ๐Ÿ‘จโ€๐Ÿ’ป

bash
cargo install gnaw-ctx

๐Ÿงช Install the latest (unpublished) version from GitHub

If you want the latest features or fixes before they're released on crates.io:

cargo install --git https://github.com/gitbadger-clan/gnaw

Source build

Ideal for developers that want to build from source or contribute to the project.

  1. ๐Ÿ› ๏ธ Install prerequisites: Rust and Cargo, plus Git.
  2. ๐Ÿ“ฅ Clone the repository:
    git clone https://github.com/gitbadger-clan/gnaw.git
    cd gnaw
  3. ๐Ÿ“ฆ Install the binary. To build and install from source:
    cargo install --path crates/gnaw-ctx
    To build the binary without installing it:
    cargo build --release
    The binary will be available in the target/release directory.
  4. ๐Ÿš€ Run it:
    gnaw --help

Binary releases

Best for users that want to use the latest version without building from source. Download the latest binary for your OS from Releases.

Python bindings ๐Ÿ

The Python package is built with PyO3/maturin and is not yet published to PyPI. To build it from source:

  1. ๐Ÿ› ๏ธ Install prerequisites: Rust and Cargo, Git, and maturin.
  2. ๐Ÿ“ฅ Clone the repository:
    git clone https://github.com/gitbadger-clan/gnaw.git
    cd gnaw/crates/gnaw-python
  3. โš™๏ธ Build the package into your virtual environment:
    maturin develop -r

REST interface ๐ŸŒ

A REST interface for browser-extension integration is planned and will be documented here when it ships.