Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ Thumbs.db
.codex/skills
.github/skills
.gemini/skills

# Nix output
result
65 changes: 65 additions & 0 deletions docs/INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Installation

- [Homebrew (macOS / Linux)](#homebrew-macos--linux)
- [Nix](#nix)
- [Windows](#windows)
- [Install from source (macOS / Linux)](#install-from-source-macos--linux)
- [Download binary (all platforms)](#download-binary-all-platforms)
Expand Down Expand Up @@ -31,6 +32,70 @@ brew update && brew upgrade engram

---

## Nix

Run directly without installing:

```bash
nix run github:Gentleman-Programming/engram
```

Build locally:

```bash
nix build
./result/bin/engram
```

Enter a development shell:

```bash
nix develop
```

<details>
<summary>Home Manager / NixOS integration</summary>

You can also add Engram from this repository flake into your own Nix configuration.

#### As a flake input

```nix
{
inputs.engram.url = "github:Gentleman-Programming/engram";
}
```

#### Home Manager

```nix
{ inputs, pkgs, ... }:

{
home.packages = [
inputs.engram.packages.${pkgs.system}.default
];
}
```

#### NixOS

```nix
{ inputs, pkgs, ... }:

{
environment.systemPackages = [
inputs.engram.packages.${pkgs.system}.default
];
}
```

This makes the `engram` binary available in your environment without installing Go manually.

</details>

---

## Windows

**Option A: Download the binary (recommended)**
Expand Down
61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

72 changes: 72 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
description = "engram - Persistent memory for AI coding agents";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };

pname = "engram";
version = "1.10.0";

engram = pkgs.buildGoModule {
inherit pname;
inherit version;
vendorHash = "sha256-wnRtuBn5H+UdWkXucpfHPEbFosVCUa8i9hVRXg5Wqc4=";
proxyVendor = true;

src = ./.;
subPackages = [ "cmd/engram" ];

env = {
CGO_ENABLED = "0";
};

ldflags = [
"-s"
"-w"
"-X main.version=${version}"
];

meta = with pkgs.lib; {
description = "Persistent memory for AI coding agents";
homepage = "https://github.com/Gentleman-Programming/engram";
license = licenses.mit;
mainProgram = "engram";
platforms = platforms.linux ++ platforms.darwin;
};
};
in
{
packages.default = engram;
packages.engram = engram;

apps.default = flake-utils.lib.mkApp {
drv = engram;
};

devShells.default = pkgs.mkShell {
packages = with pkgs; [
go_1_25
gopls
gotools
golangci-lint
delve
];
};

formatter = pkgs.nixfmt-rfc-style;
}
);
}