Skip to content

Commit cd5298c

Browse files
iccocursoragent
andauthored
feat!: Rewrite for the new backend (#79)
A new major version! --------- Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 5dc8603 commit cd5298c

12 files changed

Lines changed: 552 additions & 492 deletions

File tree

.github/workflows/ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,39 @@ jobs:
3939
run: go install honnef.co/go/tools/cmd/staticcheck@latest
4040
- name: Run staticcheck
4141
run: staticcheck -go ${{ matrix.go-version }} ./...
42+
lint:
43+
name: Lint
44+
runs-on: ubuntu-latest
45+
permissions:
46+
contents: write
47+
steps:
48+
- uses: actions/checkout@v6
49+
- name: Set up Go
50+
uses: actions/setup-go@v6
51+
with:
52+
go-version: "1.25"
53+
- name: Run go fmt
54+
run: go fmt ./...
55+
- name: Commit formatting changes
56+
run: |
57+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
58+
git config --local user.name "github-actions[bot]"
59+
git add -A
60+
git diff --staged --quiet || git commit -m "style: apply go fmt"
61+
git push || true
62+
- name: golangci-lint
63+
uses: golangci/golangci-lint-action@v9
64+
with:
65+
version: v2.8.0
4266
build:
4367
name: Build
4468
runs-on: ubuntu-latest
4569
steps:
4670
- uses: actions/checkout@v6
4771
- name: Set up Go
4872
uses: actions/setup-go@v6
73+
with:
74+
go-version: "1.25"
4975
- name: Cache Go modules
5076
uses: actions/cache@v5
5177
with:

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ jobs:
5555
- name: golangci-lint
5656
uses: reviewdog/action-golangci-lint@v2
5757
with:
58-
golangci_lint_version: v1.64.8
58+
golangci_lint_version: v2.8.0
5959
level: warning
6060
golangci_lint_flags: --timeout=15m

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Set up Go
1919
uses: actions/setup-go@v6
2020
with:
21-
go-version: stable
21+
go-version: "1.25"
2222
- name: Determine next version
2323
id: versioning
2424
if: github.event_name != 'push' || !startsWith(github.ref, 'refs/tags/')

README.md

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![Go Reference](https://pkg.go.dev/badge/github.com/icco/etu.svg)](https://pkg.go.dev/github.com/icco/etu)
55

66

7-
Etu is a simple journaling tool that uses Notion as a database.
7+
Etu is a simple journaling tool that talks to the [etu-backend](https://github.com/icco/etu-backend) API over gRPC (default: `grpc.etu.natwelch.com`).
88

99
It should be noted the main goal of Etu is to write interstitial journals. See https://betterhumans.pub/replace-your-to-do-list-with-interstitial-journaling-to-increase-productivity-4e43109d15ef for more on this topic.
1010

@@ -19,23 +19,29 @@ brew install etu
1919

2020
### Local Build
2121

22-
Build Dependencies:
22+
**Dependencies:** Go 1.25 or later, [Task](https://taskfile.dev/) (optional).
2323

24-
- Go 1.25 or later
25-
- https://taskfile.dev/
24+
1. `git clone` the repo
25+
2. `task build` (or `go build -o etu .`)
26+
3. Run `./etu`
2627

27-
Build
28+
## Usage
2829

29-
1. git clone code
30-
1. `task build`
31-
1. `./etu`
30+
Before running you need an API key for the etu-backend. You can:
3231

33-
## Usage
32+
1. Put your API key in `~/.config/etu/config.json` with keys `api_key` and optionally `grpc_target` (default: `grpc.etu.natwelch.com:443`), or
33+
2. Set the `ETU_API_KEY` environment variable (and optionally `ETU_GRPC_TARGET`).
34+
35+
Example config file:
3436

35-
Before running you need to set `NOTION_KEY`. Optionally, you can set `OPENAI_API_KEY` to enable automatic tag generation.
37+
```json
38+
{
39+
"api_key": "your-64-char-hex-api-key",
40+
"grpc_target": "grpc.etu.natwelch.com:443"
41+
}
42+
```
3643

37-
- To get a Notion key go to https://www.notion.so/profile/integrations
38-
- To get an OpenAI key (optional) go to https://platform.openai.com/api-keys
44+
Config and the "time since last post" cache live under `~/.config/etu/`. Tag generation and storage are handled by the backend; see [etu-backend](https://github.com/icco/etu-backend) for setup.
3945

4046
```
4147
$ etu
@@ -46,7 +52,7 @@ Usage:
4652
etu [command]
4753
4854
Available Commands:
49-
create Create a new journal entry. If no date provided, current time will be used.
55+
create Create a new journal entry (attach images via drag & drop in TUI or -i/--image).
5056
delete Delete a journal entry.
5157
help Help about any command
5258
last Output a string of time since last post.
@@ -63,7 +69,7 @@ Use "etu [command] --help" for more information about a command.
6369

6470
## Inspiration
6571

66-
Etu is [the personifcation of time](https://en.wikipedia.org/wiki/Time_and_fate_deities) according to the [Lakota](https://en.wikipedia.org/wiki/Lakota_people).
72+
Etu is [the personification of time](https://en.wikipedia.org/wiki/Time_and_fate_deities) according to the [Lakota](https://en.wikipedia.org/wiki/Lakota_people).
6773

6874
Etu is inspired heavily by the work of @neauoire at [wiki.xxiivv.com](https://wiki.xxiivv.com/#about), [Time Travelers](https://github.com/merveilles/Time-Travelers), and the screenshots in the [inspiration](https://github.com/icco/etu/tree/main/inspiration) folder.
6975

@@ -75,8 +81,4 @@ Other projects that inspired me:
7581

7682
## History
7783

78-
I've rewritten this aproximately seven times. Originally I made this to be a location based blogging app. Then it turned into a time tracking app. Then into a wiki. Then another time tracking app. Then a journaling tool. First with Charm as a DB, then with SQLite, then with Notion.
79-
80-
## Future
81-
82-
I've been thinking about making the AI and the backend pluggable. If you have ideas on how to do that, open a ticket and ping @icco.
84+
I've rewritten this approximately seven times. Originally a location-based blogging app, then time tracking, wiki, journaling. Backends: Charm, SQLite, Notion, and now the [etu-backend](https://github.com/icco/etu-backend) gRPC API.

ai/tags.go

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)