Skip to content
Merged
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
2 changes: 2 additions & 0 deletions .commitlintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
extends:
- "@commitlint/config-conventional"
24 changes: 24 additions & 0 deletions .github/actions/pre-commit/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Pre-commit
description: Run pre-commit checks

runs:
using: "composite"
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install pre-commit
run: |
python -m pip install --upgrade pip
pip install pre-commit
shell: bash
- name: Cache pre-commit hooks
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run pre-commit
run: pre-commit run --show-diff-on-failure --color=always --all-files
shell: bash
24 changes: 24 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CI

on:
pull_request:

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/pre-commit

test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
- name: Run tests
run: go test -v ./...
25 changes: 25 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Pre-commit Checks

on:
workflow_call:

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install pre-commit
run: |
python -m pip install --upgrade pip
pip install pre-commit
- name: Cache pre-commit hooks
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run pre-commit
run: pre-commit run --show-diff-on-failure --color=always --all-files
65 changes: 65 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Release

on:
push:
branches: [main]

permissions:
contents: write
pull-requests: write
issues: write

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/pre-commit

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
- name: Run tests
run: go test -v ./...

release:
runs-on: ubuntu-latest
outputs:
new_release_version: ${{ steps.semantic.outputs.new_release_version }}
new_release_published: ${{ steps.semantic.outputs.new_release_published }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*"
- name: Release
id: semantic
uses: cycjimmy/semantic-release-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
dry_run: ${{ github.event_name == 'pull_request' }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
if: steps.semantic.outputs.new_release_published == 'true'
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.semantic.outputs.new_release_version }}
TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.vscode/
dist/
40 changes: 40 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
before:
hooks:
- go mod tidy
builds:
- binary: note
goos:
- darwin
- linux
goarch:
- amd64
- arm64
env:
- CGO_ENABLED=0
ldflags:
- -X main.version={{.Env.VERSION}}

git:
tag_sort: "-version:refname"

changelog:
sort: asc
filters:
exclude:
- "^test:"
- "^chore:"

brews:
- name: note
repository:
owner: armand-sauzay
name: homebrew-tap
token: "{{ .Env.TAP_GITHUB_TOKEN }}"
homepage: "https://github.com/armand-sauzay/note"
description: "A modern TUI for note application"
commit_author:
name: goreleaserbot
email: [email protected]
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
test: |
system "#{bin}/note --version"
27 changes: 27 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
repos:
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.18.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ["@commitlint/config-conventional"]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
stages: [pre-commit]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-json
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
exclude: |
(?x)^(
.*/README.md
)$
- repo: https://github.com/rhysd/actionlint
rev: v1.7.4
hooks:
- id: actionlint
16 changes: 16 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"branches": ["main"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/github",
[
"@semantic-release/git",
{
"assets": ["CHANGELOG.md", "go.mod", "go.sum"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
]
}
79 changes: 79 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Note ✍️

<p align="center">
<img src="docs/demo.gif" alt="Note Demo" style="width: 100%;">
</p>

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.

## ✨ Features

- 📝 Create and edit markdown notes
- 🗂️ Organize notes in folders
- 🎨 Beautiful TUI with syntax highlighting
- 📱 Responsive layout with adjustable sidebar
- 🗑️ Archive unused notes
- ⌨️ Vim-style keybindings
- 🎯 Focus mode without sidebar
- 🔍 Preview markdown rendering
- ⚡ Fast and lightweight

## 📦 Installation

### Using Homebrew (macOS & Linux)

```bash
brew tap armandsauzay/note
brew install note
```

### Using Go

```
go install github.com/armandsauzay/note@latest
```

### From Source

```
git clone https://github.com/armandsauzay/note.git
cd note
go install
```

## 🚀 Usage

## ⚙️ Configuration

### Keybindings

- `j/k` or `↑/↓`: Navigate notes
- `h/l` or `←/→`: Collapse/expand folders
- `enter`: Edit note/rename folder
- `n`: Create new note
- `N`: Create new folder
- `tab`: Toggle sidebar
- `backspace`: Archive note/folder
- `q` or `ctrl+c`: Quit

## 🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'feat: add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

## 📝 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## 🚧 Roadmap

- [ ] Custom themes
- [ ] Tags
- [ ] Sorting notes
- [ ] Search notes
- [ ] Export notes
Loading
Loading