@alan-vaughn/ttrack
v0.1.0
Published
A minimalist command-line time tracker
Readme
TTrack
A minimalist command-line time tracker with weekly goals. Track your time spent on various activities and monitor progress toward your weekly targets.
Features
- Interactive terminal user interface (TUI)
- Simple and clean design
- Built with TypeScript and Ink
Prerequisites
- Node.js 18 or higher
Installation
From npm (Recommended)
Install TTrack globally via npm:
npm install -g ttrackOnce installed, you can run TTrack from anywhere:
ttrackFrom Source (Development)
Clone the repository and install dependencies:
git clone <repository-url>
cd ttrack
pnpm installTesting Local Changes
To test the package locally before publishing:
# Build the project
pnpm run build
# Link the package globally
npm link
# Now you can run ttrack from anywhere
ttrack
# When done testing, unlink
npm unlink -g ttrackConfiguration
TTrack supports optional configuration to customize where your database file is stored.
Database Location
By default, TTrack stores its database (ttrack.sqlite) in the current working directory. To specify a custom location, create a configuration file:
Create the configuration directory:
mkdir -p ~/.ttrackCreate the config file at
~/.ttrack/config.json:{ "databaseFileLocation": "/path/to/your/ttrack.sqlite" }Replace
/path/to/your/ttrack.sqlitewith your desired database location.
If the config file doesn't exist or the databaseFileLocation key is not set, TTrack will use the default location (current directory).
Development
Run the application locally in development mode:
pnpm run devThis will start the TTrack TUI where you can:
- Navigate the menu using arrow keys (↑/↓)
- Select options with Enter
- Quick quit with 'q' key
Building
To build the TypeScript code:
pnpm run buildTo run the built version:
pnpm startType Checking
Run TypeScript type checking:
pnpm typecheckProject Structure
ttrack/
├── src/
│ ├── cli/ # CLI entry point
│ │ └── index.tsx
│ └── ui/ # UI components
│ ├── App.tsx # Main application component
│ └── components/
│ └── Banner.tsx
├── package.json
└── tsconfig.jsonLicense
MIT License - See LICENSE file for details
