augint-tools 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.
@@ -0,0 +1,212 @@
1
+ Metadata-Version: 2.3
2
+ Name: augint-tools
3
+ Version: 0.1.0
4
+ Summary: CLI for AI-assisted repository and workspace workflows
5
+ Author: svange
6
+ Requires-Dist: click>=8.1.0
7
+ Requires-Dist: rich>=14.0
8
+ Requires-Dist: python-dotenv>=1.0.0
9
+ Requires-Dist: tomli-w>=1.2.0
10
+ Requires-Dist: pytest>=7.4.0 ; extra == 'dev'
11
+ Requires-Dist: pytest-cov>=4.1.0 ; extra == 'dev'
12
+ Requires-Dist: ruff>=0.8.0 ; extra == 'dev'
13
+ Requires-Dist: mypy>=1.8.0 ; extra == 'dev'
14
+ Requires-Dist: python-semantic-release>=10.3.1 ; extra == 'dev'
15
+ Requires-Dist: pre-commit>=4.0.0 ; extra == 'dev'
16
+ Requires-Dist: bandit>=1.7.0 ; extra == 'dev'
17
+ Requires-Dist: pip-audit>=2.7.0 ; extra == 'dev'
18
+ Requires-Dist: pip-licenses>=5.0.0 ; extra == 'dev'
19
+ Requires-Dist: pytest-html>=4.0.0 ; extra == 'dev'
20
+ Requires-Dist: pdoc>=15.0.0 ; extra == 'dev'
21
+ Requires-Python: >=3.12
22
+ Provides-Extra: dev
23
+ Description-Content-Type: text/markdown
24
+
25
+ # augint-tools
26
+
27
+ [![Python 3.12+](https://img.shields.io/badge/python-3.12+-blue.svg)](https://www.python.org/downloads/)
28
+ [![PyPI](https://img.shields.io/pypi/v/augint-tools.svg)](https://pypi.org/project/augint-tools/)
29
+ [![Tests](https://github.com/svange/augint-tools/actions/workflows/pipeline.yaml/badge.svg)](https://github.com/svange/augint-tools/actions)
30
+
31
+ CLI orchestration layer for AI-assisted repository and workspace workflows.
32
+
33
+ `augint-tools` provides a stable, machine-parseable command surface for humans and AI agents to coordinate development workflows across single repositories and multi-repo workspaces. It is designed to be called directly by AI skills, replacing ad-hoc shell scripts with reliable, JSON-enabled commands.
34
+
35
+ ## Features
36
+
37
+ - **Dual-mode operation**: Commands for both single repos (`ai-tools repo`) and monorepos/workspaces (`ai-tools monorepo`)
38
+ - **AI-first design**: Every command supports `--json` output for agent parsing
39
+ - **Repo-type aware**: Understands library, service, and workspace repository patterns
40
+ - **Safe defaults**: No destructive git operations without explicit commands
41
+ - **GitHub integration**: Issue management, PR creation, CI status monitoring
42
+
43
+ ## Installation
44
+
45
+ ```bash
46
+ pip install augint-tools
47
+ ```
48
+
49
+ Or with `uv`:
50
+
51
+ ```bash
52
+ uv tool install augint-tools
53
+ ```
54
+
55
+ ## Quick Start
56
+
57
+ ### Single Repository Workflows
58
+
59
+ ```bash
60
+ # Initialize repo metadata
61
+ ai-tools init --library
62
+
63
+ # Check repository status
64
+ ai-tools repo status --json
65
+
66
+ # List issues
67
+ ai-tools repo issues "bug"
68
+
69
+ # Create feature branch
70
+ ai-tools repo branch feat/issue-42-example
71
+
72
+ # Run tests and linting
73
+ ai-tools repo test
74
+ ai-tools repo lint --fix
75
+
76
+ # Submit work (push + create PR)
77
+ ai-tools repo submit
78
+ ```
79
+
80
+ ### Monorepo/Workspace Workflows
81
+
82
+ ```bash
83
+ # Initialize workspace
84
+ ai-tools init --workspace
85
+
86
+ # Sync all child repositories
87
+ ai-tools monorepo sync --json
88
+
89
+ # Check status across all repos
90
+ ai-tools mono status
91
+
92
+ # Create coordinated branches
93
+ ai-tools mono branch feat/multi-repo-change
94
+
95
+ # Run tests across all repos
96
+ ai-tools mono test
97
+
98
+ # Run command in all repos
99
+ ai-tools mono foreach -- git status
100
+
101
+ # Submit PRs for all modified repos
102
+ ai-tools mono submit
103
+ ```
104
+
105
+ ## Command Reference
106
+
107
+ ### Top-Level Commands
108
+
109
+ - `ai-tools init [--library|--service|--workspace]` - Initialize repository metadata
110
+
111
+ ### Repository Commands (`ai-tools repo`)
112
+
113
+ - `status` - Show repository status (branch, dirty state, PRs, CI)
114
+ - `issues [query]` - List and filter issues
115
+ - `branch <name>` - Create or switch branches using repo defaults
116
+ - `test` - Run configured test commands
117
+ - `lint [--fix]` - Run quality checks
118
+ - `submit` - Push branch and create PR
119
+
120
+ ### Monorepo Commands (`ai-tools monorepo` or `ai-tools mono`)
121
+
122
+ - `status` - Status across all child repositories
123
+ - `sync` - Clone missing repos and update existing
124
+ - `issues [query]` - Aggregate issues from all repos
125
+ - `branch <name>` - Create coordinated branches
126
+ - `test` - Run tests in dependency order
127
+ - `lint [--fix]` - Quality checks across repos
128
+ - `foreach <command>` - Execute command in all repos
129
+ - `submit` - Push and create PRs for modified repos
130
+ - `update` - Propagate upstream changes downstream
131
+
132
+ ## Configuration
133
+
134
+ ### Repository Classification
135
+
136
+ `ai-shell.toml`:
137
+
138
+ ```toml
139
+ [project]
140
+ repo_type = "library" # or "service", "workspace"
141
+ branch_strategy = "main" # or "dev"
142
+ dev_branch = "dev" # when branch_strategy = "dev"
143
+ ```
144
+
145
+ ### Workspace Manifest
146
+
147
+ `workspace.toml` (for workspace repos):
148
+
149
+ ```toml
150
+ [workspace]
151
+ name = "my-workspace"
152
+ repos_dir = "repos"
153
+
154
+ [[repo]]
155
+ name = "my-lib"
156
+ path = "repos/my-lib"
157
+ url = "https://github.com/org/my-lib.git"
158
+ repo_type = "library"
159
+ base_branch = "main"
160
+ pr_target_branch = "main"
161
+ install = "uv sync --all-extras"
162
+ test = "uv run pytest -v"
163
+ lint = "uv run pre-commit run --all-files"
164
+ depends_on = []
165
+ ```
166
+
167
+ ## Development
168
+
169
+ ### Setup
170
+
171
+ ```bash
172
+ uv sync --all-extras
173
+ ```
174
+
175
+ ### Running Tests
176
+
177
+ ```bash
178
+ uv run pytest # Run all tests
179
+ uv run pytest --cov # With coverage
180
+ uv run pytest -k test_name # Specific test
181
+ ```
182
+
183
+ ### Code Quality
184
+
185
+ ```bash
186
+ uv run ruff check src/ tests/ # Lint
187
+ uv run ruff format src/ tests/ # Format
188
+ uv run mypy src/ # Type check
189
+ uv run pre-commit run --all-files # All hooks
190
+ ```
191
+
192
+ ## Design Principles
193
+
194
+ 1. **Human and AI first** - Commands work well for both interactive use and programmatic calls
195
+ 2. **JSON always available** - Every orchestration command supports stable `--json` output
196
+ 3. **Safe defaults** - No destructive behavior without explicit confirmation
197
+ 4. **Repo-type aware** - Different defaults for libraries, services, and workspaces
198
+ 5. **Skills call tools** - AI skills orchestrate this CLI, not replace it with shell scripts
199
+
200
+ ## Architecture
201
+
202
+ See [augint-tools.md](./augint-tools.md) for the complete design specification and implementation guide.
203
+
204
+ ## License
205
+
206
+ MIT License - See LICENSE file for details.
207
+
208
+ ## Status
209
+
210
+ **Current version: 2.0.0**
211
+
212
+ This is a complete rewrite and repurposing of the `augint-tools` package. All commands are currently scaffolded stubs that emit JSON with `implemented: false`. See [augint-tools.md](./augint-tools.md) for the implementation roadmap.
@@ -0,0 +1,188 @@
1
+ # augint-tools
2
+
3
+ [![Python 3.12+](https://img.shields.io/badge/python-3.12+-blue.svg)](https://www.python.org/downloads/)
4
+ [![PyPI](https://img.shields.io/pypi/v/augint-tools.svg)](https://pypi.org/project/augint-tools/)
5
+ [![Tests](https://github.com/svange/augint-tools/actions/workflows/pipeline.yaml/badge.svg)](https://github.com/svange/augint-tools/actions)
6
+
7
+ CLI orchestration layer for AI-assisted repository and workspace workflows.
8
+
9
+ `augint-tools` provides a stable, machine-parseable command surface for humans and AI agents to coordinate development workflows across single repositories and multi-repo workspaces. It is designed to be called directly by AI skills, replacing ad-hoc shell scripts with reliable, JSON-enabled commands.
10
+
11
+ ## Features
12
+
13
+ - **Dual-mode operation**: Commands for both single repos (`ai-tools repo`) and monorepos/workspaces (`ai-tools monorepo`)
14
+ - **AI-first design**: Every command supports `--json` output for agent parsing
15
+ - **Repo-type aware**: Understands library, service, and workspace repository patterns
16
+ - **Safe defaults**: No destructive git operations without explicit commands
17
+ - **GitHub integration**: Issue management, PR creation, CI status monitoring
18
+
19
+ ## Installation
20
+
21
+ ```bash
22
+ pip install augint-tools
23
+ ```
24
+
25
+ Or with `uv`:
26
+
27
+ ```bash
28
+ uv tool install augint-tools
29
+ ```
30
+
31
+ ## Quick Start
32
+
33
+ ### Single Repository Workflows
34
+
35
+ ```bash
36
+ # Initialize repo metadata
37
+ ai-tools init --library
38
+
39
+ # Check repository status
40
+ ai-tools repo status --json
41
+
42
+ # List issues
43
+ ai-tools repo issues "bug"
44
+
45
+ # Create feature branch
46
+ ai-tools repo branch feat/issue-42-example
47
+
48
+ # Run tests and linting
49
+ ai-tools repo test
50
+ ai-tools repo lint --fix
51
+
52
+ # Submit work (push + create PR)
53
+ ai-tools repo submit
54
+ ```
55
+
56
+ ### Monorepo/Workspace Workflows
57
+
58
+ ```bash
59
+ # Initialize workspace
60
+ ai-tools init --workspace
61
+
62
+ # Sync all child repositories
63
+ ai-tools monorepo sync --json
64
+
65
+ # Check status across all repos
66
+ ai-tools mono status
67
+
68
+ # Create coordinated branches
69
+ ai-tools mono branch feat/multi-repo-change
70
+
71
+ # Run tests across all repos
72
+ ai-tools mono test
73
+
74
+ # Run command in all repos
75
+ ai-tools mono foreach -- git status
76
+
77
+ # Submit PRs for all modified repos
78
+ ai-tools mono submit
79
+ ```
80
+
81
+ ## Command Reference
82
+
83
+ ### Top-Level Commands
84
+
85
+ - `ai-tools init [--library|--service|--workspace]` - Initialize repository metadata
86
+
87
+ ### Repository Commands (`ai-tools repo`)
88
+
89
+ - `status` - Show repository status (branch, dirty state, PRs, CI)
90
+ - `issues [query]` - List and filter issues
91
+ - `branch <name>` - Create or switch branches using repo defaults
92
+ - `test` - Run configured test commands
93
+ - `lint [--fix]` - Run quality checks
94
+ - `submit` - Push branch and create PR
95
+
96
+ ### Monorepo Commands (`ai-tools monorepo` or `ai-tools mono`)
97
+
98
+ - `status` - Status across all child repositories
99
+ - `sync` - Clone missing repos and update existing
100
+ - `issues [query]` - Aggregate issues from all repos
101
+ - `branch <name>` - Create coordinated branches
102
+ - `test` - Run tests in dependency order
103
+ - `lint [--fix]` - Quality checks across repos
104
+ - `foreach <command>` - Execute command in all repos
105
+ - `submit` - Push and create PRs for modified repos
106
+ - `update` - Propagate upstream changes downstream
107
+
108
+ ## Configuration
109
+
110
+ ### Repository Classification
111
+
112
+ `ai-shell.toml`:
113
+
114
+ ```toml
115
+ [project]
116
+ repo_type = "library" # or "service", "workspace"
117
+ branch_strategy = "main" # or "dev"
118
+ dev_branch = "dev" # when branch_strategy = "dev"
119
+ ```
120
+
121
+ ### Workspace Manifest
122
+
123
+ `workspace.toml` (for workspace repos):
124
+
125
+ ```toml
126
+ [workspace]
127
+ name = "my-workspace"
128
+ repos_dir = "repos"
129
+
130
+ [[repo]]
131
+ name = "my-lib"
132
+ path = "repos/my-lib"
133
+ url = "https://github.com/org/my-lib.git"
134
+ repo_type = "library"
135
+ base_branch = "main"
136
+ pr_target_branch = "main"
137
+ install = "uv sync --all-extras"
138
+ test = "uv run pytest -v"
139
+ lint = "uv run pre-commit run --all-files"
140
+ depends_on = []
141
+ ```
142
+
143
+ ## Development
144
+
145
+ ### Setup
146
+
147
+ ```bash
148
+ uv sync --all-extras
149
+ ```
150
+
151
+ ### Running Tests
152
+
153
+ ```bash
154
+ uv run pytest # Run all tests
155
+ uv run pytest --cov # With coverage
156
+ uv run pytest -k test_name # Specific test
157
+ ```
158
+
159
+ ### Code Quality
160
+
161
+ ```bash
162
+ uv run ruff check src/ tests/ # Lint
163
+ uv run ruff format src/ tests/ # Format
164
+ uv run mypy src/ # Type check
165
+ uv run pre-commit run --all-files # All hooks
166
+ ```
167
+
168
+ ## Design Principles
169
+
170
+ 1. **Human and AI first** - Commands work well for both interactive use and programmatic calls
171
+ 2. **JSON always available** - Every orchestration command supports stable `--json` output
172
+ 3. **Safe defaults** - No destructive behavior without explicit confirmation
173
+ 4. **Repo-type aware** - Different defaults for libraries, services, and workspaces
174
+ 5. **Skills call tools** - AI skills orchestrate this CLI, not replace it with shell scripts
175
+
176
+ ## Architecture
177
+
178
+ See [augint-tools.md](./augint-tools.md) for the complete design specification and implementation guide.
179
+
180
+ ## License
181
+
182
+ MIT License - See LICENSE file for details.
183
+
184
+ ## Status
185
+
186
+ **Current version: 2.0.0**
187
+
188
+ This is a complete rewrite and repurposing of the `augint-tools` package. All commands are currently scaffolded stubs that emit JSON with `implemented: false`. See [augint-tools.md](./augint-tools.md) for the implementation roadmap.
@@ -0,0 +1,124 @@
1
+ [project]
2
+ name = "augint-tools"
3
+ version = "0.1.0"
4
+ description = "CLI for AI-assisted repository and workspace workflows"
5
+ authors = [{name = "svange"}]
6
+ readme = "README.md"
7
+ requires-python = ">=3.12"
8
+ dependencies = [
9
+ "click>=8.1.0",
10
+ "rich>=14.0",
11
+ "python-dotenv>=1.0.0",
12
+ "tomli-w>=1.2.0",
13
+ ]
14
+
15
+ [project.optional-dependencies]
16
+ dev = [
17
+ "pytest>=7.4.0",
18
+ "pytest-cov>=4.1.0",
19
+ "ruff>=0.8.0",
20
+ "mypy>=1.8.0",
21
+ "python-semantic-release>=10.3.1",
22
+ "pre-commit>=4.0.0",
23
+ "bandit>=1.7.0",
24
+ "pip-audit>=2.7.0",
25
+ "pip-licenses>=5.0.0",
26
+ "pytest-html>=4.0.0",
27
+ "pdoc>=15.0.0",
28
+ ]
29
+
30
+ [project.scripts]
31
+ ai-tools = "augint_tools.cli.__main__:main"
32
+
33
+ [build-system]
34
+ requires = ["uv_build>=0.11,<0.12"]
35
+ build-backend = "uv_build"
36
+
37
+ [tool.uv.build-backend]
38
+ module-name = "augint_tools"
39
+
40
+ [tool.ruff]
41
+ line-length = 100
42
+ target-version = "py312"
43
+
44
+ [tool.ruff.lint]
45
+ select = ["E", "F", "I", "W", "B", "C4", "UP", "DTZ"]
46
+ ignore = ["E501"]
47
+
48
+ [tool.ruff.lint.isort]
49
+ known-first-party = ["augint_tools"]
50
+
51
+ [tool.mypy]
52
+ python_version = "3.12"
53
+ warn_return_any = true
54
+ warn_unused_configs = true
55
+ disallow_untyped_defs = true
56
+
57
+ [[tool.mypy.overrides]]
58
+ module = "augint_tools.cli.commands.*"
59
+ disallow_untyped_defs = false
60
+
61
+ [[tool.mypy.overrides]]
62
+ module = "augint_tools.cli.__main__"
63
+ disallow_untyped_defs = false
64
+
65
+ [tool.pytest.ini_options]
66
+ testpaths = ["tests"]
67
+ python_files = ["test_*.py"]
68
+ addopts = "-ra -q --strict-markers"
69
+
70
+ [tool.coverage.run]
71
+ source = ["src"]
72
+ omit = ["*/tests/*", "*/test_*.py", "*/cli/*"]
73
+
74
+ [tool.semantic_release]
75
+ assets = ["uv.lock"]
76
+ commit_message = "chore(release): augint-tools {version}\n\nAutomatically generated by python-semantic-release [skip ci]"
77
+ commit_parser = "conventional"
78
+ logging_use_named_masks = false
79
+ major_on_zero = true
80
+ allow_zero_version = true
81
+ no_git_verify = false
82
+ tag_format = "augint-tools-v{version}"
83
+ version_toml = ["pyproject.toml:project.version"]
84
+ version_variables = ["src/augint_tools/__init__.py:__version__"]
85
+ build_command = "uv lock && uv build"
86
+
87
+ [tool.semantic_release.commit_parser_options]
88
+ patch_tags = ["fix", "perf", "chore", "refactor"]
89
+
90
+ [tool.semantic_release.branches.main]
91
+ match = "main"
92
+ prerelease = false
93
+ prerelease_token = "rc"
94
+
95
+ [tool.semantic_release.changelog]
96
+ mode = "update"
97
+ exclude_commit_patterns = [
98
+ '''ci(?:\([^)]*?\))?: .+''',
99
+ '''style(?:\([^)]*?\))?: .+''',
100
+ '''test(?:\([^)]*?\))?: .+''',
101
+ '''build\((?!deps\): .+)''',
102
+ ]
103
+
104
+ [tool.semantic_release.changelog.default_templates]
105
+ changelog_file = "CHANGELOG.md"
106
+
107
+ [tool.semantic_release.remote]
108
+ name = "origin"
109
+ type = "github"
110
+ ignore_token_for_push = false
111
+ insecure = false
112
+
113
+ [tool.semantic_release.remote.token]
114
+ env = "GH_TOKEN"
115
+
116
+ [tool.semantic_release.publish]
117
+ dist_glob_patterns = ["dist/*"]
118
+ upload_to_vcs_release = false
119
+
120
+ [dependency-groups]
121
+ dev = [
122
+ "augint-github>=1.6.0",
123
+ "augint-shell>=0.36.0",
124
+ ]
@@ -0,0 +1,3 @@
1
+ """augint-tools package."""
2
+
3
+ __version__ = "0.1.0"
@@ -0,0 +1 @@
1
+ """CLI package for augint-tools."""
@@ -0,0 +1,46 @@
1
+ """augint-tools CLI entry point."""
2
+
3
+ import logging
4
+ import sys
5
+
6
+ import click
7
+
8
+ from augint_tools import __version__
9
+ from augint_tools.cli.commands.monorepo import monorepo
10
+ from augint_tools.cli.commands.project import init
11
+ from augint_tools.cli.commands.repo import repo
12
+
13
+
14
+ @click.group()
15
+ @click.version_option(version=__version__, prog_name="ai-tools")
16
+ @click.option("--verbose", "-v", is_flag=True, default=False, help="Enable debug logging.")
17
+ @click.pass_context
18
+ def cli(ctx, verbose):
19
+ """CLI for AI-assisted repository and workspace workflows."""
20
+ ctx.ensure_object(dict)
21
+ if verbose:
22
+ logging.basicConfig(level=logging.DEBUG, format="%(name)s: %(message)s")
23
+
24
+
25
+ # Top-level commands
26
+ cli.add_command(init)
27
+
28
+ # Command groups
29
+ cli.add_command(repo)
30
+ cli.add_command(monorepo)
31
+
32
+ # Register mono as an alias for monorepo
33
+ cli.add_command(monorepo, name="mono")
34
+
35
+
36
+ def main():
37
+ """Main entry point."""
38
+ try:
39
+ cli()
40
+ except Exception as exc: # pragma: no cover - top-level CLI guard
41
+ click.echo(f"Error: {exc}", err=True)
42
+ sys.exit(1)
43
+
44
+
45
+ if __name__ == "__main__":
46
+ main()
@@ -0,0 +1 @@
1
+ """Command modules for augint-tools."""
@@ -0,0 +1,93 @@
1
+ """Workspace and monorepo orchestration commands."""
2
+
3
+ import json
4
+ from pathlib import Path
5
+
6
+ import click
7
+ from rich.console import Console
8
+
9
+ console = Console(stderr=True)
10
+
11
+
12
+ def _emit_stub(command_name: str, **payload: object) -> None:
13
+ payload = {"command": command_name, "scope": "monorepo", "implemented": False, **payload}
14
+ console.print(json.dumps(payload, indent=2))
15
+ console.print(
16
+ f"[yellow]{command_name} is scaffolded but not implemented yet. Use augint-tools.md as the implementation spec.[/yellow]"
17
+ )
18
+
19
+
20
+ @click.group()
21
+ def monorepo() -> None:
22
+ """Workspace and monorepo orchestration commands."""
23
+ pass
24
+
25
+
26
+ # Alias for monorepo
27
+ mono = monorepo
28
+
29
+
30
+ @monorepo.command()
31
+ @click.option("--json", "as_json", is_flag=True, default=False)
32
+ def status(as_json: bool) -> None:
33
+ """Show status across all child repositories."""
34
+ _emit_stub("status", cwd=str(Path.cwd()), json=as_json)
35
+
36
+
37
+ @monorepo.command()
38
+ @click.option("--json", "as_json", is_flag=True, default=False)
39
+ def sync(as_json: bool) -> None:
40
+ """Clone missing repos and update existing repos."""
41
+ _emit_stub("sync", cwd=str(Path.cwd()), json=as_json)
42
+
43
+
44
+ @monorepo.command()
45
+ @click.argument("query", required=False)
46
+ @click.option("--json", "as_json", is_flag=True, default=False)
47
+ def issues(query: str | None, as_json: bool) -> None:
48
+ """Aggregate issues across all child repositories."""
49
+ _emit_stub("issues", cwd=str(Path.cwd()), query=query, json=as_json)
50
+
51
+
52
+ @monorepo.command()
53
+ @click.argument("branch_name")
54
+ @click.option("--json", "as_json", is_flag=True, default=False)
55
+ def branch(branch_name: str, as_json: bool) -> None:
56
+ """Create coordinated branches across child repositories."""
57
+ _emit_stub("branch", cwd=str(Path.cwd()), branch=branch_name, json=as_json)
58
+
59
+
60
+ @monorepo.command()
61
+ @click.option("--json", "as_json", is_flag=True, default=False)
62
+ def test(as_json: bool) -> None:
63
+ """Run tests across all child repositories."""
64
+ _emit_stub("test", cwd=str(Path.cwd()), json=as_json)
65
+
66
+
67
+ @monorepo.command()
68
+ @click.option("--fix", is_flag=True, default=False)
69
+ @click.option("--json", "as_json", is_flag=True, default=False)
70
+ def lint(fix: bool, as_json: bool) -> None:
71
+ """Run lint and quality checks across child repositories."""
72
+ _emit_stub("lint", cwd=str(Path.cwd()), fix=fix, json=as_json)
73
+
74
+
75
+ @monorepo.command()
76
+ @click.option("--json", "as_json", is_flag=True, default=False)
77
+ def submit(as_json: bool) -> None:
78
+ """Push branches and open PRs for child repositories."""
79
+ _emit_stub("submit", cwd=str(Path.cwd()), json=as_json)
80
+
81
+
82
+ @monorepo.command(context_settings={"ignore_unknown_options": True})
83
+ @click.argument("command", nargs=-1, type=click.UNPROCESSED)
84
+ def foreach(command: tuple[str, ...]) -> None:
85
+ """Run a command across all child repositories."""
86
+ _emit_stub("foreach", cwd=str(Path.cwd()), command=list(command))
87
+
88
+
89
+ @monorepo.command()
90
+ @click.option("--json", "as_json", is_flag=True, default=False)
91
+ def update(as_json: bool) -> None:
92
+ """Update downstream repos after upstream changes."""
93
+ _emit_stub("update", cwd=str(Path.cwd()), json=as_json)
@@ -0,0 +1,26 @@
1
+ """Top-level project commands."""
2
+
3
+ import json
4
+ from pathlib import Path
5
+
6
+ import click
7
+ from rich.console import Console
8
+
9
+ console = Console(stderr=True)
10
+
11
+
12
+ def _emit_stub(command_name: str, **payload: object) -> None:
13
+ payload = {"command": command_name, "implemented": False, **payload}
14
+ console.print(json.dumps(payload, indent=2))
15
+ console.print(
16
+ f"[yellow]{command_name} is scaffolded but not implemented yet. Use augint-tools.md as the implementation spec.[/yellow]"
17
+ )
18
+
19
+
20
+ @click.command()
21
+ @click.option("--library", "repo_type", flag_value="library", default=None)
22
+ @click.option("--service", "repo_type", flag_value="service")
23
+ @click.option("--workspace", "repo_type", flag_value="workspace")
24
+ def init(repo_type: str | None) -> None:
25
+ """Initialize repo or workspace workflow metadata."""
26
+ _emit_stub("init", cwd=str(Path.cwd()), repo_type=repo_type)
@@ -0,0 +1,68 @@
1
+ """Single repository workflow commands."""
2
+
3
+ import json
4
+ from pathlib import Path
5
+
6
+ import click
7
+ from rich.console import Console
8
+
9
+ console = Console(stderr=True)
10
+
11
+
12
+ def _emit_stub(command_name: str, **payload: object) -> None:
13
+ payload = {"command": command_name, "scope": "repo", "implemented": False, **payload}
14
+ console.print(json.dumps(payload, indent=2))
15
+ console.print(
16
+ f"[yellow]{command_name} is scaffolded but not implemented yet. Use augint-tools.md as the implementation spec.[/yellow]"
17
+ )
18
+
19
+
20
+ @click.group()
21
+ def repo() -> None:
22
+ """Single repository workflow commands."""
23
+ pass
24
+
25
+
26
+ @repo.command()
27
+ @click.option("--json", "as_json", is_flag=True, default=False)
28
+ def status(as_json: bool) -> None:
29
+ """Show repository status."""
30
+ _emit_stub("status", cwd=str(Path.cwd()), json=as_json)
31
+
32
+
33
+ @repo.command()
34
+ @click.argument("query", required=False)
35
+ @click.option("--json", "as_json", is_flag=True, default=False)
36
+ def issues(query: str | None, as_json: bool) -> None:
37
+ """List issues for this repository."""
38
+ _emit_stub("issues", cwd=str(Path.cwd()), query=query, json=as_json)
39
+
40
+
41
+ @repo.command()
42
+ @click.argument("branch_name")
43
+ @click.option("--json", "as_json", is_flag=True, default=False)
44
+ def branch(branch_name: str, as_json: bool) -> None:
45
+ """Create or switch branch."""
46
+ _emit_stub("branch", cwd=str(Path.cwd()), branch=branch_name, json=as_json)
47
+
48
+
49
+ @repo.command()
50
+ @click.option("--json", "as_json", is_flag=True, default=False)
51
+ def test(as_json: bool) -> None:
52
+ """Run tests for this repository."""
53
+ _emit_stub("test", cwd=str(Path.cwd()), json=as_json)
54
+
55
+
56
+ @repo.command()
57
+ @click.option("--fix", is_flag=True, default=False)
58
+ @click.option("--json", "as_json", is_flag=True, default=False)
59
+ def lint(fix: bool, as_json: bool) -> None:
60
+ """Run lint and quality checks."""
61
+ _emit_stub("lint", cwd=str(Path.cwd()), fix=fix, json=as_json)
62
+
63
+
64
+ @repo.command()
65
+ @click.option("--json", "as_json", is_flag=True, default=False)
66
+ def submit(as_json: bool) -> None:
67
+ """Push branch and open PR."""
68
+ _emit_stub("submit", cwd=str(Path.cwd()), json=as_json)
@@ -0,0 +1,39 @@
1
+ """Command execution helpers for augint-tools."""
2
+
3
+ import json
4
+ from pathlib import Path
5
+
6
+ import click
7
+ from rich.console import Console
8
+
9
+ console = Console(stderr=True)
10
+
11
+
12
+ def _emit_stub(command_name: str, **payload: object) -> None:
13
+ payload = {"command": command_name, "implemented": False, **payload}
14
+ console.print(json.dumps(payload, indent=2))
15
+ console.print(
16
+ f"[yellow]{command_name} is scaffolded but not implemented yet. Use augint-tools.md as the implementation spec.[/yellow]"
17
+ )
18
+
19
+
20
+ @click.command(context_settings={"ignore_unknown_options": True})
21
+ @click.argument("command", nargs=-1, type=click.UNPROCESSED)
22
+ def foreach(command: tuple[str, ...]) -> None:
23
+ """Run a command across configured repos."""
24
+ _emit_stub("foreach", cwd=str(Path.cwd()), command=list(command))
25
+
26
+
27
+ @click.command()
28
+ @click.option("--json", "as_json", is_flag=True, default=False)
29
+ def test(as_json: bool) -> None:
30
+ """Run configured tests."""
31
+ _emit_stub("test", cwd=str(Path.cwd()), json=as_json)
32
+
33
+
34
+ @click.command()
35
+ @click.option("--fix", is_flag=True, default=False)
36
+ @click.option("--json", "as_json", is_flag=True, default=False)
37
+ def lint(fix: bool, as_json: bool) -> None:
38
+ """Run configured lint and quality checks."""
39
+ _emit_stub("lint", cwd=str(Path.cwd()), fix=fix, json=as_json)