visualmode-tracker 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.
@@ -0,0 +1,26 @@
1
+ name: ruff
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches: [main]
7
+
8
+ jobs:
9
+ lint:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+
14
+ - name: Install uv
15
+ uses: astral-sh/setup-uv@v5
16
+ with:
17
+ enable-cache: true
18
+
19
+ - name: Install dependencies
20
+ run: uv sync --dev
21
+
22
+ - name: Ruff format check
23
+ run: uv run ruff format --check .
24
+
25
+ - name: Ruff lint
26
+ run: uv run ruff check .
@@ -0,0 +1,50 @@
1
+ name: release
2
+
3
+ on:
4
+ push:
5
+ tags: ["v*"]
6
+
7
+ jobs:
8
+ build:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v4
12
+
13
+ - name: Install uv
14
+ uses: astral-sh/setup-uv@v5
15
+ with:
16
+ enable-cache: true
17
+
18
+ - name: Verify tag matches package version
19
+ run: |
20
+ tag="${GITHUB_REF_NAME#v}"
21
+ pkg="$(uv version --short)"
22
+ if [ "$tag" != "$pkg" ]; then
23
+ echo "Tag $GITHUB_REF_NAME (=$tag) does not match package version $pkg" >&2
24
+ exit 1
25
+ fi
26
+
27
+ - name: Build distributions
28
+ run: uv build
29
+
30
+ - name: Upload dist artifacts
31
+ uses: actions/upload-artifact@v4
32
+ with:
33
+ name: dist
34
+ path: dist/
35
+
36
+ publish:
37
+ needs: build
38
+ runs-on: ubuntu-latest
39
+ environment: pypi
40
+ permissions:
41
+ id-token: write # OIDC — Trusted Publishing, no API token stored
42
+ steps:
43
+ - name: Download dist artifacts
44
+ uses: actions/download-artifact@v4
45
+ with:
46
+ name: dist
47
+ path: dist/
48
+
49
+ - name: Publish to PyPI
50
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,26 @@
1
+ name: pytest
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches: [main]
7
+
8
+ jobs:
9
+ test:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+
14
+ - name: Install uv
15
+ uses: astral-sh/setup-uv@v5
16
+ with:
17
+ enable-cache: true
18
+
19
+ - name: Set up Python
20
+ run: uv python install
21
+
22
+ - name: Install dependencies
23
+ run: uv sync --all-extras --dev
24
+
25
+ - name: Run pytest
26
+ run: uv run pytest
@@ -0,0 +1,26 @@
1
+ name: basedpyright
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches: [main]
7
+
8
+ jobs:
9
+ typecheck:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+
14
+ - name: Install uv
15
+ uses: astral-sh/setup-uv@v5
16
+ with:
17
+ enable-cache: true
18
+
19
+ - name: Set up Python
20
+ run: uv python install
21
+
22
+ - name: Install dependencies
23
+ run: uv sync --all-extras --dev
24
+
25
+ - name: Run basedpyright
26
+ run: uv run basedpyright
@@ -0,0 +1,13 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+
9
+ # Virtual environments
10
+ .venv
11
+
12
+ # mise local overrides (contains tokens)
13
+ mise.local.toml
@@ -0,0 +1 @@
1
+ 3.12
@@ -0,0 +1,29 @@
1
+ {
2
+ "version": "0.2.0",
3
+ "configurations": [
4
+ {
5
+ "name": "Debug: current test file",
6
+ "type": "debugpy",
7
+ "request": "launch",
8
+ "module": "pytest",
9
+ "args": ["${file}", "-s"],
10
+ "console": "integratedTerminal",
11
+ "justMyCode": false
12
+ },
13
+ {
14
+ "name": "Debug: all tests",
15
+ "type": "debugpy",
16
+ "request": "launch",
17
+ "module": "pytest",
18
+ "args": ["tests", "-s"],
19
+ "console": "integratedTerminal",
20
+ "justMyCode": false
21
+ },
22
+ {
23
+ "name": "Attach to debugpy",
24
+ "type": "debugpy",
25
+ "request": "attach",
26
+ "connect": { "host": "localhost", "port": 5678 }
27
+ }
28
+ ]
29
+ }
@@ -0,0 +1,22 @@
1
+ [
2
+ {
3
+ "label": "Debug: current test file",
4
+ "adapter": "Debugpy",
5
+ "request": "launch",
6
+ "module": "pytest",
7
+ "args": ["$ZED_FILE", "-s"],
8
+ "cwd": "$ZED_WORKTREE_ROOT",
9
+ "python": "$ZED_WORKTREE_ROOT/.venv/bin/python",
10
+ "justMyCode": false
11
+ },
12
+ {
13
+ "label": "Debug: all tests",
14
+ "adapter": "Debugpy",
15
+ "request": "launch",
16
+ "module": "pytest",
17
+ "args": ["tests", "-s"],
18
+ "cwd": "$ZED_WORKTREE_ROOT",
19
+ "python": "$ZED_WORKTREE_ROOT/.venv/bin/python",
20
+ "justMyCode": false
21
+ }
22
+ ]
@@ -0,0 +1,23 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [0.1.0] - 2026-08-02
11
+
12
+ ### Added
13
+
14
+ - `vmt start <name> [+tags]` to begin tracking a work session, with an optional
15
+ `--at` flag to backdate the start time.
16
+ - `vmt status` to show the currently tracked session and elapsed time.
17
+ - `vmt stop` to end the active session, with `--at` and `--round` flags to adjust
18
+ the exact end time
19
+ - `vmt log` to display sessions tracked over the last 7 days.
20
+ - Session tags (e.g. `+python`) for categorizing tracked work.
21
+
22
+ [Unreleased]: https://github.com/jbranchaud/py-vmt/compare/v0.1.0...HEAD
23
+ [0.1.0]: https://github.com/jbranchaud/py-vmt/releases/tag/v0.1.0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Josh Branchaud
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.
@@ -0,0 +1,98 @@
1
+ Metadata-Version: 2.4
2
+ Name: visualmode-tracker
3
+ Version: 0.1.0
4
+ Summary: A command-line time tracker for your project and work sessions
5
+ Project-URL: Homepage, https://github.com/jbranchaud/py-vmt
6
+ Project-URL: Repository, https://github.com/jbranchaud/py-vmt
7
+ Project-URL: Issues, https://github.com/jbranchaud/py-vmt/issues
8
+ Author-email: Josh Branchaud <jbranchaud@gmail.com>
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: cli,productivity,time-tracking,timer,tracker
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Utilities
20
+ Requires-Python: >=3.12
21
+ Requires-Dist: click>=8.3.1
22
+ Requires-Dist: dateparser>=1.3.0
23
+ Requires-Dist: platformdirs>=4.9.4
24
+ Description-Content-Type: text/markdown
25
+
26
+ # VisualMode Tracker, built with Python
27
+
28
+ > A command-line time tracker for your project and work sessions
29
+
30
+ ## Usage
31
+
32
+ Standard usage of `vmt` is to `start` a session by name (e.g. `py-vmt`) with
33
+ zero or more tags (e.g. `+python`) while you work. You can always check the
34
+ `status`. When you are done with a session, you can `stop` it. Check the `log`
35
+ to see what sessions you have tracked over the last 7 days.
36
+
37
+ ```bash
38
+ ❯ vmt start py-vmt +python --at "14 minutes ago"
39
+ • Started tracking 'py-vmt' [python] at 12:00PM
40
+
41
+ ❯ vmt status
42
+ • Tracking 'py-vmt' [python] for 27m20s (since 12:00PM)
43
+
44
+ ❯ vmt stop --round
45
+ • Stopped tracking 'py-vmt' [python] (30m)
46
+
47
+ ❯ vmt log
48
+ Session Log
49
+ Sunday, August 02
50
+ 12:00PM - 12:30PM 30m 'py-vmt' [python]
51
+
52
+ ❯ vmt status
53
+ • Not tracking
54
+ Last: 'py-vmt' [python] (30m) at 12:00PM
55
+ ```
56
+
57
+ ## Installation
58
+
59
+ `vmt` (`visualmode-tracker`) can be installed via `uv` and `pipx`:
60
+
61
+ ```bash
62
+ ❯ uv tool install visualmode-tracker
63
+ ```
64
+
65
+ ```bash
66
+ ❯ pipx install visualmode-tracker
67
+ ```
68
+
69
+ Note: that while the package name on PyPI is `visualmode-tracker`, the
70
+ executable binary is called via `vmt`.
71
+
72
+ ## Development
73
+
74
+ Run the CLI in development with `uv`:
75
+
76
+ ```bash
77
+ ❯ uv run vmt start taco --at "1 hour ago"
78
+ • Started tracking 'taco' at 12:56PM
79
+ with flag --at of '1 hour ago'
80
+
81
+ ❯ uv run vmt status
82
+ • Tracking 'taco' for 3m
83
+
84
+ ❯ uv run vmt start burrito
85
+ Error: already tracking 'taco'. Stop the current session first.
86
+ Aborted!
87
+ ```
88
+
89
+ ## Testing
90
+
91
+ The test suite uses `pytest` and `click`'s `CliRunner` to verify the behavior of
92
+ the `vmt` CLI.
93
+
94
+ Run the tests like so:
95
+
96
+ ```bash
97
+ ❯ uv run pytest
98
+ ```
@@ -0,0 +1,73 @@
1
+ # VisualMode Tracker, built with Python
2
+
3
+ > A command-line time tracker for your project and work sessions
4
+
5
+ ## Usage
6
+
7
+ Standard usage of `vmt` is to `start` a session by name (e.g. `py-vmt`) with
8
+ zero or more tags (e.g. `+python`) while you work. You can always check the
9
+ `status`. When you are done with a session, you can `stop` it. Check the `log`
10
+ to see what sessions you have tracked over the last 7 days.
11
+
12
+ ```bash
13
+ ❯ vmt start py-vmt +python --at "14 minutes ago"
14
+ • Started tracking 'py-vmt' [python] at 12:00PM
15
+
16
+ ❯ vmt status
17
+ • Tracking 'py-vmt' [python] for 27m20s (since 12:00PM)
18
+
19
+ ❯ vmt stop --round
20
+ • Stopped tracking 'py-vmt' [python] (30m)
21
+
22
+ ❯ vmt log
23
+ Session Log
24
+ Sunday, August 02
25
+ 12:00PM - 12:30PM 30m 'py-vmt' [python]
26
+
27
+ ❯ vmt status
28
+ • Not tracking
29
+ Last: 'py-vmt' [python] (30m) at 12:00PM
30
+ ```
31
+
32
+ ## Installation
33
+
34
+ `vmt` (`visualmode-tracker`) can be installed via `uv` and `pipx`:
35
+
36
+ ```bash
37
+ ❯ uv tool install visualmode-tracker
38
+ ```
39
+
40
+ ```bash
41
+ ❯ pipx install visualmode-tracker
42
+ ```
43
+
44
+ Note: that while the package name on PyPI is `visualmode-tracker`, the
45
+ executable binary is called via `vmt`.
46
+
47
+ ## Development
48
+
49
+ Run the CLI in development with `uv`:
50
+
51
+ ```bash
52
+ ❯ uv run vmt start taco --at "1 hour ago"
53
+ • Started tracking 'taco' at 12:56PM
54
+ with flag --at of '1 hour ago'
55
+
56
+ ❯ uv run vmt status
57
+ • Tracking 'taco' for 3m
58
+
59
+ ❯ uv run vmt start burrito
60
+ Error: already tracking 'taco'. Stop the current session first.
61
+ Aborted!
62
+ ```
63
+
64
+ ## Testing
65
+
66
+ The test suite uses `pytest` and `click`'s `CliRunner` to verify the behavior of
67
+ the `vmt` CLI.
68
+
69
+ Run the tests like so:
70
+
71
+ ```bash
72
+ ❯ uv run pytest
73
+ ```
@@ -0,0 +1,29 @@
1
+ # https://taskfile.dev
2
+
3
+ version: '3'
4
+
5
+ tasks:
6
+ default:
7
+ desc: 'pre-push checklist (test, typecheck, etc.)'
8
+ cmds:
9
+ - task: test
10
+ - task: typecheck
11
+ - task: lint
12
+ - task: fmt
13
+ silent: true
14
+ test:
15
+ desc: 'run pytest suite'
16
+ cmds:
17
+ - uv run pytest
18
+ typecheck:
19
+ desc: 'run basedpyright type checking'
20
+ cmds:
21
+ - uv run basedpyright
22
+ lint:
23
+ desc: 'run ruff linter'
24
+ cmds:
25
+ - uv run ruff check
26
+ fmt:
27
+ desc: 'run ruff code formatting'
28
+ cmds:
29
+ - uv run ruff format
@@ -0,0 +1,4 @@
1
+ # Copy to mise.local.toml and paste in real tokens. Never commit mise.local.toml.
2
+
3
+ [env]
4
+ TEST_PYPI_TOKEN = "pypi-..."
@@ -0,0 +1,16 @@
1
+ # Tokens live in mise.local.toml (gitignored). See mise.local.toml.example.
2
+
3
+ [tools]
4
+ uv = "latest"
5
+
6
+ [tasks.build]
7
+ description = "build sdist + wheel from a clean dist/"
8
+ run = ["rm -rf dist", "uv build"]
9
+
10
+ [tasks.publish-test]
11
+ description = "publish to TestPyPI"
12
+ depends = ["build"]
13
+ run = 'uv publish --publish-url https://test.pypi.org/legacy/ --token "$TEST_PYPI_TOKEN"'
14
+
15
+ # No publish-to-PyPI task on purpose: real releases go through the tag-triggered
16
+ # .github/workflows/release.yml, which uses Trusted Publishing (OIDC, no token).
@@ -0,0 +1,54 @@
1
+ [project]
2
+ name = "visualmode-tracker"
3
+ version = "0.1.0"
4
+ description = "A command-line time tracker for your project and work sessions"
5
+ readme = "README.md"
6
+ license = "MIT"
7
+ license-files = ["LICENSE"]
8
+ requires-python = ">=3.12"
9
+ authors = [{ name = "Josh Branchaud", email = "jbranchaud@gmail.com" }]
10
+ keywords = ["cli", "time-tracking", "timer", "productivity", "tracker"]
11
+ classifiers = [
12
+ "Development Status :: 3 - Alpha",
13
+ "Environment :: Console",
14
+ "Intended Audience :: Developers",
15
+ "Operating System :: OS Independent",
16
+ "Programming Language :: Python :: 3",
17
+ "Programming Language :: Python :: 3.12",
18
+ "Programming Language :: Python :: 3.13",
19
+ "Topic :: Utilities",
20
+ ]
21
+ dependencies = ["click>=8.3.1", "dateparser>=1.3.0", "platformdirs>=4.9.4"]
22
+
23
+ [project.urls]
24
+ Homepage = "https://github.com/jbranchaud/py-vmt"
25
+ Repository = "https://github.com/jbranchaud/py-vmt"
26
+ Issues = "https://github.com/jbranchaud/py-vmt/issues"
27
+ [dependency-groups]
28
+ dev = [
29
+ "basedpyright>=1.39.9",
30
+ "freezegun>=1.5.5",
31
+ "pytest>=9.0.2",
32
+ "ruff>=0.15.20",
33
+ "types-dateparser>=1.3.0.20260211",
34
+ ]
35
+
36
+ [build-system]
37
+ requires = ["hatchling"]
38
+ build-backend = "hatchling.build"
39
+
40
+ [tool.hatch.build.targets.wheel]
41
+ packages = ["src/py_vmt"]
42
+
43
+ [project.scripts]
44
+ vmt = "py_vmt.cli:cli"
45
+
46
+ [tool.pytest.ini_options]
47
+ pythonpath = ["src"]
48
+ filterwarnings = [
49
+ "ignore:Timezone offset does not match system offset:UserWarning",
50
+ ]
51
+
52
+ [tool.pyright]
53
+ include = ["src", "tests"]
54
+ typeCheckingMode = "basic"
@@ -0,0 +1,3 @@
1
+ import importlib.metadata
2
+
3
+ __version__ = importlib.metadata.version("visualmode-tracker")