focuscli 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- focuscli-0.1.0/LICENSE +21 -0
- focuscli-0.1.0/MANIFEST.in +5 -0
- focuscli-0.1.0/PKG-INFO +226 -0
- focuscli-0.1.0/README.md +185 -0
- focuscli-0.1.0/focuscli/__init__.py +1 -0
- focuscli-0.1.0/focuscli/main.py +40 -0
- focuscli-0.1.0/focuscli/storage.py +62 -0
- focuscli-0.1.0/focuscli/tasks.py +47 -0
- focuscli-0.1.0/focuscli/timer.py +31 -0
- focuscli-0.1.0/focuscli.egg-info/PKG-INFO +226 -0
- focuscli-0.1.0/focuscli.egg-info/SOURCES.txt +17 -0
- focuscli-0.1.0/focuscli.egg-info/dependency_links.txt +1 -0
- focuscli-0.1.0/focuscli.egg-info/entry_points.txt +2 -0
- focuscli-0.1.0/focuscli.egg-info/requires.txt +2 -0
- focuscli-0.1.0/focuscli.egg-info/top_level.txt +1 -0
- focuscli-0.1.0/pyproject.toml +3 -0
- focuscli-0.1.0/requirements.txt +2 -0
- focuscli-0.1.0/setup.cfg +4 -0
- focuscli-0.1.0/setup.py +46 -0
focuscli-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 FocusCLI Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
focuscli-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: focuscli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A productivity CLI tool for developers
|
|
5
|
+
Home-page: https://github.com/eneswritescode/focuscli
|
|
6
|
+
Author: Enes
|
|
7
|
+
Author-email: pypi.dole284@passinbox.com
|
|
8
|
+
Project-URL: Bug Reports, https://github.com/eneswritescode/focuscli/issues
|
|
9
|
+
Project-URL: Source, https://github.com/eneswritescode/focuscli
|
|
10
|
+
Keywords: productivity cli pomodoro task-manager todo timer focus
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
14
|
+
Classifier: Topic :: Utilities
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Operating System :: OS Independent
|
|
23
|
+
Classifier: Environment :: Console
|
|
24
|
+
Requires-Python: >=3.7
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Requires-Dist: typer>=0.9.0
|
|
28
|
+
Requires-Dist: rich>=13.0.0
|
|
29
|
+
Dynamic: author
|
|
30
|
+
Dynamic: author-email
|
|
31
|
+
Dynamic: classifier
|
|
32
|
+
Dynamic: description
|
|
33
|
+
Dynamic: description-content-type
|
|
34
|
+
Dynamic: home-page
|
|
35
|
+
Dynamic: keywords
|
|
36
|
+
Dynamic: license-file
|
|
37
|
+
Dynamic: project-url
|
|
38
|
+
Dynamic: requires-dist
|
|
39
|
+
Dynamic: requires-python
|
|
40
|
+
Dynamic: summary
|
|
41
|
+
|
|
42
|
+
# 🎯 FocusCLI
|
|
43
|
+
|
|
44
|
+
[](https://badge.fury.io/py/focuscli)
|
|
45
|
+
[](https://opensource.org/licenses/MIT)
|
|
46
|
+
[](https://www.python.org/downloads/)
|
|
47
|
+
|
|
48
|
+
A minimal productivity tool for developers who want to manage tasks and stay focused without leaving the terminal.
|
|
49
|
+
|
|
50
|
+
## ✨ Features
|
|
51
|
+
|
|
52
|
+
- **Task Management**: Add, list, complete, and delete tasks with a clean interface
|
|
53
|
+
- **Pomodoro Timer**: Built-in focus timer with live progress tracking
|
|
54
|
+
- **Beautiful UI**: Powered by Rich library for colorful tables and progress bars
|
|
55
|
+
- **Simple Storage**: Tasks saved locally in JSON format
|
|
56
|
+
- **Zero Config**: Works right out of the box
|
|
57
|
+
|
|
58
|
+
## 🚀 Installation
|
|
59
|
+
|
|
60
|
+
### Quick Install (Recommended)
|
|
61
|
+
|
|
62
|
+
Install directly from PyPI:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
pip install focuscli
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### From Source
|
|
69
|
+
|
|
70
|
+
Clone the repository and install:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
git clone https://github.com/eneswritescode/focuscli.git
|
|
74
|
+
cd focuscli
|
|
75
|
+
pip install -e .
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Requirements
|
|
79
|
+
|
|
80
|
+
- Python 3.7 or higher
|
|
81
|
+
- Dependencies will be installed automatically
|
|
82
|
+
|
|
83
|
+
## 🎬 Quick Start
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# Install
|
|
87
|
+
pip install focuscli
|
|
88
|
+
|
|
89
|
+
# Add some tasks
|
|
90
|
+
focuscli add "Review pull requests"
|
|
91
|
+
focuscli add "Write documentation"
|
|
92
|
+
focuscli add "Fix bug in login"
|
|
93
|
+
|
|
94
|
+
# See your tasks
|
|
95
|
+
focuscli list
|
|
96
|
+
|
|
97
|
+
# Complete a task
|
|
98
|
+
focuscli complete 1
|
|
99
|
+
|
|
100
|
+
# Start a 25-minute focus session
|
|
101
|
+
focuscli timer
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## 📖 Usage
|
|
105
|
+
|
|
106
|
+
### Add a task
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
focuscli add "Write documentation"
|
|
110
|
+
focuscli add "Fix bug in login page"
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### List all tasks
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
focuscli list
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Output example:
|
|
120
|
+
```
|
|
121
|
+
┏━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
|
|
122
|
+
┃ ID ┃ Task ┃ Status ┃
|
|
123
|
+
┡━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
|
|
124
|
+
│ 1 │ Write documentation │ ○ Pending │
|
|
125
|
+
│ 2 │ Fix bug in login page│ ○ Pending │
|
|
126
|
+
└────────┴──────────────────────┴───────────┘
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Complete a task
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
focuscli complete 1
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Delete a task
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
focuscli delete 2
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Start a focus timer
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
# Default 25-minute session
|
|
145
|
+
focuscli timer
|
|
146
|
+
|
|
147
|
+
# Custom duration (in minutes)
|
|
148
|
+
focuscli timer 45
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
**Windows Note:** If `focuscli` command is not found after installation, you may need to add Python Scripts to your PATH or use:
|
|
152
|
+
```bash
|
|
153
|
+
python -m focuscli.main <command>
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## 🛠️ Development
|
|
157
|
+
|
|
158
|
+
### Setup development environment
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
python -m venv venv
|
|
162
|
+
source venv/bin/activate # On Windows: venv\Scripts\activate
|
|
163
|
+
pip install -r requirements.txt
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Run locally
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
python -m focuscli.main add "Test task"
|
|
170
|
+
python -m focuscli.main list
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## 📂 Project Structure
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
focuscli/
|
|
177
|
+
├── focuscli/
|
|
178
|
+
│ ├── __init__.py
|
|
179
|
+
│ ├── main.py # CLI entry point
|
|
180
|
+
│ ├── tasks.py # Task management logic
|
|
181
|
+
│ ├── timer.py # Pomodoro timer
|
|
182
|
+
│ └── storage.py # JSON file handling
|
|
183
|
+
├── requirements.txt
|
|
184
|
+
├── setup.py
|
|
185
|
+
└── README.md
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## 🤝 Contributing
|
|
189
|
+
|
|
190
|
+
Contributions are welcome! Here's how you can help:
|
|
191
|
+
|
|
192
|
+
1. Fork the repository
|
|
193
|
+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
|
194
|
+
3. Commit your changes (`git commit -m 'Add some feature'`)
|
|
195
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
196
|
+
5. Open a Pull Request
|
|
197
|
+
|
|
198
|
+
## 💡 Ideas for Future Features
|
|
199
|
+
|
|
200
|
+
- Task priorities and tags
|
|
201
|
+
- Weekly/monthly reports
|
|
202
|
+
- Export tasks to different formats
|
|
203
|
+
- Break reminders after focus sessions
|
|
204
|
+
- Integration with calendar apps
|
|
205
|
+
|
|
206
|
+
## 📝 License
|
|
207
|
+
|
|
208
|
+
MIT License - feel free to use this project however you want.
|
|
209
|
+
|
|
210
|
+
## � Links
|
|
211
|
+
|
|
212
|
+
- **PyPI**: https://pypi.org/project/focuscli/
|
|
213
|
+
- **GitHub**: https://github.com/eneswritescode/focuscli
|
|
214
|
+
- **Issues**: https://github.com/eneswritescode/focuscli/issues
|
|
215
|
+
|
|
216
|
+
## 🙏 Acknowledgments
|
|
217
|
+
|
|
218
|
+
Built with:
|
|
219
|
+
- [Typer](https://typer.tiangolo.com/) - Modern CLI framework
|
|
220
|
+
- [Rich](https://rich.readthedocs.io/) - Beautiful terminal formatting
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
Made with ☕ by developers, for developers
|
|
225
|
+
|
|
226
|
+
**Star this repo if you find it helpful!** ⭐
|
focuscli-0.1.0/README.md
ADDED
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# 🎯 FocusCLI
|
|
2
|
+
|
|
3
|
+
[](https://badge.fury.io/py/focuscli)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
[](https://www.python.org/downloads/)
|
|
6
|
+
|
|
7
|
+
A minimal productivity tool for developers who want to manage tasks and stay focused without leaving the terminal.
|
|
8
|
+
|
|
9
|
+
## ✨ Features
|
|
10
|
+
|
|
11
|
+
- **Task Management**: Add, list, complete, and delete tasks with a clean interface
|
|
12
|
+
- **Pomodoro Timer**: Built-in focus timer with live progress tracking
|
|
13
|
+
- **Beautiful UI**: Powered by Rich library for colorful tables and progress bars
|
|
14
|
+
- **Simple Storage**: Tasks saved locally in JSON format
|
|
15
|
+
- **Zero Config**: Works right out of the box
|
|
16
|
+
|
|
17
|
+
## 🚀 Installation
|
|
18
|
+
|
|
19
|
+
### Quick Install (Recommended)
|
|
20
|
+
|
|
21
|
+
Install directly from PyPI:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pip install focuscli
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### From Source
|
|
28
|
+
|
|
29
|
+
Clone the repository and install:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
git clone https://github.com/eneswritescode/focuscli.git
|
|
33
|
+
cd focuscli
|
|
34
|
+
pip install -e .
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Requirements
|
|
38
|
+
|
|
39
|
+
- Python 3.7 or higher
|
|
40
|
+
- Dependencies will be installed automatically
|
|
41
|
+
|
|
42
|
+
## 🎬 Quick Start
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# Install
|
|
46
|
+
pip install focuscli
|
|
47
|
+
|
|
48
|
+
# Add some tasks
|
|
49
|
+
focuscli add "Review pull requests"
|
|
50
|
+
focuscli add "Write documentation"
|
|
51
|
+
focuscli add "Fix bug in login"
|
|
52
|
+
|
|
53
|
+
# See your tasks
|
|
54
|
+
focuscli list
|
|
55
|
+
|
|
56
|
+
# Complete a task
|
|
57
|
+
focuscli complete 1
|
|
58
|
+
|
|
59
|
+
# Start a 25-minute focus session
|
|
60
|
+
focuscli timer
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## 📖 Usage
|
|
64
|
+
|
|
65
|
+
### Add a task
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
focuscli add "Write documentation"
|
|
69
|
+
focuscli add "Fix bug in login page"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### List all tasks
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
focuscli list
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Output example:
|
|
79
|
+
```
|
|
80
|
+
┏━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
|
|
81
|
+
┃ ID ┃ Task ┃ Status ┃
|
|
82
|
+
┡━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
|
|
83
|
+
│ 1 │ Write documentation │ ○ Pending │
|
|
84
|
+
│ 2 │ Fix bug in login page│ ○ Pending │
|
|
85
|
+
└────────┴──────────────────────┴───────────┘
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Complete a task
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
focuscli complete 1
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Delete a task
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
focuscli delete 2
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Start a focus timer
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
# Default 25-minute session
|
|
104
|
+
focuscli timer
|
|
105
|
+
|
|
106
|
+
# Custom duration (in minutes)
|
|
107
|
+
focuscli timer 45
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**Windows Note:** If `focuscli` command is not found after installation, you may need to add Python Scripts to your PATH or use:
|
|
111
|
+
```bash
|
|
112
|
+
python -m focuscli.main <command>
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## 🛠️ Development
|
|
116
|
+
|
|
117
|
+
### Setup development environment
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
python -m venv venv
|
|
121
|
+
source venv/bin/activate # On Windows: venv\Scripts\activate
|
|
122
|
+
pip install -r requirements.txt
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Run locally
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
python -m focuscli.main add "Test task"
|
|
129
|
+
python -m focuscli.main list
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## 📂 Project Structure
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
focuscli/
|
|
136
|
+
├── focuscli/
|
|
137
|
+
│ ├── __init__.py
|
|
138
|
+
│ ├── main.py # CLI entry point
|
|
139
|
+
│ ├── tasks.py # Task management logic
|
|
140
|
+
│ ├── timer.py # Pomodoro timer
|
|
141
|
+
│ └── storage.py # JSON file handling
|
|
142
|
+
├── requirements.txt
|
|
143
|
+
├── setup.py
|
|
144
|
+
└── README.md
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## 🤝 Contributing
|
|
148
|
+
|
|
149
|
+
Contributions are welcome! Here's how you can help:
|
|
150
|
+
|
|
151
|
+
1. Fork the repository
|
|
152
|
+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
|
153
|
+
3. Commit your changes (`git commit -m 'Add some feature'`)
|
|
154
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
155
|
+
5. Open a Pull Request
|
|
156
|
+
|
|
157
|
+
## 💡 Ideas for Future Features
|
|
158
|
+
|
|
159
|
+
- Task priorities and tags
|
|
160
|
+
- Weekly/monthly reports
|
|
161
|
+
- Export tasks to different formats
|
|
162
|
+
- Break reminders after focus sessions
|
|
163
|
+
- Integration with calendar apps
|
|
164
|
+
|
|
165
|
+
## 📝 License
|
|
166
|
+
|
|
167
|
+
MIT License - feel free to use this project however you want.
|
|
168
|
+
|
|
169
|
+
## � Links
|
|
170
|
+
|
|
171
|
+
- **PyPI**: https://pypi.org/project/focuscli/
|
|
172
|
+
- **GitHub**: https://github.com/eneswritescode/focuscli
|
|
173
|
+
- **Issues**: https://github.com/eneswritescode/focuscli/issues
|
|
174
|
+
|
|
175
|
+
## 🙏 Acknowledgments
|
|
176
|
+
|
|
177
|
+
Built with:
|
|
178
|
+
- [Typer](https://typer.tiangolo.com/) - Modern CLI framework
|
|
179
|
+
- [Rich](https://rich.readthedocs.io/) - Beautiful terminal formatting
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
Made with ☕ by developers, for developers
|
|
184
|
+
|
|
185
|
+
**Star this repo if you find it helpful!** ⭐
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.0"
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import typer
|
|
2
|
+
from typing import Optional
|
|
3
|
+
from focuscli import tasks
|
|
4
|
+
from focuscli import timer as timer_module
|
|
5
|
+
|
|
6
|
+
app = typer.Typer(
|
|
7
|
+
help="FocusCLI - Stay productive without leaving your terminal",
|
|
8
|
+
add_completion=False
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
@app.command()
|
|
12
|
+
def add(task: str):
|
|
13
|
+
"""Add a new task to your list"""
|
|
14
|
+
tasks.add_task(task)
|
|
15
|
+
|
|
16
|
+
@app.command()
|
|
17
|
+
def list():
|
|
18
|
+
"""Show all tasks"""
|
|
19
|
+
tasks.list_tasks()
|
|
20
|
+
|
|
21
|
+
@app.command()
|
|
22
|
+
def complete(task_id: int):
|
|
23
|
+
"""Mark a task as complete"""
|
|
24
|
+
tasks.complete_task(task_id)
|
|
25
|
+
|
|
26
|
+
@app.command()
|
|
27
|
+
def delete(task_id: int):
|
|
28
|
+
"""Remove a task from the list"""
|
|
29
|
+
tasks.delete_task(task_id)
|
|
30
|
+
|
|
31
|
+
@app.command()
|
|
32
|
+
def timer(minutes: Optional[int] = typer.Argument(25)):
|
|
33
|
+
"""Start a focus timer (default: 25 minutes)"""
|
|
34
|
+
timer_module.start_timer(minutes)
|
|
35
|
+
|
|
36
|
+
def main():
|
|
37
|
+
app()
|
|
38
|
+
|
|
39
|
+
if __name__ == "__main__":
|
|
40
|
+
main()
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import json
|
|
2
|
+
import os
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
from typing import List, Dict
|
|
5
|
+
|
|
6
|
+
class TaskStorage:
|
|
7
|
+
def __init__(self, filename: str = "tasks.json"):
|
|
8
|
+
self.data_dir = Path.home() / ".focuscli"
|
|
9
|
+
self.data_dir.mkdir(exist_ok=True)
|
|
10
|
+
self.filepath = self.data_dir / filename
|
|
11
|
+
|
|
12
|
+
if not self.filepath.exists():
|
|
13
|
+
self._save([])
|
|
14
|
+
|
|
15
|
+
def load(self) -> List[Dict]:
|
|
16
|
+
try:
|
|
17
|
+
with open(self.filepath, 'r') as f:
|
|
18
|
+
return json.load(f)
|
|
19
|
+
except (FileNotFoundError, json.JSONDecodeError):
|
|
20
|
+
return []
|
|
21
|
+
|
|
22
|
+
def _save(self, tasks: List[Dict]):
|
|
23
|
+
with open(self.filepath, 'w') as f:
|
|
24
|
+
json.dump(tasks, f, indent=2)
|
|
25
|
+
|
|
26
|
+
def add_task(self, description: str) -> Dict:
|
|
27
|
+
tasks = self.load()
|
|
28
|
+
task_id = max([t['id'] for t in tasks], default=0) + 1
|
|
29
|
+
|
|
30
|
+
new_task = {
|
|
31
|
+
'id': task_id,
|
|
32
|
+
'description': description,
|
|
33
|
+
'completed': False
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
tasks.append(new_task)
|
|
37
|
+
self._save(tasks)
|
|
38
|
+
return new_task
|
|
39
|
+
|
|
40
|
+
def get_all_tasks(self) -> List[Dict]:
|
|
41
|
+
return self.load()
|
|
42
|
+
|
|
43
|
+
def complete_task(self, task_id: int) -> bool:
|
|
44
|
+
tasks = self.load()
|
|
45
|
+
|
|
46
|
+
for task in tasks:
|
|
47
|
+
if task['id'] == task_id:
|
|
48
|
+
task['completed'] = True
|
|
49
|
+
self._save(tasks)
|
|
50
|
+
return True
|
|
51
|
+
|
|
52
|
+
return False
|
|
53
|
+
|
|
54
|
+
def delete_task(self, task_id: int) -> bool:
|
|
55
|
+
tasks = self.load()
|
|
56
|
+
filtered = [t for t in tasks if t['id'] != task_id]
|
|
57
|
+
|
|
58
|
+
if len(filtered) < len(tasks):
|
|
59
|
+
self._save(filtered)
|
|
60
|
+
return True
|
|
61
|
+
|
|
62
|
+
return False
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
from rich.console import Console
|
|
2
|
+
from rich.table import Table
|
|
3
|
+
from focuscli.storage import TaskStorage
|
|
4
|
+
|
|
5
|
+
console = Console()
|
|
6
|
+
storage = TaskStorage()
|
|
7
|
+
|
|
8
|
+
def add_task(description: str):
|
|
9
|
+
task = storage.add_task(description)
|
|
10
|
+
console.print(f"✓ Task added: [bold cyan]{description}[/bold cyan] (ID: {task['id']})")
|
|
11
|
+
|
|
12
|
+
def list_tasks():
|
|
13
|
+
tasks = storage.get_all_tasks()
|
|
14
|
+
|
|
15
|
+
if not tasks:
|
|
16
|
+
console.print("[yellow]No tasks yet. Add one with 'focuscli add <task>'[/yellow]")
|
|
17
|
+
return
|
|
18
|
+
|
|
19
|
+
table = Table(show_header=True, header_style="bold magenta")
|
|
20
|
+
table.add_column("ID", style="dim", width=6)
|
|
21
|
+
table.add_column("Task", min_width=20)
|
|
22
|
+
table.add_column("Status", justify="center")
|
|
23
|
+
|
|
24
|
+
for task in tasks:
|
|
25
|
+
status = "[green]✓ Done[/green]" if task['completed'] else "[yellow]○ Pending[/yellow]"
|
|
26
|
+
style = "dim" if task['completed'] else ""
|
|
27
|
+
|
|
28
|
+
table.add_row(
|
|
29
|
+
str(task['id']),
|
|
30
|
+
task['description'],
|
|
31
|
+
status,
|
|
32
|
+
style=style
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
console.print(table)
|
|
36
|
+
|
|
37
|
+
def complete_task(task_id: int):
|
|
38
|
+
if storage.complete_task(task_id):
|
|
39
|
+
console.print(f"[green]✓ Task {task_id} marked as complete![/green]")
|
|
40
|
+
else:
|
|
41
|
+
console.print(f"[red]Task {task_id} not found[/red]")
|
|
42
|
+
|
|
43
|
+
def delete_task(task_id: int):
|
|
44
|
+
if storage.delete_task(task_id):
|
|
45
|
+
console.print(f"[red]✗ Task {task_id} deleted[/red]")
|
|
46
|
+
else:
|
|
47
|
+
console.print(f"[red]Task {task_id} not found[/red]")
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import time
|
|
2
|
+
from rich.console import Console
|
|
3
|
+
from rich.progress import Progress, SpinnerColumn, TextColumn, BarColumn, TimeRemainingColumn
|
|
4
|
+
|
|
5
|
+
console = Console()
|
|
6
|
+
|
|
7
|
+
def start_timer(minutes: int):
|
|
8
|
+
total_seconds = minutes * 60
|
|
9
|
+
|
|
10
|
+
console.print(f"\n[bold green]🍅 Starting {minutes}-minute focus session![/bold green]\n")
|
|
11
|
+
|
|
12
|
+
with Progress(
|
|
13
|
+
SpinnerColumn(),
|
|
14
|
+
TextColumn("[progress.description]{task.description}"),
|
|
15
|
+
BarColumn(),
|
|
16
|
+
TextColumn("[progress.percentage]{task.percentage:>3.0f}%"),
|
|
17
|
+
TimeRemainingColumn(),
|
|
18
|
+
console=console
|
|
19
|
+
) as progress:
|
|
20
|
+
|
|
21
|
+
task = progress.add_task("[cyan]Focus time", total=total_seconds)
|
|
22
|
+
|
|
23
|
+
try:
|
|
24
|
+
for _ in range(total_seconds):
|
|
25
|
+
time.sleep(1)
|
|
26
|
+
progress.update(task, advance=1)
|
|
27
|
+
|
|
28
|
+
console.print("\n[bold green]🎉 Session complete! Great work![/bold green]\n")
|
|
29
|
+
|
|
30
|
+
except KeyboardInterrupt:
|
|
31
|
+
console.print("\n[yellow]⏸ Timer paused. Take a break![/yellow]\n")
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: focuscli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A productivity CLI tool for developers
|
|
5
|
+
Home-page: https://github.com/eneswritescode/focuscli
|
|
6
|
+
Author: Enes
|
|
7
|
+
Author-email: pypi.dole284@passinbox.com
|
|
8
|
+
Project-URL: Bug Reports, https://github.com/eneswritescode/focuscli/issues
|
|
9
|
+
Project-URL: Source, https://github.com/eneswritescode/focuscli
|
|
10
|
+
Keywords: productivity cli pomodoro task-manager todo timer focus
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
14
|
+
Classifier: Topic :: Utilities
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Operating System :: OS Independent
|
|
23
|
+
Classifier: Environment :: Console
|
|
24
|
+
Requires-Python: >=3.7
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Requires-Dist: typer>=0.9.0
|
|
28
|
+
Requires-Dist: rich>=13.0.0
|
|
29
|
+
Dynamic: author
|
|
30
|
+
Dynamic: author-email
|
|
31
|
+
Dynamic: classifier
|
|
32
|
+
Dynamic: description
|
|
33
|
+
Dynamic: description-content-type
|
|
34
|
+
Dynamic: home-page
|
|
35
|
+
Dynamic: keywords
|
|
36
|
+
Dynamic: license-file
|
|
37
|
+
Dynamic: project-url
|
|
38
|
+
Dynamic: requires-dist
|
|
39
|
+
Dynamic: requires-python
|
|
40
|
+
Dynamic: summary
|
|
41
|
+
|
|
42
|
+
# 🎯 FocusCLI
|
|
43
|
+
|
|
44
|
+
[](https://badge.fury.io/py/focuscli)
|
|
45
|
+
[](https://opensource.org/licenses/MIT)
|
|
46
|
+
[](https://www.python.org/downloads/)
|
|
47
|
+
|
|
48
|
+
A minimal productivity tool for developers who want to manage tasks and stay focused without leaving the terminal.
|
|
49
|
+
|
|
50
|
+
## ✨ Features
|
|
51
|
+
|
|
52
|
+
- **Task Management**: Add, list, complete, and delete tasks with a clean interface
|
|
53
|
+
- **Pomodoro Timer**: Built-in focus timer with live progress tracking
|
|
54
|
+
- **Beautiful UI**: Powered by Rich library for colorful tables and progress bars
|
|
55
|
+
- **Simple Storage**: Tasks saved locally in JSON format
|
|
56
|
+
- **Zero Config**: Works right out of the box
|
|
57
|
+
|
|
58
|
+
## 🚀 Installation
|
|
59
|
+
|
|
60
|
+
### Quick Install (Recommended)
|
|
61
|
+
|
|
62
|
+
Install directly from PyPI:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
pip install focuscli
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### From Source
|
|
69
|
+
|
|
70
|
+
Clone the repository and install:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
git clone https://github.com/eneswritescode/focuscli.git
|
|
74
|
+
cd focuscli
|
|
75
|
+
pip install -e .
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Requirements
|
|
79
|
+
|
|
80
|
+
- Python 3.7 or higher
|
|
81
|
+
- Dependencies will be installed automatically
|
|
82
|
+
|
|
83
|
+
## 🎬 Quick Start
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# Install
|
|
87
|
+
pip install focuscli
|
|
88
|
+
|
|
89
|
+
# Add some tasks
|
|
90
|
+
focuscli add "Review pull requests"
|
|
91
|
+
focuscli add "Write documentation"
|
|
92
|
+
focuscli add "Fix bug in login"
|
|
93
|
+
|
|
94
|
+
# See your tasks
|
|
95
|
+
focuscli list
|
|
96
|
+
|
|
97
|
+
# Complete a task
|
|
98
|
+
focuscli complete 1
|
|
99
|
+
|
|
100
|
+
# Start a 25-minute focus session
|
|
101
|
+
focuscli timer
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## 📖 Usage
|
|
105
|
+
|
|
106
|
+
### Add a task
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
focuscli add "Write documentation"
|
|
110
|
+
focuscli add "Fix bug in login page"
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### List all tasks
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
focuscli list
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Output example:
|
|
120
|
+
```
|
|
121
|
+
┏━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
|
|
122
|
+
┃ ID ┃ Task ┃ Status ┃
|
|
123
|
+
┡━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
|
|
124
|
+
│ 1 │ Write documentation │ ○ Pending │
|
|
125
|
+
│ 2 │ Fix bug in login page│ ○ Pending │
|
|
126
|
+
└────────┴──────────────────────┴───────────┘
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Complete a task
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
focuscli complete 1
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Delete a task
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
focuscli delete 2
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Start a focus timer
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
# Default 25-minute session
|
|
145
|
+
focuscli timer
|
|
146
|
+
|
|
147
|
+
# Custom duration (in minutes)
|
|
148
|
+
focuscli timer 45
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
**Windows Note:** If `focuscli` command is not found after installation, you may need to add Python Scripts to your PATH or use:
|
|
152
|
+
```bash
|
|
153
|
+
python -m focuscli.main <command>
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## 🛠️ Development
|
|
157
|
+
|
|
158
|
+
### Setup development environment
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
python -m venv venv
|
|
162
|
+
source venv/bin/activate # On Windows: venv\Scripts\activate
|
|
163
|
+
pip install -r requirements.txt
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Run locally
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
python -m focuscli.main add "Test task"
|
|
170
|
+
python -m focuscli.main list
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## 📂 Project Structure
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
focuscli/
|
|
177
|
+
├── focuscli/
|
|
178
|
+
│ ├── __init__.py
|
|
179
|
+
│ ├── main.py # CLI entry point
|
|
180
|
+
│ ├── tasks.py # Task management logic
|
|
181
|
+
│ ├── timer.py # Pomodoro timer
|
|
182
|
+
│ └── storage.py # JSON file handling
|
|
183
|
+
├── requirements.txt
|
|
184
|
+
├── setup.py
|
|
185
|
+
└── README.md
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## 🤝 Contributing
|
|
189
|
+
|
|
190
|
+
Contributions are welcome! Here's how you can help:
|
|
191
|
+
|
|
192
|
+
1. Fork the repository
|
|
193
|
+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
|
194
|
+
3. Commit your changes (`git commit -m 'Add some feature'`)
|
|
195
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
196
|
+
5. Open a Pull Request
|
|
197
|
+
|
|
198
|
+
## 💡 Ideas for Future Features
|
|
199
|
+
|
|
200
|
+
- Task priorities and tags
|
|
201
|
+
- Weekly/monthly reports
|
|
202
|
+
- Export tasks to different formats
|
|
203
|
+
- Break reminders after focus sessions
|
|
204
|
+
- Integration with calendar apps
|
|
205
|
+
|
|
206
|
+
## 📝 License
|
|
207
|
+
|
|
208
|
+
MIT License - feel free to use this project however you want.
|
|
209
|
+
|
|
210
|
+
## � Links
|
|
211
|
+
|
|
212
|
+
- **PyPI**: https://pypi.org/project/focuscli/
|
|
213
|
+
- **GitHub**: https://github.com/eneswritescode/focuscli
|
|
214
|
+
- **Issues**: https://github.com/eneswritescode/focuscli/issues
|
|
215
|
+
|
|
216
|
+
## 🙏 Acknowledgments
|
|
217
|
+
|
|
218
|
+
Built with:
|
|
219
|
+
- [Typer](https://typer.tiangolo.com/) - Modern CLI framework
|
|
220
|
+
- [Rich](https://rich.readthedocs.io/) - Beautiful terminal formatting
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
Made with ☕ by developers, for developers
|
|
225
|
+
|
|
226
|
+
**Star this repo if you find it helpful!** ⭐
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
MANIFEST.in
|
|
3
|
+
README.md
|
|
4
|
+
pyproject.toml
|
|
5
|
+
requirements.txt
|
|
6
|
+
setup.py
|
|
7
|
+
focuscli/__init__.py
|
|
8
|
+
focuscli/main.py
|
|
9
|
+
focuscli/storage.py
|
|
10
|
+
focuscli/tasks.py
|
|
11
|
+
focuscli/timer.py
|
|
12
|
+
focuscli.egg-info/PKG-INFO
|
|
13
|
+
focuscli.egg-info/SOURCES.txt
|
|
14
|
+
focuscli.egg-info/dependency_links.txt
|
|
15
|
+
focuscli.egg-info/entry_points.txt
|
|
16
|
+
focuscli.egg-info/requires.txt
|
|
17
|
+
focuscli.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
focuscli
|
focuscli-0.1.0/setup.cfg
ADDED
focuscli-0.1.0/setup.py
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
|
|
3
|
+
with open("README.md", "r", encoding="utf-8") as fh:
|
|
4
|
+
long_description = fh.read()
|
|
5
|
+
|
|
6
|
+
setup(
|
|
7
|
+
name="focuscli",
|
|
8
|
+
version="0.1.0",
|
|
9
|
+
author="Enes",
|
|
10
|
+
author_email="pypi.dole284@passinbox.com", # Update this
|
|
11
|
+
description="A productivity CLI tool for developers",
|
|
12
|
+
long_description=long_description,
|
|
13
|
+
long_description_content_type="text/markdown",
|
|
14
|
+
url="https://github.com/eneswritescode/focuscli",
|
|
15
|
+
project_urls={
|
|
16
|
+
"Bug Reports": "https://github.com/eneswritescode/focuscli/issues",
|
|
17
|
+
"Source": "https://github.com/eneswritescode/focuscli",
|
|
18
|
+
},
|
|
19
|
+
packages=find_packages(),
|
|
20
|
+
classifiers=[
|
|
21
|
+
"Development Status :: 4 - Beta",
|
|
22
|
+
"Intended Audience :: Developers",
|
|
23
|
+
"Topic :: Software Development :: Build Tools",
|
|
24
|
+
"Topic :: Utilities",
|
|
25
|
+
"License :: OSI Approved :: MIT License",
|
|
26
|
+
"Programming Language :: Python :: 3",
|
|
27
|
+
"Programming Language :: Python :: 3.7",
|
|
28
|
+
"Programming Language :: Python :: 3.8",
|
|
29
|
+
"Programming Language :: Python :: 3.9",
|
|
30
|
+
"Programming Language :: Python :: 3.10",
|
|
31
|
+
"Programming Language :: Python :: 3.11",
|
|
32
|
+
"Operating System :: OS Independent",
|
|
33
|
+
"Environment :: Console",
|
|
34
|
+
],
|
|
35
|
+
keywords="productivity cli pomodoro task-manager todo timer focus",
|
|
36
|
+
python_requires=">=3.7",
|
|
37
|
+
install_requires=[
|
|
38
|
+
"typer>=0.9.0",
|
|
39
|
+
"rich>=13.0.0",
|
|
40
|
+
],
|
|
41
|
+
entry_points={
|
|
42
|
+
"console_scripts": [
|
|
43
|
+
"focuscli=focuscli.main:main",
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
)
|