Skip to content

Commit d15e2af

Browse files
authored
--domain for cn use (#114)
1 parent 2c5b7d7 commit d15e2af

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@
1313

1414
Garmin SSO auth + Connect Python client
1515

16+
## Garmin Connect MCP Server
17+
18+
[`garth-mcp-server`](https://github.com/matin/garth-mcp-server) is in early development.
19+
Contributions are greatly appreciated.
20+
21+
To generate your `GARTH_TOKEN`, use `uvx garth login`.
22+
For China, do `uvx garth --domain garmin.cn login`.
23+
1624
## Google Colabs
1725

1826
### [Stress: 28-day rolling average](https://colab.research.google.com/github/matin/garth/blob/main/colabs/stress.ipynb)

src/garth/cli.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,22 @@
66

77
def main():
88
parser = argparse.ArgumentParser(prog="garth")
9+
parser.add_argument(
10+
"--domain",
11+
"-d",
12+
default="garmin.com",
13+
help=(
14+
"Domain for Garmin Connect (default: garmin.com). "
15+
"Use garmin.cn for China."
16+
),
17+
)
918
subparsers = parser.add_subparsers(dest="command")
1019
subparsers.add_parser(
1120
"login", help="Authenticate with Garmin Connect and print token"
1221
)
1322

1423
args = parser.parse_args()
24+
garth.configure(domain=args.domain)
1525

1626
match args.command:
1727
case "login":

src/garth/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.5.9"
1+
__version__ = "0.5.10"

0 commit comments

Comments
 (0)