muse-cli 0.2.0__tar.gz → 0.2.1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: muse-cli
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Command-line client for your personal muse.ai AI agent: chat, automate, and manage side chats, feed, goals, ideas, and sessions from the terminal. No browser needed.
5
5
  Project-URL: Homepage, https://github.com/nikships/muse-cli
6
6
  Project-URL: Documentation, https://github.com/nikships/muse-cli#readme
@@ -69,8 +69,10 @@ uv tool install muse-cli # or: pipx install muse-cli / pip install muse
69
69
  Then log in and check the connection:
70
70
 
71
71
  ```bash
72
- # 1. Log in to https://muse.ai/ in Chrome
73
- # 2. Export your session (one time; re-run when it expires):
72
+ # 1. Install agent-browser (reads cookies from Chrome):
73
+ npm i -g agent-browser
74
+ # 2. Log in to https://muse.ai/ in Chrome
75
+ # 3. Export your session (one time; re-run when it expires):
74
76
  muse-cli auth export
75
77
 
76
78
  muse-cli status
@@ -32,8 +32,10 @@ uv tool install muse-cli # or: pipx install muse-cli / pip install muse
32
32
  Then log in and check the connection:
33
33
 
34
34
  ```bash
35
- # 1. Log in to https://muse.ai/ in Chrome
36
- # 2. Export your session (one time; re-run when it expires):
35
+ # 1. Install agent-browser (reads cookies from Chrome):
36
+ npm i -g agent-browser
37
+ # 2. Log in to https://muse.ai/ in Chrome
38
+ # 3. Export your session (one time; re-run when it expires):
37
39
  muse-cli auth export
38
40
 
39
41
  muse-cli status
@@ -32,18 +32,20 @@ muse-cli --help >/dev/null && echo cli-ok # proves the install + deps resolve
32
32
 
33
33
  ## 2. Auth
34
34
 
35
- The user must be logged in to https://muse.ai/ in Chrome first. Then:
35
+ The user must be logged in to https://muse.ai/ in Chrome first. `auth export`
36
+ reads Chrome's cookies through
37
+ [agent-browser](https://github.com/nikships/foundry); install it if missing,
38
+ then:
36
39
 
37
40
  ```bash
41
+ npm i -g agent-browser # one-time; skip if already installed
38
42
  muse-cli auth export # saves muse.ai cookies to ~/.config/muse-cli/cookies.txt (0600)
39
43
  test -s ~/.config/muse-cli/cookies.txt && echo auth-ok
40
44
  ```
41
45
 
42
- `auth export` pulls cookies from a running Chrome via
43
- [agent-browser](https://github.com/nikships/foundry) (`npm i -g agent-browser`
44
- if it is missing). No Chrome? Copy the `muse.ai` cookies by hand (DevTools →
45
- Application → Cookies; needs `hatch_sess`) into
46
- `~/.config/muse-cli/cookies.txt` as Netscape-jar or `name=value; ...` text.
46
+ No Chrome? Copy the `muse.ai` cookies by hand (DevTools Application →
47
+ Cookies; needs `hatch_sess`) into `~/.config/muse-cli/cookies.txt` as
48
+ Netscape-jar or `name=value; ...` text.
47
49
 
48
50
  Access and gateway tokens are fetched fresh on every run; only cookies
49
51
  persist. When commands later fail with `auth error`, cookies expired:
@@ -1,3 +1,3 @@
1
1
  """muse-cli: talk to your personal muse.ai AI agent from the terminal."""
2
2
 
3
- __version__ = "0.2.0"
3
+ __version__ = "0.2.1"
@@ -9,6 +9,7 @@ Then: muse-cli status | muse-cli threads | muse-cli history | muse-cli send "hel
9
9
  import argparse
10
10
  import json
11
11
  import os
12
+ import shutil
12
13
  import sys
13
14
  import time
14
15
 
@@ -75,6 +76,10 @@ def _browser_cookies(headed):
75
76
  """Read the cookie jar via agent-browser. Headed auto-connect attaches
76
77
  to the user's real Chrome; plain mode uses a fresh browser (no login)."""
77
78
  base = ["agent-browser"] + (["--headed", "--auto-connect"] if headed else [])
79
+ if shutil.which("agent-browser") is None:
80
+ print("agent-browser not found; install it with: npm i -g agent-browser", file=sys.stderr)
81
+ print("alternative: export cookies by hand, see README Setup notes.", file=sys.stderr)
82
+ sys.exit(1)
78
83
  last_err = "unknown error"
79
84
  for _ in range(3):
80
85
  try:
File without changes
File without changes
File without changes
File without changes