messygit 0.3.0__tar.gz → 0.3.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.
- {messygit-0.3.0 → messygit-0.3.1}/PKG-INFO +2 -1
- {messygit-0.3.0 → messygit-0.3.1}/README.md +1 -0
- {messygit-0.3.0 → messygit-0.3.1}/messygit/cli.py +23 -0
- {messygit-0.3.0 → messygit-0.3.1}/messygit/config.py +17 -0
- {messygit-0.3.0 → messygit-0.3.1}/pyproject.toml +1 -1
- {messygit-0.3.0 → messygit-0.3.1}/.github/workflows/publish.yml +0 -0
- {messygit-0.3.0 → messygit-0.3.1}/.gitignore +0 -0
- {messygit-0.3.0 → messygit-0.3.1}/.vscode/settings.json +0 -0
- {messygit-0.3.0 → messygit-0.3.1}/ARCHITECTURE.md +0 -0
- {messygit-0.3.0 → messygit-0.3.1}/messygit/__init__.py +0 -0
- {messygit-0.3.0 → messygit-0.3.1}/messygit/agent/agent.py +0 -0
- {messygit-0.3.0 → messygit-0.3.1}/messygit/agent/tool.py +0 -0
- {messygit-0.3.0 → messygit-0.3.1}/messygit/agent/tools.py +0 -0
- {messygit-0.3.0 → messygit-0.3.1}/messygit/git.py +0 -0
- {messygit-0.3.0 → messygit-0.3.1}/messygit/llm.py +0 -0
- {messygit-0.3.0 → messygit-0.3.1}/messygit/models.py +0 -0
- {messygit-0.3.0 → messygit-0.3.1}/messygit/prompts.py +0 -0
- {messygit-0.3.0 → messygit-0.3.1}/messygit/usage.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: messygit
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: An AI-powered interactive git CLI with agentic tools for commits, code suggestions, and workflow automation.
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -114,6 +114,7 @@ Commands are grouped on the `help` screen:
|
|
|
114
114
|
|
|
115
115
|
| Command | Description |
|
|
116
116
|
|---------|-------------|
|
|
117
|
+
| `todo` | Open your todo list in `$EDITOR` (saved to `~/.messygit/todo.md`) |
|
|
117
118
|
| `theme` or `theme <name>` | Change the UI color (run `theme` to list presets) |
|
|
118
119
|
| `help` | List available commands |
|
|
119
120
|
| `quit` / `exit` | Exit messygit |
|
|
@@ -103,6 +103,7 @@ Commands are grouped on the `help` screen:
|
|
|
103
103
|
|
|
104
104
|
| Command | Description |
|
|
105
105
|
|---------|-------------|
|
|
106
|
+
| `todo` | Open your todo list in `$EDITOR` (saved to `~/.messygit/todo.md`) |
|
|
106
107
|
| `theme` or `theme <name>` | Change the UI color (run `theme` to list presets) |
|
|
107
108
|
| `help` | List available commands |
|
|
108
109
|
| `quit` / `exit` | Exit messygit |
|
|
@@ -21,10 +21,12 @@ from .config import (
|
|
|
21
21
|
MissingApiKeyError,
|
|
22
22
|
load_api_key,
|
|
23
23
|
load_theme,
|
|
24
|
+
load_todo,
|
|
24
25
|
mask_api_key,
|
|
25
26
|
save_api_key,
|
|
26
27
|
save_model,
|
|
27
28
|
save_theme,
|
|
29
|
+
save_todo,
|
|
28
30
|
)
|
|
29
31
|
from .git import (
|
|
30
32
|
get_current_branch,
|
|
@@ -121,6 +123,7 @@ HELP_GROUPS = [
|
|
|
121
123
|
("tokens", "show session token usage / open billing", "tokens"),
|
|
122
124
|
]),
|
|
123
125
|
("app", [
|
|
126
|
+
("todo", "open your todo list in your editor", "todo"),
|
|
124
127
|
("theme", "change the UI color", "theme or theme <name>"),
|
|
125
128
|
("help", "show this help message", "help"),
|
|
126
129
|
("quit/exit", "exit messygit", "quit"),
|
|
@@ -611,6 +614,25 @@ def _handle_theme(args: list[str]) -> None:
|
|
|
611
614
|
console.print(Text.assemble("Theme set to ", (name, BRAND), " ") + _swatch(THEMES[name]))
|
|
612
615
|
|
|
613
616
|
|
|
617
|
+
TODO_SEED = "# messygit todo\n\n- \n"
|
|
618
|
+
|
|
619
|
+
|
|
620
|
+
def _handle_todo() -> None:
|
|
621
|
+
"""Open the persisted todo file in $EDITOR; save whatever comes back."""
|
|
622
|
+
current = load_todo()
|
|
623
|
+
seed = current if current.strip() else TODO_SEED
|
|
624
|
+
edited = click.edit(seed)
|
|
625
|
+
if edited is None:
|
|
626
|
+
_warn("Editor exited without saving; todo unchanged.")
|
|
627
|
+
return
|
|
628
|
+
save_todo(edited)
|
|
629
|
+
open_items = sum(
|
|
630
|
+
1 for line in edited.splitlines() if line.lstrip().startswith(("- ", "* "))
|
|
631
|
+
and line.strip() not in ("-", "*")
|
|
632
|
+
)
|
|
633
|
+
_success(f"Todo saved [{MUTED}]({open_items} item{'s' if open_items != 1 else ''})[/]")
|
|
634
|
+
|
|
635
|
+
|
|
614
636
|
def _handle_suggestion() -> None:
|
|
615
637
|
agent = Agent(
|
|
616
638
|
name="suggestion_agent",
|
|
@@ -640,6 +662,7 @@ COMMANDS = {
|
|
|
640
662
|
"suggest": lambda args: _handle_suggestion(),
|
|
641
663
|
"tokens": lambda args: _handle_tokens(),
|
|
642
664
|
"model": _handle_model,
|
|
665
|
+
"todo": lambda args: _handle_todo(),
|
|
643
666
|
"theme": _handle_theme,
|
|
644
667
|
"help": lambda args: _print_help(),
|
|
645
668
|
}
|
|
@@ -4,6 +4,7 @@ from pathlib import Path
|
|
|
4
4
|
|
|
5
5
|
CONFIG_DIR = Path.home() / ".messygit"
|
|
6
6
|
CONFIG_FILE = CONFIG_DIR / "config.json"
|
|
7
|
+
TODO_FILE = CONFIG_DIR / "todo.md"
|
|
7
8
|
ANTHROPIC_ENV_VAR = "ANTHROPIC_API_KEY"
|
|
8
9
|
|
|
9
10
|
MISSING_API_KEY_MESSAGE = (
|
|
@@ -117,6 +118,22 @@ def save_model(name: str) -> None:
|
|
|
117
118
|
_write_config(config)
|
|
118
119
|
|
|
119
120
|
|
|
121
|
+
def load_todo() -> str:
|
|
122
|
+
if not TODO_FILE.exists():
|
|
123
|
+
return ""
|
|
124
|
+
try:
|
|
125
|
+
with open(TODO_FILE) as f:
|
|
126
|
+
return f.read()
|
|
127
|
+
except OSError:
|
|
128
|
+
return ""
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
def save_todo(text: str) -> None:
|
|
132
|
+
CONFIG_DIR.mkdir(exist_ok=True)
|
|
133
|
+
with open(TODO_FILE, "w") as f:
|
|
134
|
+
f.write(text)
|
|
135
|
+
|
|
136
|
+
|
|
120
137
|
def resolve_api_key() -> str:
|
|
121
138
|
"""Return API key from ANTHROPIC_API_KEY or ~/.messygit/config.json."""
|
|
122
139
|
env_set = ANTHROPIC_ENV_VAR in os.environ
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "messygit"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.1"
|
|
8
8
|
description = "An AI-powered interactive git CLI with agentic tools for commits, code suggestions, and workflow automation."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|