A command-line interface for the Memoria time tracking application. Track your work sessions, manage tags, and view your productivity metrics directly from your terminal.
This CLI is open source, but the Memoria API server is closed source and proprietary. The API specification (docs/api.yaml) is provided for transparency and to assist contributors. Please use the API responsibly and in accordance with our Terms of Service.
- Secure Authentication - JWT-based authentication with cookies
- Session Tracking - Start, stop, and manage time tracking sessions
- Tag Management - Create and organize sessions with custom tags
- Session History - View all your tracked sessions in a formatted table
- User Settings - Configure weekend exclusions and other preferences
- Colorful Output - Beautiful terminal UI with color-coded information
Clone the repository and link it locally:
git clone <repository-url>
cd memoria-cli
npm install
npm link-
Login to your account:
memoria login
-
Start a tracking session:
memoria start
-
Check session status:
memoria status
-
Stop and save your session:
memoria stop --save --notes "Worked on feature X" --tags "work"
-
View all sessions:
memoria list
The CLI defaults to the production server (https://memoria.yegekucuk.me). To use a different server:
memoria config --set-url http://localhost:3000View the current configuration:
memoria config --get-urlAuthentication tokens are stored securely in ~/.memoria/credentials.json. This file contains only the JWT token—never your password.
memoria login- Login to your accountmemoria register- Create a new accountmemoria logout- Logout and clear credentialsmemoria whoami- Display current user informationmemoria password- Change your password
memoria start- Start a new tracking sessionmemoria stop- Stop and resolve the current sessionmemoria status- Show current session statusmemoria list- List all sessionsmemoria add- Add a manual session entry
memoria tags list- List all tagsmemoria tags create- Create a new tagmemoria tags update- Update an existing tagmemoria tags delete- Delete a tag
memoria settings view- View current user settingsmemoria settings update- Update user settings
memoria config- Manage CLI configuration
The CLI enforces a strict session lifecycle to prevent conflicts:
- No Active/Pending Sessions → You can start a new session
- Active Session → Must stop with
--saveor--discardbefore starting another - Pending Session → Must resolve with
--saveor--discardbefore starting another
┌─────────────┐
│ No Session │
└──────┬──────┘
│ memoria start
▼
┌─────────────────┐
│ Active Session │ (running, endTime=null)
└──────┬──────────┘
│ memoria stop
▼
┌─────────────────┐
│ Resolved │ (saved or discarded)
└─────────────────┘
$ memoria login
? Email: user@example.com
? Password: ********
✓ Logged in successfully!
Welcome, John Doememoria login --email user@example.com --password mypassword# Start tracking
$ memoria start
✓ Session started!
Started: 2/13/2026, 2:30:00 PM
# Check status
$ memoria status
● Active Session
Started: 2/13/2026, 2:30:00 PM
Elapsed: 1h 23m 45s
# Stop and save with interactive prompts
$ memoria stop --save
⏱ Session ended. Duration: 1h 23m 45s
? Notes: Implemented user authentication
? Select tags: [x] Work [ ] Personal
✓ Session saved!
Duration: 1h 23m 45s
Notes: Implemented user authentication
Tags: Work# Save with inline flags
memoria stop --save --notes "Fixed bug #123" --tags "work,bugfix"
# Discard the session
memoria stop --discardmemoria add --start "2026-02-13T09:00:00Z" --duration 120 --notes "Morning meeting"# Create a tag
memoria tags create --name "Work" --color "#3498db"
# List all tags
memoria tags list
# Update a tag
memoria tags update --id abc123 --name "Business" --color "#2ecc71"
# Delete a tag
memoria tags delete --id abc123 --yes$ memoria list
┌──────────────────────┬──────────────────────┬────────────┬──────────────────────────┬──────────┐
│ Start │ End │ Duration │ Notes │ Tags │
├──────────────────────┼──────────────────────┼────────────┼──────────────────────────┼──────────┤
│ 2/13/2026, 2:30:00 PM│ 2/13/2026, 3:53:45 PM│ 1h 23m 45s │ Implemented auth │ Work │
│ 2/13/2026, 9:00:00 AM│ 2/13/2026, 11:00:00 AM│ 2h │ Morning meeting │ Meeting │
└──────────────────────┴──────────────────────┴────────────┴──────────────────────────┴──────────┘
2 session(s) totalThe CLI provides clear error messages:
# Trying to start when session is active
$ memoria start
✗ An active session is already running.
Stop it first with: memoria stop --save or memoria stop --discard
# Missing required flag
$ memoria stop
✗ You must specify either --save or --discard.
Usage: memoria stop --save --notes "..." --tags "name1,name2"
memoria stop --discard
# Unauthorized
$ memoria whoami
Session expired or unauthorized. Please login again with: memoria loginGet help for any command:
memoria --help
memoria login --help
memoria stop --help
memoria tags --helpFor detailed API information, see api.yaml in the docs folder.
MIT