myteam 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.
- myteam-0.1.0/LICENSE +21 -0
- myteam-0.1.0/PKG-INFO +86 -0
- myteam-0.1.0/README.md +57 -0
- myteam-0.1.0/pyproject.toml +16 -0
- myteam-0.1.0/src/myteam/__init__.py +4 -0
- myteam-0.1.0/src/myteam/__main__.py +7 -0
- myteam-0.1.0/src/myteam/cli.py +147 -0
myteam-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Bean Lab
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
myteam-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: myteam
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Agent roster CLI
|
|
5
|
+
Author: Unknown
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2026 Bean Lab
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
Requires-Python: >=3.11
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
|
|
30
|
+
# Myteam
|
|
31
|
+
|
|
32
|
+
Simple CLI for managing an on-disk roster of agent roles. Myteam creates a lightweight structure (`AGENTS.md` plus a `.agents/` directory) that other tools can read to understand available roles and their instructions.
|
|
33
|
+
|
|
34
|
+
## Features
|
|
35
|
+
- Zero-dependency CLI (Python 3.11+)
|
|
36
|
+
- Commands to create, remove, and inspect roles
|
|
37
|
+
- Works from any directory (operates relative to the current working directory)
|
|
38
|
+
|
|
39
|
+
## Requirements
|
|
40
|
+
- Python 3.11 or newer
|
|
41
|
+
|
|
42
|
+
## Installation
|
|
43
|
+
```bash
|
|
44
|
+
pip install myteam
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Quick start
|
|
48
|
+
1) `myteam init` — set up `AGENTS.md` and `.agents/` with a default `developer` role.
|
|
49
|
+
2) `myteam new main` — add your primary role (defaults to `main` when omitted in `whoami`).
|
|
50
|
+
3) Edit `.agents/<role>/info.md` and `.agents/<role>/instructions.md` with details for each role.
|
|
51
|
+
4) `myteam whoami <role>` — print the instructions for that role (or `main` if omitted).
|
|
52
|
+
|
|
53
|
+
## Commands
|
|
54
|
+
| Command | Purpose |
|
|
55
|
+
| --- | --- |
|
|
56
|
+
| `myteam init` | Initialize `AGENTS.md` and `.agents/` with the default `developer` role. |
|
|
57
|
+
| `myteam new <role>` | Create a new role directory with empty `info.md` and `instructions.md`. |
|
|
58
|
+
| `myteam remove <role>` | Delete the specified role directory and its contents. |
|
|
59
|
+
| `myteam whoami [role]` | Print the `instructions.md` for a role (defaults to `main`). |
|
|
60
|
+
|
|
61
|
+
## What gets created
|
|
62
|
+
Running `myteam init` produces:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
AGENTS.md # Onboarding note for agents
|
|
66
|
+
.agents/
|
|
67
|
+
└── developer/
|
|
68
|
+
├── info.md # Free-form metadata about the role
|
|
69
|
+
└── instructions.md # The instructions printed by `myteam whoami developer`
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Notes and behavior
|
|
73
|
+
- Commands act on the current working directory; run them from the root of the project that owns the roster.
|
|
74
|
+
- If a role directory contains `agent.py`, myteam will currently **not execute it**; the CLI only reports that the file exists.
|
|
75
|
+
- `whoami` defaults to the `main` role if no role name is provided.
|
|
76
|
+
|
|
77
|
+
## Typical workflow
|
|
78
|
+
```bash
|
|
79
|
+
myteam init
|
|
80
|
+
myteam new main
|
|
81
|
+
echo "Your role instructions here" > .agents/main/instructions.md
|
|
82
|
+
myteam whoami main # Run by agent working in project
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## License
|
|
86
|
+
MIT
|
myteam-0.1.0/README.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Myteam
|
|
2
|
+
|
|
3
|
+
Simple CLI for managing an on-disk roster of agent roles. Myteam creates a lightweight structure (`AGENTS.md` plus a `.agents/` directory) that other tools can read to understand available roles and their instructions.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
- Zero-dependency CLI (Python 3.11+)
|
|
7
|
+
- Commands to create, remove, and inspect roles
|
|
8
|
+
- Works from any directory (operates relative to the current working directory)
|
|
9
|
+
|
|
10
|
+
## Requirements
|
|
11
|
+
- Python 3.11 or newer
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
```bash
|
|
15
|
+
pip install myteam
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Quick start
|
|
19
|
+
1) `myteam init` — set up `AGENTS.md` and `.agents/` with a default `developer` role.
|
|
20
|
+
2) `myteam new main` — add your primary role (defaults to `main` when omitted in `whoami`).
|
|
21
|
+
3) Edit `.agents/<role>/info.md` and `.agents/<role>/instructions.md` with details for each role.
|
|
22
|
+
4) `myteam whoami <role>` — print the instructions for that role (or `main` if omitted).
|
|
23
|
+
|
|
24
|
+
## Commands
|
|
25
|
+
| Command | Purpose |
|
|
26
|
+
| --- | --- |
|
|
27
|
+
| `myteam init` | Initialize `AGENTS.md` and `.agents/` with the default `developer` role. |
|
|
28
|
+
| `myteam new <role>` | Create a new role directory with empty `info.md` and `instructions.md`. |
|
|
29
|
+
| `myteam remove <role>` | Delete the specified role directory and its contents. |
|
|
30
|
+
| `myteam whoami [role]` | Print the `instructions.md` for a role (defaults to `main`). |
|
|
31
|
+
|
|
32
|
+
## What gets created
|
|
33
|
+
Running `myteam init` produces:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
AGENTS.md # Onboarding note for agents
|
|
37
|
+
.agents/
|
|
38
|
+
└── developer/
|
|
39
|
+
├── info.md # Free-form metadata about the role
|
|
40
|
+
└── instructions.md # The instructions printed by `myteam whoami developer`
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Notes and behavior
|
|
44
|
+
- Commands act on the current working directory; run them from the root of the project that owns the roster.
|
|
45
|
+
- If a role directory contains `agent.py`, myteam will currently **not execute it**; the CLI only reports that the file exists.
|
|
46
|
+
- `whoami` defaults to the `main` role if no role name is provided.
|
|
47
|
+
|
|
48
|
+
## Typical workflow
|
|
49
|
+
```bash
|
|
50
|
+
myteam init
|
|
51
|
+
myteam new main
|
|
52
|
+
echo "Your role instructions here" > .agents/main/instructions.md
|
|
53
|
+
myteam whoami main # Run by agent working in project
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## License
|
|
57
|
+
MIT
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["uv-build>=0.2"]
|
|
3
|
+
build-backend = "uv_build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "myteam"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Agent roster CLI"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
dependencies = []
|
|
12
|
+
authors = [{ name = "Unknown" }]
|
|
13
|
+
license = { file = "LICENSE" }
|
|
14
|
+
|
|
15
|
+
[project.scripts]
|
|
16
|
+
myteam = "myteam.cli:main"
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"""Command-line interface for the myteam package."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import sys
|
|
5
|
+
import argparse
|
|
6
|
+
import shutil
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
|
|
9
|
+
from . import __version__
|
|
10
|
+
|
|
11
|
+
APP_NAME = "myteam"
|
|
12
|
+
DEFAULT_ROLE = "main"
|
|
13
|
+
AGENTS_DIRNAME = ".agents"
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def _agents_root(base: Path) -> Path:
|
|
17
|
+
return base / AGENTS_DIRNAME
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def _role_dir(base: Path, role: str) -> Path:
|
|
21
|
+
return _agents_root(base) / role
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _ensure_dir(path: Path) -> None:
|
|
25
|
+
path.mkdir(parents=True, exist_ok=True)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def cmd_init(base: Path) -> int:
|
|
29
|
+
"""Initialize the myteam directory with default developer role."""
|
|
30
|
+
agents_dir = _agents_root(base)
|
|
31
|
+
_ensure_dir(agents_dir)
|
|
32
|
+
|
|
33
|
+
# Create AGENTS.md with onboarding instructions.
|
|
34
|
+
agents_md = base / "AGENTS.md"
|
|
35
|
+
if not agents_md.exists():
|
|
36
|
+
agents_md.write_text(
|
|
37
|
+
"Run `myteam whoami <role>` with your role. If you have no role, assume your role is `main`.\n",
|
|
38
|
+
encoding="utf-8",
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
# Create default developer role.
|
|
42
|
+
developer_dir = _role_dir(base, "developer")
|
|
43
|
+
_ensure_dir(developer_dir)
|
|
44
|
+
|
|
45
|
+
(developer_dir / "info.md").touch(exist_ok=True)
|
|
46
|
+
instructions = developer_dir / "instructions.md"
|
|
47
|
+
if not instructions.exists():
|
|
48
|
+
instructions.write_text("Provide developer-specific instructions here.\n", encoding="utf-8")
|
|
49
|
+
|
|
50
|
+
return 0
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def cmd_new(base: Path, role: str) -> int:
|
|
54
|
+
"""Create a new role directory with placeholder files."""
|
|
55
|
+
role_dir = _role_dir(base, role)
|
|
56
|
+
if role_dir.exists():
|
|
57
|
+
print(f"Role '{role}' already exists at {role_dir}", file=sys.stderr)
|
|
58
|
+
return 1
|
|
59
|
+
|
|
60
|
+
_ensure_dir(role_dir)
|
|
61
|
+
(role_dir / "info.md").write_text("", encoding="utf-8")
|
|
62
|
+
(role_dir / "instructions.md").write_text("", encoding="utf-8")
|
|
63
|
+
return 0
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def cmd_remove(base: Path, role: str) -> int:
|
|
67
|
+
"""Delete the directory for a role if it exists."""
|
|
68
|
+
role_dir = _role_dir(base, role)
|
|
69
|
+
if not role_dir.exists():
|
|
70
|
+
print(f"Role '{role}' not found at {role_dir}", file=sys.stderr)
|
|
71
|
+
return 1
|
|
72
|
+
|
|
73
|
+
if not role_dir.is_dir():
|
|
74
|
+
print(f"Path for role '{role}' is not a directory: {role_dir}", file=sys.stderr)
|
|
75
|
+
return 1
|
|
76
|
+
|
|
77
|
+
try:
|
|
78
|
+
shutil.rmtree(role_dir)
|
|
79
|
+
except OSError as exc:
|
|
80
|
+
print(f"Failed to remove role '{role}': {exc}", file=sys.stderr)
|
|
81
|
+
return 1
|
|
82
|
+
|
|
83
|
+
return 0
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def cmd_whoami(base: Path, role: str) -> int:
|
|
87
|
+
"""Print the instructions for the given role if available."""
|
|
88
|
+
role_dir = _role_dir(base, role)
|
|
89
|
+
if not role_dir.exists():
|
|
90
|
+
print(f"Role '{role}' not found. Run 'myteam new {role}' to create it.", file=sys.stderr)
|
|
91
|
+
return 1
|
|
92
|
+
|
|
93
|
+
agent_py = role_dir / "agent.py"
|
|
94
|
+
if agent_py.exists():
|
|
95
|
+
# For now, we simply notify; executing arbitrary code is avoided.
|
|
96
|
+
print(f"agent.py found at {agent_py}; execution not implemented.")
|
|
97
|
+
return 0
|
|
98
|
+
|
|
99
|
+
instructions = role_dir / "instructions.md"
|
|
100
|
+
if instructions.exists():
|
|
101
|
+
print(instructions.read_text(encoding="utf-8"))
|
|
102
|
+
return 0
|
|
103
|
+
|
|
104
|
+
print(f"No instructions found for role '{role}'.", file=sys.stderr)
|
|
105
|
+
return 1
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def build_parser() -> argparse.ArgumentParser:
|
|
109
|
+
parser = argparse.ArgumentParser(prog=APP_NAME, description="Manage agent roster roles.")
|
|
110
|
+
parser.add_argument("--version", action="version", version=f"%(prog)s {__version__}")
|
|
111
|
+
sub = parser.add_subparsers(dest="command", required=True)
|
|
112
|
+
|
|
113
|
+
sub.add_parser("init", help="Initialize roster with default files.")
|
|
114
|
+
|
|
115
|
+
new_parser = sub.add_parser("new", help="Create a new role.")
|
|
116
|
+
new_parser.add_argument("role", help="Role name to create.")
|
|
117
|
+
|
|
118
|
+
remove_parser = sub.add_parser("remove", help="Delete an existing role.")
|
|
119
|
+
remove_parser.add_argument("role", help="Role name to delete.")
|
|
120
|
+
|
|
121
|
+
who_parser = sub.add_parser("whoami", help="Print instructions for a role.")
|
|
122
|
+
who_parser.add_argument("role", nargs="?", default=DEFAULT_ROLE, help="Role name (default: main).")
|
|
123
|
+
|
|
124
|
+
return parser
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
def main(argv: list[str] | None = None) -> int:
|
|
128
|
+
argv = sys.argv[1:] if argv is None else argv
|
|
129
|
+
base = Path.cwd()
|
|
130
|
+
parser = build_parser()
|
|
131
|
+
args = parser.parse_args(argv)
|
|
132
|
+
|
|
133
|
+
if args.command == "init":
|
|
134
|
+
return cmd_init(base)
|
|
135
|
+
if args.command == "new":
|
|
136
|
+
return cmd_new(base, args.role)
|
|
137
|
+
if args.command == "remove":
|
|
138
|
+
return cmd_remove(base, args.role)
|
|
139
|
+
if args.command == "whoami":
|
|
140
|
+
return cmd_whoami(base, args.role)
|
|
141
|
+
|
|
142
|
+
parser.error("Unknown command")
|
|
143
|
+
return 1
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
if __name__ == "__main__":
|
|
147
|
+
sys.exit(main())
|