Skip to content

Commit 7083f94

Browse files
authored
feat: initial repository setup (#1)
1 parent aba4f26 commit 7083f94

File tree

17 files changed

+1332
-0
lines changed

17 files changed

+1332
-0
lines changed

.commitlintrc.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
extends:
2+
- "@commitlint/config-conventional"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Pre-commit
2+
description: Run pre-commit checks
3+
4+
runs:
5+
using: "composite"
6+
steps:
7+
- uses: actions/checkout@v4
8+
- name: Set up Python
9+
uses: actions/setup-python@v5
10+
with:
11+
python-version: "3.11"
12+
- name: Install pre-commit
13+
run: |
14+
python -m pip install --upgrade pip
15+
pip install pre-commit
16+
shell: bash
17+
- name: Cache pre-commit hooks
18+
uses: actions/cache@v4
19+
with:
20+
path: ~/.cache/pre-commit
21+
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
22+
- name: Run pre-commit
23+
run: pre-commit run --show-diff-on-failure --color=always --all-files
24+
shell: bash

.github/workflows/ci.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
lint:
8+
name: Lint
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: ./.github/actions/pre-commit
13+
14+
test:
15+
name: Test
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Set up Go
20+
uses: actions/setup-go@v5
21+
with:
22+
go-version: "1.21"
23+
- name: Run tests
24+
run: go test -v ./...

.github/workflows/pre-commit.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Pre-commit Checks
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
pre-commit:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- name: Set up Python
12+
uses: actions/setup-python@v5
13+
with:
14+
python-version: "3.11"
15+
- name: Install pre-commit
16+
run: |
17+
python -m pip install --upgrade pip
18+
pip install pre-commit
19+
- name: Cache pre-commit hooks
20+
uses: actions/cache@v4
21+
with:
22+
path: ~/.cache/pre-commit
23+
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
24+
- name: Run pre-commit
25+
run: pre-commit run --show-diff-on-failure --color=always --all-files

.github/workflows/release.yaml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
issues: write
11+
12+
jobs:
13+
lint:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: ./.github/actions/pre-commit
18+
19+
test:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Set up Go
24+
uses: actions/setup-go@v5
25+
with:
26+
go-version: "1.21"
27+
- name: Run tests
28+
run: go test -v ./...
29+
30+
release:
31+
runs-on: ubuntu-latest
32+
outputs:
33+
new_release_version: ${{ steps.semantic.outputs.new_release_version }}
34+
new_release_published: ${{ steps.semantic.outputs.new_release_published }}
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v4
38+
with:
39+
fetch-depth: 0
40+
- name: Set up Go
41+
uses: actions/setup-go@v5
42+
with:
43+
go-version: "1.21"
44+
- name: Setup Node.js
45+
uses: actions/setup-node@v4
46+
with:
47+
node-version: "lts/*"
48+
- name: Release
49+
id: semantic
50+
uses: cycjimmy/semantic-release-action@v4
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
with:
54+
dry_run: ${{ github.event_name == 'pull_request' }}
55+
- name: Run GoReleaser
56+
uses: goreleaser/goreleaser-action@v5
57+
if: steps.semantic.outputs.new_release_published == 'true'
58+
with:
59+
distribution: goreleaser
60+
version: latest
61+
args: release --clean
62+
env:
63+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64+
VERSION: ${{ steps.semantic.outputs.new_release_version }}
65+
TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.vscode/
2+
dist/

.goreleaser.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
before:
2+
hooks:
3+
- go mod tidy
4+
builds:
5+
- binary: note
6+
goos:
7+
- darwin
8+
- linux
9+
goarch:
10+
- amd64
11+
- arm64
12+
env:
13+
- CGO_ENABLED=0
14+
ldflags:
15+
- -X main.version={{.Env.VERSION}}
16+
17+
git:
18+
tag_sort: "-version:refname"
19+
20+
changelog:
21+
sort: asc
22+
filters:
23+
exclude:
24+
- "^test:"
25+
- "^chore:"
26+
27+
brews:
28+
- name: note
29+
repository:
30+
owner: armand-sauzay
31+
name: homebrew-tap
32+
token: "{{ .Env.TAP_GITHUB_TOKEN }}"
33+
homepage: "https://github.com/armand-sauzay/note"
34+
description: "A modern TUI for note application"
35+
commit_author:
36+
name: goreleaserbot
37+
38+
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
39+
test: |
40+
system "#{bin}/note --version"

.pre-commit-config.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
repos:
2+
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
3+
rev: v9.18.0
4+
hooks:
5+
- id: commitlint
6+
stages: [commit-msg]
7+
additional_dependencies: ["@commitlint/config-conventional"]
8+
- repo: https://github.com/pre-commit/mirrors-prettier
9+
rev: v3.1.0
10+
hooks:
11+
- id: prettier
12+
stages: [pre-commit]
13+
- repo: https://github.com/pre-commit/pre-commit-hooks
14+
rev: v5.0.0
15+
hooks:
16+
- id: check-json
17+
- id: check-yaml
18+
- id: end-of-file-fixer
19+
- id: trailing-whitespace
20+
exclude: |
21+
(?x)^(
22+
.*/README.md
23+
)$
24+
- repo: https://github.com/rhysd/actionlint
25+
rev: v1.7.4
26+
hooks:
27+
- id: actionlint

.releaserc.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"branches": ["main"],
3+
"plugins": [
4+
"@semantic-release/commit-analyzer",
5+
"@semantic-release/release-notes-generator",
6+
"@semantic-release/changelog",
7+
"@semantic-release/github",
8+
[
9+
"@semantic-release/git",
10+
{
11+
"assets": ["CHANGELOG.md", "go.mod", "go.sum"],
12+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
13+
}
14+
]
15+
]
16+
}

