epoch-tui 0.1.5 → 0.1.7
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.
- package/README.md +88 -0
- package/dist/index.js +14 -12
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Epoch
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
Epoch is a modern, terminal-based task logger and time tracker built with TypeScript, React, and Ink. It features a three-pane layout designed for efficiency and keyboard-centric workflows, allowing you to manage nested tasks and track your time without ever leaving the terminal.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- **Three-Pane Layout**: Seamlessly switch between Calendar, Tasks, and Timeline views.
|
|
10
|
+
- **Calendar View**: Navigate through months and days to visualize task distribution and select specific dates.
|
|
11
|
+
- **Infinite Nesting**: Break down complex projects with support for infinitely nested subtasks.
|
|
12
|
+
- **Activity Timeline**: Automatically logs every action (start, complete, delegate) with precise timestamps.
|
|
13
|
+
- **Task States**: Track tasks through 'todo', 'completed', 'delegated', and 'delayed' states.
|
|
14
|
+
- **Extensible Themes**: Comes with built-in dark and light themes (plus 20+ community themes like Catppuccin, Nord, Dracula).
|
|
15
|
+
- **Local Persistence**: Data is saved locally in JSON format for easy backup, portability, and privacy.
|
|
16
|
+
|
|
17
|
+
## Installation & Running
|
|
18
|
+
|
|
19
|
+
### Prerequisites
|
|
20
|
+
- Node.js (v16+ recommended)
|
|
21
|
+
- pnpm
|
|
22
|
+
|
|
23
|
+
### Setup
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# Install dependencies
|
|
27
|
+
pnpm install
|
|
28
|
+
|
|
29
|
+
# Run in development mode (with hot reload)
|
|
30
|
+
pnpm dev
|
|
31
|
+
|
|
32
|
+
# Build and start production version
|
|
33
|
+
pnpm build
|
|
34
|
+
pnpm start
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Keyboard Shortcuts
|
|
38
|
+
|
|
39
|
+
Epoch is designed to be used entirely without a mouse.
|
|
40
|
+
|
|
41
|
+
### Global Navigation
|
|
42
|
+
- `1` / `2` / `3`: Switch directly to Calendar / Tasks / Timeline panes
|
|
43
|
+
- `Tab` / `Shift+Tab`: Cycle through panes
|
|
44
|
+
- `?`: Toggle help dialog
|
|
45
|
+
- `q`: Quit application
|
|
46
|
+
|
|
47
|
+
### Calendar Pane
|
|
48
|
+
- `j` / `k` (or `↓` / `↑`): Navigate weeks
|
|
49
|
+
- `h` / `l` (or `←` / `→`): Navigate days
|
|
50
|
+
- `n` / `p`: Next / Previous month
|
|
51
|
+
- `Enter`: Select date
|
|
52
|
+
|
|
53
|
+
### Tasks Pane
|
|
54
|
+
- `a`: Add new task
|
|
55
|
+
- `e`: Edit task title
|
|
56
|
+
- `d`: Delete task
|
|
57
|
+
- `Space`: Toggle completion status
|
|
58
|
+
- `s`: Start task (sets start time)
|
|
59
|
+
- `D`: Mark as delegated
|
|
60
|
+
- `x`: Mark as delayed/cancelled
|
|
61
|
+
- `Tab`: Indent task (convert to subtask)
|
|
62
|
+
- `Shift+Tab`: Unindent task
|
|
63
|
+
- `Enter`: Expand/Collapse subtasks
|
|
64
|
+
|
|
65
|
+
### Timeline Pane
|
|
66
|
+
- `j` / `k`: Scroll through activity history
|
|
67
|
+
- `t`: Toggle theme (Dark/Light)
|
|
68
|
+
|
|
69
|
+
## Data Storage
|
|
70
|
+
|
|
71
|
+
Your data is stored locally in a human-readable JSON file. This allows for easy backups or manual editing if necessary.
|
|
72
|
+
|
|
73
|
+
- **macOS**: `~/Library/Application Support/epoch/data.json`
|
|
74
|
+
- **Linux**: `~/.local/share/epoch/data.json` (or `$XDG_DATA_HOME`)
|
|
75
|
+
- **Windows**: `%APPDATA%\epoch\data.json`
|
|
76
|
+
|
|
77
|
+
## Tech Stack
|
|
78
|
+
|
|
79
|
+
- **UI Framework**: React + Ink
|
|
80
|
+
- **Language**: TypeScript
|
|
81
|
+
- **State Management**: React Context
|
|
82
|
+
- **Date Handling**: date-fns
|
|
83
|
+
- **Persistence**: File System (JSON)
|
|
84
|
+
|
|
85
|
+
## Author
|
|
86
|
+
|
|
87
|
+
Created by [Akshat Dubey](mailto:akshatdubey0808@gmail.com).
|
|
88
|
+
|
package/dist/index.js
CHANGED
|
@@ -2827,9 +2827,9 @@ var TasksPane = () => {
|
|
|
2827
2827
|
const visibleRows = useMemo(() => {
|
|
2828
2828
|
return Math.max(5, terminalHeight - 11);
|
|
2829
2829
|
}, [terminalHeight]);
|
|
2830
|
-
const
|
|
2831
|
-
|
|
2832
|
-
);
|
|
2830
|
+
const selectedDateObj = new Date(selectedDate.year, selectedDate.month, selectedDate.day);
|
|
2831
|
+
const dateStr = getDateString(selectedDateObj);
|
|
2832
|
+
const isSelectedDateToday = isToday(selectedDateObj);
|
|
2833
2833
|
const dayTasks = useMemo(() => tasks[dateStr] || [], [tasks, dateStr]);
|
|
2834
2834
|
const stats = taskService.getTaskStats(tasks, dateStr);
|
|
2835
2835
|
const isFocused = activePane === "tasks" && !isModalOpen;
|
|
@@ -2951,7 +2951,7 @@ var TasksPane = () => {
|
|
|
2951
2951
|
eventTypeToRemove[previousState]
|
|
2952
2952
|
);
|
|
2953
2953
|
setTimeline(updatedTimeline);
|
|
2954
|
-
} else {
|
|
2954
|
+
} else if (isSelectedDateToday) {
|
|
2955
2955
|
const eventTypeMap = {
|
|
2956
2956
|
todo: "started" /* STARTED */,
|
|
2957
2957
|
// shouldn't happen
|
|
@@ -3145,14 +3145,16 @@ var TasksPane = () => {
|
|
|
3145
3145
|
} else {
|
|
3146
3146
|
const updated = taskService.startTask(tasks, selectedTaskId);
|
|
3147
3147
|
setTasks(updated);
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3148
|
+
if (isSelectedDateToday) {
|
|
3149
|
+
const event = timelineService.createEvent(
|
|
3150
|
+
selectedTaskId,
|
|
3151
|
+
selectedTask.title,
|
|
3152
|
+
"started" /* STARTED */,
|
|
3153
|
+
/* @__PURE__ */ new Date()
|
|
3154
|
+
);
|
|
3155
|
+
const updatedTimeline = timelineService.addEvent(timeline, event);
|
|
3156
|
+
setTimeline(updatedTimeline);
|
|
3157
|
+
}
|
|
3156
3158
|
}
|
|
3157
3159
|
} catch (err) {
|
|
3158
3160
|
console.error("Error toggling task start:", err);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "epoch-tui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "A TUI app for daily task logging and time tracking",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"time-tracking",
|
|
23
23
|
"cli"
|
|
24
24
|
],
|
|
25
|
-
"author": "",
|
|
25
|
+
"author": "Akshat Dubey <akshatdubey0808@gmail.com>",
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@inkjs/ui": "^2.0.0",
|