|
| 1 | +# Amp |
| 2 | + |
| 3 | +The tool for building and managing blockchain datasets. |
| 4 | + |
| 5 | +## Installation |
| 6 | + |
| 7 | +The easiest way to install Amp is using `ampup`, the official version manager and installer: |
| 8 | + |
| 9 | +```sh |
| 10 | +curl --proto '=https' --tlsv1.2 -sSf https://ampup.sh/install | sh |
| 11 | +``` |
| 12 | + |
| 13 | +This will install `ampup` and the latest version of `ampd`. You may need to restart your terminal or run `source ~/.zshenv` (or your shell's equivalent) to update your PATH. |
| 14 | + |
| 15 | +Once installed, you can manage `ampd` versions: |
| 16 | + |
| 17 | +```sh |
| 18 | +# Install or update to the latest version |
| 19 | +ampup install |
| 20 | + |
| 21 | +# Switch between installed versions |
| 22 | +ampup use |
| 23 | +``` |
| 24 | + |
| 25 | +For more details and advanced options, see `ampup --help`. |
| 26 | + |
| 27 | +### Installation via Nix |
| 28 | + |
| 29 | +> This will be supported once the source repository has been released |
| 30 | +
|
| 31 | +For Nix users, `ampd` is available as a flake: |
| 32 | + |
| 33 | +```sh |
| 34 | +# Run directly without installing |
| 35 | +nix run github:edgeandnode/amp |
| 36 | + |
| 37 | +# Install to your profile |
| 38 | +nix profile install github:edgeandnode/amp |
| 39 | + |
| 40 | +# Try it out temporarily |
| 41 | +nix shell github:edgeandnode/amp -c ampd --version |
| 42 | +``` |
| 43 | + |
| 44 | +You can also add it to your NixOS or home-manager configuration: |
| 45 | + |
| 46 | +```nix |
| 47 | +{ |
| 48 | + inputs = { |
| 49 | + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; |
| 50 | + amp = { |
| 51 | + url = "github:edgeandnode/amp"; |
| 52 | + inputs.nixpkgs.follows = "nixpkgs"; |
| 53 | + }; |
| 54 | + }; |
| 55 | +
|
| 56 | + outputs = { nixpkgs, amp, ... }: { |
| 57 | + # NixOS configuration |
| 58 | + nixosConfigurations.myhost = nixpkgs.lib.nixosSystem { |
| 59 | + # ... |
| 60 | + environment.systemPackages = [ |
| 61 | + amp.packages.${system}.ampd |
| 62 | + ]; |
| 63 | + }; |
| 64 | +
|
| 65 | + # Or home-manager configuration |
| 66 | + home.packages = [ |
| 67 | + amp.packages.${system}.ampd |
| 68 | + ]; |
| 69 | + }; |
| 70 | +} |
| 71 | +``` |
| 72 | + |
| 73 | +Note: Nix handles version management, so `ampup` is not needed for Nix users. |
| 74 | + |
| 75 | +### Building from Source (Manual) |
| 76 | + |
| 77 | +> This will be supported once the source repository has been released |
| 78 | +
|
| 79 | +If you prefer to build manually without using `ampup`: |
| 80 | + |
| 81 | +```sh |
| 82 | +cargo build --release -p ampd |
| 83 | +``` |
| 84 | + |
| 85 | +The binary will be available at `target/release/ampd`. |
0 commit comments