README.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Note ✍️
2+
3+
<p align="center">
4+
<img src="docs/demo.gif" alt="Note Demo" style="width: 100%;">
5+
</p>
6+
7+
A modern terminal-based note-taking application built with [Bubble Tea](https://github.com/charmbracelet/bubbletea) and [Lip Gloss](https://github.com/charmbracelet/lipgloss). Organize your thoughts with style right from your terminal.
8+
9+
## ✨ Features
10+
11+
- 📝 Create and edit markdown notes
12+
- 🗂️ Organize notes in folders
13+
- 🎨 Beautiful TUI with syntax highlighting
14+
- 📱 Responsive layout with adjustable sidebar
15+
- 🗑️ Archive unused notes
16+
- ⌨️ Vim-style keybindings
17+
- 🎯 Focus mode without sidebar
18+
- 🔍 Preview markdown rendering
19+
- ⚡ Fast and lightweight
20+
21+
## 📦 Installation
22+
23+
### Using Homebrew (macOS & Linux)
24+
25+
```bash
26+
brew tap armandsauzay/note
27+
brew install note
28+
```
29+
30+
### Using Go
31+
32+
```
33+
go install github.com/armandsauzay/note@latest
34+
```
35+
36+
### From Source
37+
38+
```
39+
git clone https://github.com/armandsauzay/note.git
40+
cd note
41+
go install
42+
```
43+
44+
## 🚀 Usage
45+
46+
## ⚙️ Configuration
47+
48+
### Keybindings
49+
50+
- `j/k` or `↑/↓`: Navigate notes
51+
- `h/l` or `←/→`: Collapse/expand folders
52+
- `enter`: Edit note/rename folder
53+
- `n`: Create new note
54+
- `N`: Create new folder
55+
- `tab`: Toggle sidebar
56+
- `backspace`: Archive note/folder
57+
- `q` or `ctrl+c`: Quit
58+
59+
## 🤝 Contributing
60+
61+
Contributions are welcome! Please feel free to submit a Pull Request.
62+
63+
1. Fork the repository
64+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
65+
3. Commit your changes (`git commit -m 'feat: add amazing feature'`)
66+
4. Push to the branch (`git push origin feature/amazing-feature`)
67+
5. Open a Pull Request
68+
69+
## 📝 License
70+
71+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
72+
73+
## 🚧 Roadmap
74+
75+
- [ ] Custom themes
76+
- [ ] Tags
77+
- [ ] Sorting notes
78+
- [ ] Search notes
79+
- [ ] Export notes

0 commit comments

Comments
 (0)