shevam 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.
- shevam-0.1.0/.gitignore +5 -0
- shevam-0.1.0/PKG-INFO +156 -0
- shevam-0.1.0/README.md +145 -0
- shevam-0.1.0/project.json +29 -0
- shevam-0.1.0/pyproject.toml +22 -0
- shevam-0.1.0/shevam/__init__.py +2 -0
- shevam-0.1.0/shevam/cli.py +922 -0
- shevam-0.1.0/shevam/db.py +177 -0
- shevam-0.1.0/shevam/deps.py +25 -0
- shevam-0.1.0/shevam/error_log.py +89 -0
- shevam-0.1.0/shevam/gui.py +1310 -0
- shevam-0.1.0/shevam/manager.py +178 -0
- shevam-0.1.0/shevam/models.py +65 -0
- shevam-0.1.0/shevam/plugin_engine.py +502 -0
- shevam-0.1.0/shevam/plugins_builtin/__init__.py +0 -0
- shevam-0.1.0/shevam/plugins_builtin/git_info/__init__.py +0 -0
- shevam-0.1.0/shevam/plugins_builtin/git_info/cli.py +613 -0
- shevam-0.1.0/shevam/plugins_builtin/git_info/git_core.py +610 -0
- shevam-0.1.0/shevam/plugins_builtin/git_info/plugin.py +118 -0
- shevam-0.1.0/shevam/plugins_builtin/git_info/view.py +822 -0
- shevam-0.1.0/shevam/plugins_builtin/stats_widget/__init__.py +0 -0
- shevam-0.1.0/shevam/plugins_builtin/stats_widget/cli.py +164 -0
- shevam-0.1.0/shevam/plugins_builtin/stats_widget/plugin.py +49 -0
- shevam-0.1.0/shevam/plugins_builtin/stats_widget/tool_compare.py +56 -0
- shevam-0.1.0/shevam/plugins_builtin/stats_widget/widget.py +71 -0
- shevam-0.1.0/shevam/tui.py +967 -0
shevam-0.1.0/.gitignore
ADDED
shevam-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: shevam
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A project & tools management CLI built with Typer and Textual
|
|
5
|
+
Requires-Python: >=3.10
|
|
6
|
+
Requires-Dist: gitpython>=3.1.0
|
|
7
|
+
Requires-Dist: rich>=13.0.0
|
|
8
|
+
Requires-Dist: textual>=0.60.0
|
|
9
|
+
Requires-Dist: typer[all]>=0.12.0
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
|
|
12
|
+
# Shevam ◈ v0.2.0
|
|
13
|
+
|
|
14
|
+
**Shevam** is a modular project & tools manager with a full **plugin system**.
|
|
15
|
+
Built with [Typer](https://typer.tiangolo.com/) + [Textual](https://textual.textualize.io/).
|
|
16
|
+
Pure-Python JSON storage — zero external DB required.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
pip install -e . # Python 3.10+
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Core workflow
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
shevam init [dir] # writes project.json into dir (npm init style)
|
|
32
|
+
shevam add [dir] # reads project.json → registers in ~/.shevam/db.json
|
|
33
|
+
shevam list # table of all projects
|
|
34
|
+
shevam show <n> # full detail panel
|
|
35
|
+
shevam update <n> # update fields + rewrite project.json
|
|
36
|
+
shevam remove <n> # remove from DB
|
|
37
|
+
shevam recent # recently accessed
|
|
38
|
+
shevam ui # full Textual TUI
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Plugin system
|
|
44
|
+
|
|
45
|
+
### Storage
|
|
46
|
+
```
|
|
47
|
+
~/.shevam/
|
|
48
|
+
db.json registered projects
|
|
49
|
+
recent.json access history
|
|
50
|
+
plugins.json enabled/disabled state
|
|
51
|
+
plugins/
|
|
52
|
+
<name>/
|
|
53
|
+
plugin.py user-installed plugins
|
|
54
|
+
shevam/plugins_builtin/
|
|
55
|
+
stats_widget/ built-in: type breakdown widget + CLI
|
|
56
|
+
git_info/ built-in: git status TUI view + CLI
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### What plugins can do
|
|
60
|
+
|
|
61
|
+
| Capability | How |
|
|
62
|
+
|---|---|
|
|
63
|
+
| **Dashboard widget** | `self.add_dashboard_widget(label, factory, position)` |
|
|
64
|
+
| **New TUI view** | `self.add_tui_view(view_id, label, factory, nav_key)` |
|
|
65
|
+
| **Theme / CSS patch** | `self.add_css(css_string)` or full replace via `theme_registry.replace()` |
|
|
66
|
+
| **CLI sub-app** | `self.add_cli_app(typer_app)` → `shevam <plugin_id> <cmd>` |
|
|
67
|
+
| **CLI top-level cmd** | `self.add_cli_command(fn)` |
|
|
68
|
+
| **Hooks** | `self.add_hook("before_add", fn)` etc. |
|
|
69
|
+
|
|
70
|
+
### Available hooks
|
|
71
|
+
|
|
72
|
+
| Hook | When fired | Context keys |
|
|
73
|
+
|---|---|---|
|
|
74
|
+
| `before_init` | Before project.json is written | `name`, `path` |
|
|
75
|
+
| `after_init` | After project.json written | `name`, `path` |
|
|
76
|
+
| `before_add` | Before registering in DB | all project fields |
|
|
77
|
+
| `after_add` | After registering in DB | `name`, `path`, `project_type` |
|
|
78
|
+
| `before_update` | Before update | `name`, `fields` |
|
|
79
|
+
| `after_update` | After update | `name` |
|
|
80
|
+
| `before_remove` | Before removal (return False to abort) | `name` |
|
|
81
|
+
| `after_remove` | After removal | `name` |
|
|
82
|
+
|
|
83
|
+
### Module mode (plugin CLI)
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
shevam -m stats_widget summary
|
|
87
|
+
shevam -m git_info status my-app
|
|
88
|
+
shevam -m git_info log my-app -n 20
|
|
89
|
+
|
|
90
|
+
# or directly as sub-commands:
|
|
91
|
+
shevam stats_widget summary
|
|
92
|
+
shevam git_info status all
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Plugin management
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
shevam plugin list
|
|
99
|
+
shevam plugin install /path/to/my_plugin/
|
|
100
|
+
shevam plugin disable git_info
|
|
101
|
+
shevam plugin enable git_info
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Writing a plugin
|
|
105
|
+
|
|
106
|
+
Create `~/.shevam/plugins/my_plugin/plugin.py`:
|
|
107
|
+
|
|
108
|
+
```python
|
|
109
|
+
from shevam.plugin_engine import ShevamPlugin
|
|
110
|
+
import typer
|
|
111
|
+
|
|
112
|
+
cli = typer.Typer()
|
|
113
|
+
|
|
114
|
+
@cli.command("hello")
|
|
115
|
+
def hello():
|
|
116
|
+
print("Hello from my_plugin!")
|
|
117
|
+
|
|
118
|
+
class MyPlugin(ShevamPlugin):
|
|
119
|
+
plugin_id = "my_plugin"
|
|
120
|
+
plugin_name = "My Plugin"
|
|
121
|
+
version = "0.1.0"
|
|
122
|
+
description = "Example user plugin"
|
|
123
|
+
|
|
124
|
+
def load(self):
|
|
125
|
+
# Add dashboard widget
|
|
126
|
+
from textual.widgets import Static
|
|
127
|
+
self.add_dashboard_widget(
|
|
128
|
+
label="MY WIDGET",
|
|
129
|
+
factory=lambda: Static("Hello from plugin!"),
|
|
130
|
+
position="bottom",
|
|
131
|
+
)
|
|
132
|
+
# Add CLI
|
|
133
|
+
self.add_cli_app(cli)
|
|
134
|
+
# Add hook
|
|
135
|
+
self.add_hook("after_add", lambda ctx: print(f"Added: {ctx['name']}"))
|
|
136
|
+
# Patch CSS
|
|
137
|
+
self.add_css("/* custom styles */")
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Then: `shevam plugin install ~/.shevam/plugins/my_plugin/`
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## TUI key bindings
|
|
145
|
+
|
|
146
|
+
| Key | Action |
|
|
147
|
+
|-----|--------|
|
|
148
|
+
| `1` | Dashboard |
|
|
149
|
+
| `2` | Projects list |
|
|
150
|
+
| `3` | Git view (git_info plugin) |
|
|
151
|
+
| `9` | Plugin registry |
|
|
152
|
+
| `a` | Add project |
|
|
153
|
+
| `e` | Edit selected |
|
|
154
|
+
| `d` | Delete selected |
|
|
155
|
+
| `r` | Refresh |
|
|
156
|
+
| `q` | Quit |
|
shevam-0.1.0/README.md
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# Shevam ◈ v0.2.0
|
|
2
|
+
|
|
3
|
+
**Shevam** is a modular project & tools manager with a full **plugin system**.
|
|
4
|
+
Built with [Typer](https://typer.tiangolo.com/) + [Textual](https://textual.textualize.io/).
|
|
5
|
+
Pure-Python JSON storage — zero external DB required.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pip install -e . # Python 3.10+
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Core workflow
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
shevam init [dir] # writes project.json into dir (npm init style)
|
|
21
|
+
shevam add [dir] # reads project.json → registers in ~/.shevam/db.json
|
|
22
|
+
shevam list # table of all projects
|
|
23
|
+
shevam show <n> # full detail panel
|
|
24
|
+
shevam update <n> # update fields + rewrite project.json
|
|
25
|
+
shevam remove <n> # remove from DB
|
|
26
|
+
shevam recent # recently accessed
|
|
27
|
+
shevam ui # full Textual TUI
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Plugin system
|
|
33
|
+
|
|
34
|
+
### Storage
|
|
35
|
+
```
|
|
36
|
+
~/.shevam/
|
|
37
|
+
db.json registered projects
|
|
38
|
+
recent.json access history
|
|
39
|
+
plugins.json enabled/disabled state
|
|
40
|
+
plugins/
|
|
41
|
+
<name>/
|
|
42
|
+
plugin.py user-installed plugins
|
|
43
|
+
shevam/plugins_builtin/
|
|
44
|
+
stats_widget/ built-in: type breakdown widget + CLI
|
|
45
|
+
git_info/ built-in: git status TUI view + CLI
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### What plugins can do
|
|
49
|
+
|
|
50
|
+
| Capability | How |
|
|
51
|
+
|---|---|
|
|
52
|
+
| **Dashboard widget** | `self.add_dashboard_widget(label, factory, position)` |
|
|
53
|
+
| **New TUI view** | `self.add_tui_view(view_id, label, factory, nav_key)` |
|
|
54
|
+
| **Theme / CSS patch** | `self.add_css(css_string)` or full replace via `theme_registry.replace()` |
|
|
55
|
+
| **CLI sub-app** | `self.add_cli_app(typer_app)` → `shevam <plugin_id> <cmd>` |
|
|
56
|
+
| **CLI top-level cmd** | `self.add_cli_command(fn)` |
|
|
57
|
+
| **Hooks** | `self.add_hook("before_add", fn)` etc. |
|
|
58
|
+
|
|
59
|
+
### Available hooks
|
|
60
|
+
|
|
61
|
+
| Hook | When fired | Context keys |
|
|
62
|
+
|---|---|---|
|
|
63
|
+
| `before_init` | Before project.json is written | `name`, `path` |
|
|
64
|
+
| `after_init` | After project.json written | `name`, `path` |
|
|
65
|
+
| `before_add` | Before registering in DB | all project fields |
|
|
66
|
+
| `after_add` | After registering in DB | `name`, `path`, `project_type` |
|
|
67
|
+
| `before_update` | Before update | `name`, `fields` |
|
|
68
|
+
| `after_update` | After update | `name` |
|
|
69
|
+
| `before_remove` | Before removal (return False to abort) | `name` |
|
|
70
|
+
| `after_remove` | After removal | `name` |
|
|
71
|
+
|
|
72
|
+
### Module mode (plugin CLI)
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
shevam -m stats_widget summary
|
|
76
|
+
shevam -m git_info status my-app
|
|
77
|
+
shevam -m git_info log my-app -n 20
|
|
78
|
+
|
|
79
|
+
# or directly as sub-commands:
|
|
80
|
+
shevam stats_widget summary
|
|
81
|
+
shevam git_info status all
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Plugin management
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
shevam plugin list
|
|
88
|
+
shevam plugin install /path/to/my_plugin/
|
|
89
|
+
shevam plugin disable git_info
|
|
90
|
+
shevam plugin enable git_info
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Writing a plugin
|
|
94
|
+
|
|
95
|
+
Create `~/.shevam/plugins/my_plugin/plugin.py`:
|
|
96
|
+
|
|
97
|
+
```python
|
|
98
|
+
from shevam.plugin_engine import ShevamPlugin
|
|
99
|
+
import typer
|
|
100
|
+
|
|
101
|
+
cli = typer.Typer()
|
|
102
|
+
|
|
103
|
+
@cli.command("hello")
|
|
104
|
+
def hello():
|
|
105
|
+
print("Hello from my_plugin!")
|
|
106
|
+
|
|
107
|
+
class MyPlugin(ShevamPlugin):
|
|
108
|
+
plugin_id = "my_plugin"
|
|
109
|
+
plugin_name = "My Plugin"
|
|
110
|
+
version = "0.1.0"
|
|
111
|
+
description = "Example user plugin"
|
|
112
|
+
|
|
113
|
+
def load(self):
|
|
114
|
+
# Add dashboard widget
|
|
115
|
+
from textual.widgets import Static
|
|
116
|
+
self.add_dashboard_widget(
|
|
117
|
+
label="MY WIDGET",
|
|
118
|
+
factory=lambda: Static("Hello from plugin!"),
|
|
119
|
+
position="bottom",
|
|
120
|
+
)
|
|
121
|
+
# Add CLI
|
|
122
|
+
self.add_cli_app(cli)
|
|
123
|
+
# Add hook
|
|
124
|
+
self.add_hook("after_add", lambda ctx: print(f"Added: {ctx['name']}"))
|
|
125
|
+
# Patch CSS
|
|
126
|
+
self.add_css("/* custom styles */")
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Then: `shevam plugin install ~/.shevam/plugins/my_plugin/`
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## TUI key bindings
|
|
134
|
+
|
|
135
|
+
| Key | Action |
|
|
136
|
+
|-----|--------|
|
|
137
|
+
| `1` | Dashboard |
|
|
138
|
+
| `2` | Projects list |
|
|
139
|
+
| `3` | Git view (git_info plugin) |
|
|
140
|
+
| `9` | Plugin registry |
|
|
141
|
+
| `a` | Add project |
|
|
142
|
+
| `e` | Edit selected |
|
|
143
|
+
| `d` | Delete selected |
|
|
144
|
+
| `r` | Refresh |
|
|
145
|
+
| `q` | Quit |
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "shevam",
|
|
3
|
+
"description": "shevam project manager",
|
|
4
|
+
"path": "E:\\D2L SHEVAM DRIVE\\shevam_drive\\Shevam_Current_Working\\Python\\NOT COMPLETED\\shevam\\shevam",
|
|
5
|
+
"project_type": "service",
|
|
6
|
+
"status": "active",
|
|
7
|
+
"tags": [
|
|
8
|
+
"shevam",
|
|
9
|
+
"tool",
|
|
10
|
+
"ppm",
|
|
11
|
+
"project manager",
|
|
12
|
+
"package manager",
|
|
13
|
+
"dashboard"
|
|
14
|
+
],
|
|
15
|
+
"language": "python",
|
|
16
|
+
"version": "0.1.0",
|
|
17
|
+
"author": "ShevamV",
|
|
18
|
+
"repo_url": "",
|
|
19
|
+
"notes": "shevam project manager",
|
|
20
|
+
"scripts": {},
|
|
21
|
+
"toolstack": [
|
|
22
|
+
"sql",
|
|
23
|
+
"textual",
|
|
24
|
+
"python",
|
|
25
|
+
"git"
|
|
26
|
+
],
|
|
27
|
+
"created_at": "",
|
|
28
|
+
"updated_at": "2026-03-22T00:18:59"
|
|
29
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "shevam"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "A project & tools management CLI built with Typer and Textual"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
dependencies = [
|
|
12
|
+
"typer[all]>=0.12.0",
|
|
13
|
+
"textual>=0.60.0",
|
|
14
|
+
"rich>=13.0.0",
|
|
15
|
+
"gitpython>=3.1.0",
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
[project.scripts]
|
|
19
|
+
shevam = "shevam.cli:main"
|
|
20
|
+
|
|
21
|
+
[tool.hatch.build.targets.wheel]
|
|
22
|
+
packages = ["shevam"]
|