@usemeno/meno-cli 0.1.0
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/LICENSE +21 -0
- package/README.md +155 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +626 -0
- package/package.json +34 -0
- package/src/commands/log.ts +112 -0
- package/src/commands/login.ts +68 -0
- package/src/commands/select.ts +86 -0
- package/src/commands/start.ts +77 -0
- package/src/commands/status.ts +62 -0
- package/src/commands/stop.ts +132 -0
- package/src/config.ts +76 -0
- package/src/index.ts +55 -0
- package/src/utils/api.ts +113 -0
- package/src/utils/timer.ts +62 -0
- package/tsconfig.json +20 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 usemeno
|
|
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.
|
package/README.md
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# Meno CLI
|
|
2
|
+
|
|
3
|
+
Command-line interface for Meno time tracking. Track your time directly from your terminal.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @usemeno/cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or install locally:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
cd packages/meno-cli
|
|
15
|
+
npm install
|
|
16
|
+
npm run build
|
|
17
|
+
npm link
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Setup
|
|
21
|
+
|
|
22
|
+
1. Generate an API key in your Meno web app (Settings → API Keys)
|
|
23
|
+
2. Authenticate the CLI:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
meno login
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Paste your API key when prompted.
|
|
30
|
+
|
|
31
|
+
## Commands
|
|
32
|
+
|
|
33
|
+
### `meno select`
|
|
34
|
+
|
|
35
|
+
Select a project to work on. The selected project will be used for `meno start`.
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
meno select
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Use arrow keys to select a project, or choose "[Clear Selection]" to unset.
|
|
42
|
+
|
|
43
|
+
### `meno start [project-id]`
|
|
44
|
+
|
|
45
|
+
Start a timer on the selected project, or specify a project ID:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# Start on selected project
|
|
49
|
+
meno start
|
|
50
|
+
|
|
51
|
+
# Start on specific project
|
|
52
|
+
meno start clf123abc
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Only one timer can run at a time.
|
|
56
|
+
|
|
57
|
+
### `meno stop`
|
|
58
|
+
|
|
59
|
+
Stop the running timer and log the entry:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
meno stop
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
You'll be prompted for a description.
|
|
66
|
+
Add `--discard` to cancel without logging.
|
|
67
|
+
|
|
68
|
+
### `meno log <description>`
|
|
69
|
+
|
|
70
|
+
Manually log time without using a timer:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
meno log "Fixed authentication bug" --duration 1.5h --project clf123abc
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Duration formats:
|
|
77
|
+
- `45m` = 45 minutes
|
|
78
|
+
- `1.5h` = 1.5 hours
|
|
79
|
+
- `90` = 90 minutes (default unit)
|
|
80
|
+
|
|
81
|
+
### `meno status`
|
|
82
|
+
|
|
83
|
+
Show your current status:
|
|
84
|
+
- Selected project
|
|
85
|
+
- Running timer (if any)
|
|
86
|
+
- Unbilled revenue and hours
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
meno status
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Workflow Example
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# Morning: Select your project
|
|
96
|
+
meno select
|
|
97
|
+
> Website Redesign (Acme Corp) • $150/hr
|
|
98
|
+
|
|
99
|
+
# Start working
|
|
100
|
+
meno start
|
|
101
|
+
|
|
102
|
+
# ... work for 2 hours ...
|
|
103
|
+
|
|
104
|
+
# Stop and log
|
|
105
|
+
meno stop
|
|
106
|
+
> What were you working on? Built homepage hero section
|
|
107
|
+
> Log this entry? Yes
|
|
108
|
+
✓ Logged 2.00 hours to Website Redesign
|
|
109
|
+
|
|
110
|
+
# Quick status check
|
|
111
|
+
meno status
|
|
112
|
+
💰 Unbilled Revenue: $1,234.56
|
|
113
|
+
⏱️ Total Hours: 45.5 hours across 12 entries
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Configuration
|
|
117
|
+
|
|
118
|
+
Config is stored at `~/.config/meno-cli/config.json` (cross-platform).
|
|
119
|
+
|
|
120
|
+
Contains:
|
|
121
|
+
- `apiKey` - Your Meno API key
|
|
122
|
+
- `baseUrl` - API endpoint (default: http://localhost:3000)
|
|
123
|
+
- `selectedProject` - Currently selected project
|
|
124
|
+
- `activeTimer` - Running timer state (persists across restarts)
|
|
125
|
+
|
|
126
|
+
## Troubleshooting
|
|
127
|
+
|
|
128
|
+
**"Not logged in" error:**
|
|
129
|
+
Run `meno login` to authenticate.
|
|
130
|
+
|
|
131
|
+
**"No project selected" error:**
|
|
132
|
+
Run `meno select` to choose a project, or pass `--project <id>` to commands.
|
|
133
|
+
|
|
134
|
+
**Connection errors:**
|
|
135
|
+
Check your `baseUrl` in config. For production, use `https://app.meno.com`.
|
|
136
|
+
|
|
137
|
+
## Development
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
# Install dependencies
|
|
141
|
+
npm install
|
|
142
|
+
|
|
143
|
+
# Build
|
|
144
|
+
npm run build
|
|
145
|
+
|
|
146
|
+
# Watch mode
|
|
147
|
+
npm run dev
|
|
148
|
+
|
|
149
|
+
# Link for local testing
|
|
150
|
+
npm link
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## License
|
|
154
|
+
|
|
155
|
+
MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|