A Go-based CLI tool for syncing markdown files with Apple Notes. This application was translated from shakedlokits/stash, the original bash-based implementation.
While maintaining 100% feature parity, the Go version has key differences:
- macOS only - Go version only runs on macOS (Apple Notes integration limitation)
- Different error handling - Go version may have stricter validation than bash version
- Performance characteristics - Faster startup, but different memory footprint
- Dependency changes - Requires Go toolchain instead of Bash 5+ and bashly
See Migration Notes for detailed compatibility information.
# Build with default version
make build
# Build with specific version
make build VERSION=1.0.0
# Clean build artifacts
make cleanThe binary will be created at dist/cider.
# Run unit tests
make test-go
# Run integration tests (requires Apple Notes)
make test-go-integrationcmd/cider/ # Entry point
main.go
internal/
cli/ # Cobra CLI commands
root.go # Root command setup
push.go # Push command
pull.go # Pull command
diff.go # Diff command
frontmatter/ # YAML frontmatter operations
frontmatter.go
frontmatter_test.go
markdown/ # File I/O
file.go
file_test.go
convert/ # Pandoc wrapper
convert.go
convert_test.go
notes/ # Apple Notes integration
notes.go
notes_test.go
- pandoc - Markdown ↔ HTML conversion
- macOS with Apple Notes - For AppleScript integration
github.com/spf13/cobra- CLI framework
The Go version has the exact same CLI interface as the bash version:
# Push a file to Apple Notes
./dist/cider push my-note.md
# Pull changes from Apple Notes
./dist/cider pull my-note.md
# Show differences
./dist/cider diff my-note.md
# Generate shell completions
./dist/cider completion bash| Feature | Bash | Go |
|---|---|---|
| Single binary | ❌ (requires bash 5+) | ✅ |
| Fast startup | ❌ | ✅ |
| Cross-compilation | ❌ | ✅ (macOS only due to Apple Notes) |
| Type safety | ❌ | ✅ |
| Testing | Approval tests | Standard Go tests + integration |
| Dependencies | bashly, Docker | Just Go toolchain |
The Go implementation maintains 100% feature parity with the bash version:
- Same CLI interface - All commands, arguments, and flags are identical
- Same frontmatter format - Uses
apple_notes_idfield - Same pandoc flags - Identical conversion behavior
- Same AppleScript - Identical Apple Notes integration
- Same user prompts - Confirmation dialogs work the same way
- Create
internal/cli/yourcommand.go - Implement the command with Cobra
- Register in
init()function - Add tests
go run ./cmd/cider <command> <args>Version is set via ldflags at build time:
go build -ldflags "-X 'main.version=1.0.0'" -o cider ./cmd/cider