Warning
This project is currently in heavy development. Expect breaking changes and incomplete features.
Nightblog is a terminal application for managing and editing blog posts. It currently uses SQLite for storage and is transitioning from a file-based system.
- Go: 1.26 or higher
- SQLite: (Managed by the application)
-
Clone the repository:
git clone github.com/nightails/nightblog cd nightblog -
Install dependencies:
go mod download
-
Configuration: The application automatically creates a default configuration file upon the first run at:
~/.config/nightblog/config.jsonYou can manually edit this file to change settings:
DatabasePath: Path to the SQLite database (default:~/.cache/nightblog/blogs.db).RemoteBlogsURL: URL for remote blog synchronization (currently unused).Editor: Your preferred editor (default:nvim).
To run the application directly:
go run main.go [command]To compile the binary:
go build -o nightblog main.gonew <title>: Creates a new blog post entry in the database.list: Lists all blog posts stored in the database.
- SQLite storage integration.
- Create and list blog posts via CLI (In transition).
- Terminal User Interface (TUI) with Bubble Tea (Work in progress).
- Remote synchronization.
internal/:blog/: Core blog logic (creation, listing, formatting).cli/: Command-line interface logic using Cobra.config/: Configuration loading, parsing, and management logic.storage/: Database initialization and SQLC-generated queries.tui/: Planned Terminal User Interface implementation.ui/: UI styles and components (Lipgloss).
- Cobra: CLI framework.
- Bubble Tea: TUI framework (In development).
- Lipgloss: Terminal styling.
- sqlc: Type-safe SQL generator.
- modernc.org/sqlite: CGO-free SQLite driver.
This project is licensed under the MIT License.