Skip to main content

A project & tools management CLI built with Typer and Textual

Project description

Shevam ◈ v0.2.0

Shevam is a modular project & tools manager with a full plugin system. Built with Typer + Textual.
Pure-Python JSON storage — zero external DB required.


Install

pip install -e .   # Python 3.10+

Core workflow

shevam init [dir]    # writes project.json into dir (npm init style)
shevam add  [dir]    # reads project.json → registers in ~/.shevam/db.json
shevam list          # table of all projects
shevam show <n>      # full detail panel
shevam update <n>    # update fields + rewrite project.json
shevam remove <n>    # remove from DB
shevam recent        # recently accessed
shevam ui            # full Textual TUI

Plugin system

Storage

~/.shevam/
  db.json          registered projects
  recent.json      access history
  plugins.json     enabled/disabled state
  plugins/
    <name>/
      plugin.py    user-installed plugins
shevam/plugins_builtin/
  stats_widget/    built-in: type breakdown widget + CLI
  git_info/        built-in: git status TUI view + CLI

What plugins can do

Capability How
Dashboard widget self.add_dashboard_widget(label, factory, position)
New TUI view self.add_tui_view(view_id, label, factory, nav_key)
Theme / CSS patch self.add_css(css_string) or full replace via theme_registry.replace()
CLI sub-app self.add_cli_app(typer_app)shevam <plugin_id> <cmd>
CLI top-level cmd self.add_cli_command(fn)
Hooks self.add_hook("before_add", fn) etc.

Available hooks

Hook When fired Context keys
before_init Before project.json is written name, path
after_init After project.json written name, path
before_add Before registering in DB all project fields
after_add After registering in DB name, path, project_type
before_update Before update name, fields
after_update After update name
before_remove Before removal (return False to abort) name
after_remove After removal name

Module mode (plugin CLI)

shevam -m stats_widget summary
shevam -m git_info status my-app
shevam -m git_info log my-app -n 20

# or directly as sub-commands:
shevam stats_widget summary
shevam git_info status all

Plugin management

shevam plugin list
shevam plugin install /path/to/my_plugin/
shevam plugin disable git_info
shevam plugin enable  git_info

Writing a plugin

Create ~/.shevam/plugins/my_plugin/plugin.py:

from shevam.plugin_engine import ShevamPlugin
import typer

cli = typer.Typer()

@cli.command("hello")
def hello():
    print("Hello from my_plugin!")

class MyPlugin(ShevamPlugin):
    plugin_id   = "my_plugin"
    plugin_name = "My Plugin"
    version     = "0.1.0"
    description = "Example user plugin"

    def load(self):
        # Add dashboard widget
        from textual.widgets import Static
        self.add_dashboard_widget(
            label="MY WIDGET",
            factory=lambda: Static("Hello from plugin!"),
            position="bottom",
        )
        # Add CLI
        self.add_cli_app(cli)
        # Add hook
        self.add_hook("after_add", lambda ctx: print(f"Added: {ctx['name']}"))
        # Patch CSS
        self.add_css("/* custom styles */")

Then: shevam plugin install ~/.shevam/plugins/my_plugin/


TUI key bindings

Key Action
1 Dashboard
2 Projects list
3 Git view (git_info plugin)
9 Plugin registry
a Add project
e Edit selected
d Delete selected
r Refresh
q Quit

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shevam-0.1.0.tar.gz (61.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shevam-0.1.0-py3-none-any.whl (69.8 kB view details)

Uploaded Python 3

File details

Details for the file shevam-0.1.0.tar.gz.

File metadata

  • Download URL: shevam-0.1.0.tar.gz
  • Upload date:
  • Size: 61.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for shevam-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1b4caa2dcb86a95b40de90b10e1f93e604e3e4679b32dbd559374d1e65cf788f
MD5 86716bc8d4d9b2656d513752bff8e6cf
BLAKE2b-256 0d4752ae8a0a2415a86d5f267ca67fa9dcdffb61d03ccb1fa4aff34ad3679c02

See more details on using hashes here.

File details

Details for the file shevam-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: shevam-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 69.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for shevam-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d22b515c5a627c5ae30201f9a52ae67b53360af25321e7e1f77763dabb0f903
MD5 2eff3b3b425cb0d9ebf0a93306856b2f
BLAKE2b-256 7cda2990ab2237a45dd1393a118214fd56276205d517703f63102717e46f849e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page