{"id":29111966,"url":"https://github.com/caffeines/notion-todo","last_synced_at":"2025-09-17T23:10:40.076Z","repository":{"id":301866820,"uuid":"1005778203","full_name":"caffeines/notion-todo","owner":"caffeines","description":"A todo application with Notion's database.","archived":false,"fork":false,"pushed_at":"2025-06-21T16:43:12.000Z","size":55,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-04T03:48:47.214Z","etag":null,"topics":["cli","notion-database","todo","todolist"],"latest_commit_sha":null,"homepage":"https://www.sadat.me/notion-todo/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/caffeines.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-20T19:58:02.000Z","updated_at":"2025-07-03T12:41:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"4ab44b7b-0b36-46e2-aefe-4f3463b96935","html_url":"https://github.com/caffeines/notion-todo","commit_stats":null,"previous_names":["caffeines/notion-todo"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/caffeines/notion-todo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caffeines%2Fnotion-todo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caffeines%2Fnotion-todo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caffeines%2Fnotion-todo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caffeines%2Fnotion-todo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caffeines","download_url":"https://codeload.github.com/caffeines/notion-todo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caffeines%2Fnotion-todo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275680444,"owners_count":25508570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-17T02:00:09.119Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","notion-database","todo","todolist"],"created_at":"2025-06-29T10:02:55.277Z","updated_at":"2025-09-17T23:10:40.017Z","avatar_url":"https://github.com/caffeines.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Notion Todo CLI\n\nA command-line interface for managing todo items using Notion database integration. This Go-based CLI tool allows you to add and manage todo items directly from your terminal to your Notion workspace.\n\n## Installation\n\n### Linux (Recommended)\n\n```bash\n# Quick install script\ncurl -sSL https://raw.githubusercontent.com/caffeines/notion-todo/main/install.sh | bash\n```\n\nOr download manually from the [releases page](https://github.com/caffeines/notion-todo/releases).\n\n### macOS (Homebrew)\n\n```bash\n# Add the tap\nbrew tap caffeines/tap\n\n# Install notion-todo (available as 'todo' command)\nbrew install notion-todo\n\n# Now you can use it with:\ntodo guide\n```\n\n### Using Go Install\n\n```bash\ngo install github.com/caffeines/notion-todo@latest\n```\n\n### Download Binary\n\nDownload the latest release for your platform from the [releases page](https://github.com/caffeines/notion-todo/releases).\n\n### Build from Source\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/caffeines/notion-todo.git\n   cd notion-todo\n   ```\n\n2. Build the project:\n\n   ```bash\n   make build\n   # or\n   go build -o todo main.go\n   ```\n\n3. Move the binary to your PATH:\n\n   ```bash\n   sudo mv todo /usr/local/bin/\n   ```\n\n## Quick Start\n\n1. **Build the project:**\n\n   ```bash\n   make build\n   # or\n   go build -o todo main.go\n   ```\n\n2. **Run the interactive setup guide:**\n\n   ```bash\n   todo guide\n   # Or use the short alias\n   todo g\n   ```\n\n3. **Configure the CLI:**\n\n   ```bash\n   todo config\n   # Or use the short alias\n   todo c\n   ```\n\n4. **Start adding todos:**\n\n   ```bash\n   todo add \"Buy groceries\"\n   # Or use the short alias\n   todo a \"Complete project\" --date 25-06-2025\n   ```\n\n5. **View and manage your todos:**\n\n   ```bash\n   todo list\n   # Or use short aliases\n   todo l\n   # or\n   todo ls\n   ```\n\nThat's it! The interactive guide will walk you through everything else.\n\n## Features\n\n- 💡 **Interactive Setup Guide** - Step-by-step walkthrough for first-time users\n- 🔧 Easy configuration setup with Notion API token and database ID\n- ➕ Add todo items to your Notion database with optional due dates\n- 📋 Interactive list view for managing todos with delete and status update capabilities\n- ❌ Delete unwanted todo items directly from the CLI\n- 📝 Simple and intuitive command-line interface with short aliases for faster usage\n- 🔒 Secure credential storage\n- 🎯 Direct integration with Notion API\n- 📊 Status tracking and validation (Not started, In progress, Done)\n- 📅 Due date support for better task management\n- ⚡ Quick commands with short aliases (`todo v`, `todo a`, `todo l`, etc.)\n- 🔄 Status normalization and validation to ensure data consistency\n\n## Prerequisites\n\n- Go 1.23 or higher\n- A Notion account with API access\n- A Notion database set up for todo items\n\n## Configuration\n\nBefore using the CLI, you need to configure it with your Notion API credentials. You have two options:\n\n### Option 1: Interactive Setup Guide (Recommended)\n\nRun the interactive setup guide for a step-by-step walkthrough:\n\n```bash\ntodo guide\n```\n\nThis interactive guide will walk you through:\n\n- Setting up your todo database (with template option)\n- Getting your database ID\n- Creating a Notion integration\n- Getting your API credentials\n- Connecting the integration to your database\n- Configuring the CLI\n- Testing your setup\n\n**Navigation in the Guide:**\n\n- **Next step**: `Enter`, `Space`, `n`, `l`, or `→` (right arrow)\n- **Previous step**: `p`, `h`, or `←` (left arrow)\n- **Restart**: `r`\n- **Quit**: `q` or `Ctrl+C`\n\n### Option 2: Manual Configuration\n\nIf you prefer manual setup or already have your credentials:\n\n```bash\ntodo config\n```\n\nThis will prompt you to enter:\n\n- **Notion API Token**: Your Notion integration token\n- **Database ID**: The ID of your Notion database\n\n### Getting Notion Credentials\n\n#### Quick Database Setup (Recommended)\n\nUse the pre-configured template for the fastest setup:\n\n1. **Get the Template**:\n   - Go to [Notion Todo Template](https://www.notion.so/templates/cli-todo)\n   - Click \"Get template\" and select your workspace\n   - The template already has the correct database structure\n\n2. **Get Database ID**:\n   - Open your database in Notion\n   - Copy the database ID from the URL: `https://www.notion.so/{workspace}/{database_id}?v=...`\n   - The database ID is the string after the last `/` and before `?`\n   - Example: `217e31359630803999d6ecaabdf4e11f`\n\n#### Manual Database Setup\n\nIf you prefer to create the database manually:\n\n**Required Properties:**\n\n- **Title** (Title) - The main todo text\n- **Status** (Select) - Todo completion status with options:\n  - `Todo` (default)\n  - `In progress`\n  - `Done`\n- **Due Date** (Date) - Optional due date for todos\n- **Tags** (Multi-select) - Optional categorizing tags\n\n**Setup Instructions:**\n\n1. **Create Integration**:\n   - Go to [Notion Integrations](https://www.notion.so/profile/integrations)\n   - Click \"New integration\"\n   - Name it \"Todo CLI\" or similar\n   - Select your workspace and choose \"Internal\" type\n   - Click \"Save\"\n\n2. **Grant Database Access**:\n   - In the integration configuration popup, click \"Access\" tab\n   - Select \"pages\" to see your database\n   - Select your todo database from the list\n   - Click \"Update Access\"\n   - Go back to \"Configuration\" tab\n\n3. **Copy Integration Token**:\n   - Click \"Show\" next to \"Internal Integration Token\"\n   - Copy the token and keep it secure\n\n## Usage\n\n### Add a Todo Item\n\n```bash\n# Basic todo\ntodo add \"Buy groceries\"\n\n# Todo with due date\ntodo add \"Complete project documentation\" --date 25-06-2025\n\n# Todo with specific date format\ntodo add \"Schedule dentist appointment\" --date 2025-06-30\n```\n\nThe todo items will be created in your Notion database with:\n\n- **Title**: Your todo text\n- **Status**: Set to \"Todo\" by default  \n- **Due Date**: Due date if specified\n\n### List and Manage Todos\n\n```bash\n# View all todos in an interactive interface\ntodo list\n```\n\nThe list command provides an interactive interface where you can:\n\n- View todos by status (Todo, In progress, Done)\n- Navigate through your todos\n- See due dates and completion status\n- Delete unwanted todo items\n- Update todo status\n- Manage your todo items efficiently\n\n### Available Commands\n\n- `todo guide` (or `todo g`) - **Interactive setup guide** for first-time users (recommended)\n- `todo config` (or `todo c`) - Configure Notion API credentials manually\n- `todo add \u003ctodo-text\u003e` (or `todo a`) - Add a new todo item\n- `todo add \u003ctodo-text\u003e --date YYYY-MM-DD` - Add todo with due date\n- `todo list` (or `todo l`, `todo ls`) - View and manage existing todos in interactive mode\n- `todo version` (or `todo v`) - Show version information\n- `todo help` - Show help information\n\n#### Short Command Aliases\n\nFor faster usage, you can use these short aliases:\n\n- `todo v` → `todo version`\n- `todo a` → `todo add`\n- `todo l` → `todo list`\n- `todo ls` → `todo list`\n- `todo g` → `todo guide`\n- `todo c` → `todo config`\n\n### Command Examples\n\n```bash\n# First-time setup\ntodo guide\n# Or use the short alias\ntodo g\n\n# Add todos\ntodo add \"Buy milk\"\ntodo a \"Finish presentation\" --date 2025-06-25\n\n# View and manage\ntodo list\n# Or use short aliases\ntodo l\ntodo ls\n\n# Check version\ntodo version\ntodo v\n\n# Get help\ntodo help\n```\n\n## Project Structure\n\n```text\n├── cmd/                    # CLI commands\n│   ├── add.go             # Add todo command\n│   ├── config.go          # Configuration command\n│   ├── guide.go           # Interactive setup guide command\n│   ├── list.go            # List and manage todos command\n│   ├── root.go            # Root command\n│   ├── version.go         # Version command\n│   ├── processors/        # Command processors\n│   │   ├── add_processor.go\n│   │   ├── guide_processor.go\n│   │   ├── list_processor.go\n│   │   ├── root_processor.go\n│   │   └── version_processor.go\n│   ├── steps/             # Guide step implementations\n│   │   └── guide_steps.go\n│   └── template/          # UI templates and styles\n│       ├── guide_template.go\n│       └── styles.go\n├── consts/                # Application constants\n│   ├── config.go          # Configuration constants\n│   ├── notion.go          # Notion API constants\n│   ├── status.go          # Status constants\n│   └── version.go         # Version information\n├── models/                # Data models\n│   ├── config.go          # Configuration model\n│   ├── createTodoPayload.go # Notion API payload\n│   └── todoItem.go        # Todo item structure\n├── service/               # Business logic services\n│   ├── config/            # Configuration services\n│   │   ├── credential.go\n│   │   └── credentialImpl.go\n│   ├── files/             # File handling services\n│   │   ├── file.go\n│   │   └── FileImpl.go\n│   ├── notion/            # Notion API integration\n│   │   ├── notion.go\n│   │   └── notionImpl.go\n│   └── utility/           # Utility services\n│       ├── todo_utility.go\n│       └── utility.go\n└── main.go               # Application entry point\n```\n\n## Configuration Storage\n\nThe application stores your configuration in a hidden directory:\n\n- Path: `~/.notion-todo/config.json`\n- Contains encrypted credentials for secure storage\n\n## Troubleshooting\n\n### Common Issues\n\n#### \"Failed to create todo\" or \"Database not found\"\n\n- Make sure your integration is connected to the database (step 5 in the guide)\n- Verify your Database ID is correct\n- Check that your API token is valid\n\n#### \"Property not found\" errors\n\n- Ensure your database has the exact properties: \"Title\", \"Status\", \"Due Date\"\n- Property names are case-sensitive  \n- The Status property must be of type \"Select\" with options: \"Todo\", \"In progress\", \"Done\"\n- Consider using the template for correct setup\n\n#### Configuration issues\n\n- Run `todo config` to reconfigure your credentials\n- Check if `~/.notion-todo/config.json` exists and has valid JSON\n- Re-run the setup guide: `todo guide`\n\n#### Need help?\n\n- Run `todo guide` for the interactive setup\n- Use `todo help` for command information\n- Check that your Notion integration has the correct permissions\n\n## Architecture\n\nThe project follows a clean architecture pattern with:\n\n- **Commands** ([`cmd/`](cmd/)): CLI command handlers using Cobra with dedicated processors\n- **Services** ([`service/`](service/)): Business logic organized by domain (config, files, notion, utility)\n- **Models** ([`models/`](models/)): Data structures for API communication\n- **Constants** ([`consts/`](consts/)): Application-wide constants and configuration\n- **Processors** ([`cmd/processors/`](cmd/processors/)): Command-specific business logic handlers\n\nKey interfaces:\n\n- [`service/notion/notion.go`](service/notion/notion.go): Notion API operations\n- [`service/config/credential.go`](service/config/credential.go): Credential management\n- [`service/files/file.go`](service/files/file.go): File operations\n\n## Development\n\n### Building\n\n```bash\n# Build the project\ngo build -o todo main.go\n\n# Or use the Makefile\nmake build\n```\n\n### Testing\n\n```bash\ngo test ./...\n```\n\n## Dependencies\n\n- [Cobra](https://github.com/spf13/cobra) - CLI framework\n- [Bubble Tea](https://github.com/charmbracelet/bubbletea) - Terminal UI framework for interactive guide\n- [Lip Gloss](https://github.com/charmbracelet/lipgloss) - Style and layout for terminal interfaces\n- [PromptUI](https://github.com/manifoldco/promptui) - Interactive prompts\n- [Spinner](https://github.com/briandowns/spinner) - Loading spinners for CLI operations\n\n## License\n\nSee [LICENSE](LICENSE) file for details.\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaffeines%2Fnotion-todo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaffeines%2Fnotion-todo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaffeines%2Fnotion-todo/lists"}