mfbt-cli 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.
Files changed (72) hide show
  1. mfbt_cli-0.1.0/.github/workflows/ci.yml +75 -0
  2. mfbt_cli-0.1.0/.github/workflows/release.yml +100 -0
  3. mfbt_cli-0.1.0/.gitignore +28 -0
  4. mfbt_cli-0.1.0/.pre-commit-config.yaml +19 -0
  5. mfbt_cli-0.1.0/.pypirc.template +20 -0
  6. mfbt_cli-0.1.0/CLAUDE.md +104 -0
  7. mfbt_cli-0.1.0/LICENSE +21 -0
  8. mfbt_cli-0.1.0/PKG-INFO +119 -0
  9. mfbt_cli-0.1.0/README.md +88 -0
  10. mfbt_cli-0.1.0/SECURITY.md +24 -0
  11. mfbt_cli-0.1.0/docs/RELEASE.md +199 -0
  12. mfbt_cli-0.1.0/pyproject.toml +113 -0
  13. mfbt_cli-0.1.0/requirements-dev.txt +10 -0
  14. mfbt_cli-0.1.0/src/mfbt/__init__.py +3 -0
  15. mfbt_cli-0.1.0/src/mfbt/__main__.py +101 -0
  16. mfbt_cli-0.1.0/src/mfbt/_logging.py +60 -0
  17. mfbt_cli-0.1.0/src/mfbt/api_client.py +567 -0
  18. mfbt_cli-0.1.0/src/mfbt/auth.py +592 -0
  19. mfbt_cli-0.1.0/src/mfbt/cache.py +200 -0
  20. mfbt_cli-0.1.0/src/mfbt/cli.py +348 -0
  21. mfbt_cli-0.1.0/src/mfbt/commands/__init__.py +14 -0
  22. mfbt_cli-0.1.0/src/mfbt/commands/projects.py +374 -0
  23. mfbt_cli-0.1.0/src/mfbt/commands/ralph/__init__.py +241 -0
  24. mfbt_cli-0.1.0/src/mfbt/commands/ralph/agent.py +243 -0
  25. mfbt_cli-0.1.0/src/mfbt/commands/ralph/display.py +288 -0
  26. mfbt_cli-0.1.0/src/mfbt/commands/ralph/log_capture.py +264 -0
  27. mfbt_cli-0.1.0/src/mfbt/commands/ralph/orchestrator.py +264 -0
  28. mfbt_cli-0.1.0/src/mfbt/commands/ralph/progress.py +310 -0
  29. mfbt_cli-0.1.0/src/mfbt/commands/ralph/prompt.py +56 -0
  30. mfbt_cli-0.1.0/src/mfbt/commands/ralph/tui_app.py +580 -0
  31. mfbt_cli-0.1.0/src/mfbt/commands/ralph/tui_app.tcss +149 -0
  32. mfbt_cli-0.1.0/src/mfbt/commands/ralph/tui_display.py +350 -0
  33. mfbt_cli-0.1.0/src/mfbt/commands/ralph/types.py +101 -0
  34. mfbt_cli-0.1.0/src/mfbt/config.py +457 -0
  35. mfbt_cli-0.1.0/src/mfbt/error_handler.py +212 -0
  36. mfbt_cli-0.1.0/src/mfbt/exceptions.py +318 -0
  37. mfbt_cli-0.1.0/src/mfbt/formatters.py +206 -0
  38. mfbt_cli-0.1.0/src/mfbt/job_monitor.py +419 -0
  39. mfbt_cli-0.1.0/src/mfbt/platform.py +137 -0
  40. mfbt_cli-0.1.0/src/mfbt/resolvers.py +288 -0
  41. mfbt_cli-0.1.0/src/mfbt/token_manager.py +420 -0
  42. mfbt_cli-0.1.0/src/mfbt/tui/__init__.py +158 -0
  43. mfbt_cli-0.1.0/src/mfbt/tui/actions.py +144 -0
  44. mfbt_cli-0.1.0/src/mfbt/tui/app.py +449 -0
  45. mfbt_cli-0.1.0/src/mfbt/tui/app.tcss +205 -0
  46. mfbt_cli-0.1.0/src/mfbt/tui/colors.py +73 -0
  47. mfbt_cli-0.1.0/src/mfbt/tui/data_provider.py +206 -0
  48. mfbt_cli-0.1.0/src/mfbt/tui/navigation.py +98 -0
  49. mfbt_cli-0.1.0/src/mfbt/tui/screens/__init__.py +0 -0
  50. mfbt_cli-0.1.0/src/mfbt/tui/screens/conversation_view.py +124 -0
  51. mfbt_cli-0.1.0/src/mfbt/tui/screens/feature_detail.py +292 -0
  52. mfbt_cli-0.1.0/src/mfbt/tui/screens/feature_list.py +168 -0
  53. mfbt_cli-0.1.0/src/mfbt/tui/screens/help_screen.py +58 -0
  54. mfbt_cli-0.1.0/src/mfbt/tui/screens/implementation_detail.py +190 -0
  55. mfbt_cli-0.1.0/src/mfbt/tui/screens/info_modal.py +96 -0
  56. mfbt_cli-0.1.0/src/mfbt/tui/screens/module_list.py +158 -0
  57. mfbt_cli-0.1.0/src/mfbt/tui/screens/project_list.py +128 -0
  58. mfbt_cli-0.1.0/src/mfbt/tui/widgets/__init__.py +0 -0
  59. mfbt_cli-0.1.0/src/mfbt/tui/widgets/breadcrumb_bar.py +22 -0
  60. mfbt_cli-0.1.0/src/mfbt/tui/widgets/breadcrumb_header.py +21 -0
  61. mfbt_cli-0.1.0/src/mfbt/tui/widgets/command_bar.py +30 -0
  62. mfbt_cli-0.1.0/src/mfbt/tui/widgets/connection_indicator.py +38 -0
  63. mfbt_cli-0.1.0/src/mfbt/tui/widgets/footer_hints.py +35 -0
  64. mfbt_cli-0.1.0/src/mfbt/tui/widgets/job_status_panel.py +86 -0
  65. mfbt_cli-0.1.0/src/mfbt/tui/widgets/k9s_header.py +111 -0
  66. mfbt_cli-0.1.0/src/mfbt/tui/widgets/markdown_viewer.py +80 -0
  67. mfbt_cli-0.1.0/src/mfbt/tui/widgets/metadata_panel.py +50 -0
  68. mfbt_cli-0.1.0/src/mfbt/tui/widgets/resource_list.py +81 -0
  69. mfbt_cli-0.1.0/src/mfbt/tui/widgets/resource_table.py +118 -0
  70. mfbt_cli-0.1.0/src/mfbt/tui/widgets/status_bar.py +70 -0
  71. mfbt_cli-0.1.0/src/mfbt/websocket_client.py +446 -0
  72. mfbt_cli-0.1.0/src/mfbt/websocket_types.py +103 -0
@@ -0,0 +1,75 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ quality:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ python-version: ["3.10", "3.11", "3.12"]
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+
18
+ - uses: actions/setup-python@v5
19
+ with:
20
+ python-version: ${{ matrix.python-version }}
21
+
22
+ - name: Install uv
23
+ run: pip install uv
24
+
25
+ - name: Create venv and install dependencies
26
+ run: |
27
+ uv venv
28
+ uv pip install -e . -r requirements-dev.txt
29
+
30
+ - name: Lint with ruff
31
+ run: uv run ruff check src/ tests/
32
+
33
+ - name: Type check with mypy
34
+ run: uv run mypy src/mfbt/
35
+
36
+ - name: Run tests with coverage
37
+ run: >
38
+ uv run pytest tests/
39
+ --cov=mfbt
40
+ --cov-report=term-missing
41
+ --cov-fail-under=75
42
+ -q
43
+
44
+ installation-test:
45
+ runs-on: ubuntu-latest
46
+ needs: quality
47
+ strategy:
48
+ matrix:
49
+ python-version: ["3.10", "3.11", "3.12"]
50
+ steps:
51
+ - uses: actions/checkout@v4
52
+
53
+ - uses: actions/setup-python@v5
54
+ with:
55
+ python-version: ${{ matrix.python-version }}
56
+
57
+ - name: Install uv
58
+ run: pip install uv
59
+
60
+ - name: Create venv and install dev dependencies
61
+ run: |
62
+ uv venv
63
+ uv pip install -e . -r requirements-dev.txt
64
+
65
+ - name: Run installation tests
66
+ run: uv run pytest tests/integration/test_installation.py -v
67
+
68
+ - name: Upload test logs
69
+ if: always()
70
+ uses: actions/upload-artifact@v4
71
+ with:
72
+ name: installation-test-logs-py${{ matrix.python-version }}
73
+ path: |
74
+ tests/integration/test_installation.py
75
+ retention-days: 14
@@ -0,0 +1,100 @@
1
+ name: Release to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ jobs:
11
+ build:
12
+ name: Build distribution packages
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - uses: actions/setup-python@v5
18
+ with:
19
+ python-version: "3.12"
20
+
21
+ - name: Install build tools
22
+ run: pip install build
23
+
24
+ - name: Build sdist and wheel
25
+ run: python -m build
26
+
27
+ - name: Verify distributions
28
+ run: |
29
+ pip install twine
30
+ twine check dist/*
31
+
32
+ - uses: actions/upload-artifact@v4
33
+ with:
34
+ name: dist
35
+ path: dist/
36
+
37
+ test-installation:
38
+ name: Test installation from wheel
39
+ needs: build
40
+ runs-on: ubuntu-latest
41
+ strategy:
42
+ matrix:
43
+ python-version: ["3.10", "3.11", "3.12"]
44
+ steps:
45
+ - uses: actions/download-artifact@v4
46
+ with:
47
+ name: dist
48
+ path: dist/
49
+
50
+ - uses: actions/setup-python@v5
51
+ with:
52
+ python-version: ${{ matrix.python-version }}
53
+
54
+ - name: Install from wheel
55
+ run: pip install dist/*.whl
56
+
57
+ - name: Verify entry point
58
+ run: mfbt --version
59
+
60
+ - name: Verify help
61
+ run: mfbt --help
62
+
63
+ - name: Verify module import
64
+ run: python -c "import mfbt; print('ok')"
65
+
66
+ publish-testpypi:
67
+ name: Publish to TestPyPI
68
+ needs: [build, test-installation]
69
+ runs-on: ubuntu-latest
70
+ if: github.event.release.prerelease
71
+ environment: testpypi
72
+ permissions:
73
+ id-token: write
74
+ steps:
75
+ - uses: actions/download-artifact@v4
76
+ with:
77
+ name: dist
78
+ path: dist/
79
+
80
+ - name: Publish to TestPyPI
81
+ uses: pypa/gh-action-pypi-publish@release/v1
82
+ with:
83
+ repository-url: https://test.pypi.org/legacy/
84
+
85
+ publish-pypi:
86
+ name: Publish to PyPI
87
+ needs: [build, test-installation]
88
+ runs-on: ubuntu-latest
89
+ if: "!github.event.release.prerelease"
90
+ environment: pypi
91
+ permissions:
92
+ id-token: write
93
+ steps:
94
+ - uses: actions/download-artifact@v4
95
+ with:
96
+ name: dist
97
+ path: dist/
98
+
99
+ - name: Publish to PyPI
100
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,28 @@
1
+ # mfbt config
2
+ .mfbt/
3
+
4
+ # Python
5
+ __pycache__/
6
+ *.py[cod]
7
+ *$py.class
8
+
9
+ # Build/dist
10
+ dist/
11
+ build/
12
+ *.egg-info/
13
+
14
+ # Virtual environments
15
+ .venv/
16
+ venv/
17
+
18
+ # Tool caches
19
+ .pytest_cache/
20
+ .mypy_cache/
21
+ .ruff_cache/
22
+ .coverage
23
+
24
+ # PyPI config (tokens)
25
+ .pypirc
26
+
27
+ # OS
28
+ .DS_Store
@@ -0,0 +1,19 @@
1
+ repos:
2
+ - repo: https://github.com/psf/black
3
+ rev: "24.4.2"
4
+ hooks:
5
+ - id: black
6
+ language_version: python3
7
+
8
+ - repo: https://github.com/astral-sh/ruff-pre-commit
9
+ rev: "v0.4.4"
10
+ hooks:
11
+ - id: ruff
12
+ args: ["--fix"]
13
+
14
+ - repo: https://github.com/pre-commit/mirrors-mypy
15
+ rev: "v1.10.0"
16
+ hooks:
17
+ - id: mypy
18
+ additional_dependencies: []
19
+ args: ["--config-file=pyproject.toml"]
@@ -0,0 +1,20 @@
1
+ # Copy this file to ~/.pypirc (or ./.pypirc) and fill in your API tokens.
2
+ # NEVER commit real tokens to version control.
3
+ #
4
+ # Generate tokens at:
5
+ # - TestPyPI: https://test.pypi.org/manage/account/token/
6
+ # - PyPI: https://pypi.org/manage/account/token/
7
+
8
+ [distutils]
9
+ index-servers =
10
+ pypi
11
+ testpypi
12
+
13
+ [pypi]
14
+ username = __token__
15
+ password = pypi-XXXX
16
+
17
+ [testpypi]
18
+ repository = https://test.pypi.org/legacy/
19
+ username = __token__
20
+ password = pypi-XXXX
@@ -0,0 +1,104 @@
1
+ # CLAUDE.md - mfbt CLI
2
+
3
+ ## Project Overview
4
+
5
+ **mfbt CLI** is a Python-based CLI tool for the mfbt platform, targeting publication to PyPI. It provides both an interactive TUI mode (K9S-style) and traditional subcommands for managing mfbt projects.
6
+
7
+ - **Language:** Python 3.10+ (uses modern features: pattern matching, improved type hints)
8
+ - **Backend:** Integrates with mfbt REST API (`{BASE_URL}/api/v1/`)
9
+ - **Auth:** OAuth 2.1 with PKCE (1hr access tokens, 30-day refresh tokens), plus API key management (`mfbtsk-{uuid}`, passed as `Authorization: Bearer {key}`)
10
+ - **Config:** `.mfbt` directory stores auth tokens and project configuration
11
+
12
+ ## API Specification
13
+
14
+ The file `openapi.json` in the project root contains the full OpenAPI spec for the mfbt backend. **Do NOT read this file in full** — it is very large. Instead, use Grep or search tools to find specific endpoints, schemas, or parameters as needed.
15
+
16
+ ## Architecture
17
+
18
+ ### Core Systems
19
+
20
+ 1. **Authentication & Configuration** — Browser-based OAuth flow, token refresh/session management, API key support, project selection post-auth
21
+ 2. **Interactive TUI Mode** — Launched when CLI runs without subcommands; K9S-style keyboard-driven navigation with real-time status updates
22
+ 3. **Subcommands** — `status`, `next`, `modules`, `features`, plus commands for brainstorming phases, implementations, and jobs. Consistent output formatting (table, JSON, etc.)
23
+ 4. **API Integration Layer** — REST client for all mfbt endpoints, paginated responses (`{items, total, page, page_size, total_pages}`), error handling (404 for unauthorized, 402 for token limits), job polling for async operations, WebSocket support for real-time job status
24
+ 5. **API Key Management** — CRUD via `/api/v1/users/me/api-keys`
25
+
26
+ ### Key API Endpoints
27
+
28
+ - Projects CRUD
29
+ - Brainstorming phases
30
+ - Modules, features, and implementations
31
+ - Job monitoring: `GET /api/v1/jobs/{job_id}`
32
+ - Thread comments
33
+ - MCP config retrieval: `GET /api/v1/projects/{id}/mcp-config`
34
+ - API key management: `/api/v1/users/me/api-keys`
35
+
36
+ ### Constraints
37
+
38
+ - Must work with existing mfbt FastAPI backend
39
+ - Support both UUIDs and short URL identifiers
40
+ - Handle ISO 8601 UTC timestamps
41
+ - Graceful degradation when token limits reached (HTTP 402)
42
+
43
+ ## MFBT MCP Server (Virtual Filesystem)
44
+
45
+ This project uses the **mfbt MCP server**, which exposes a virtual filesystem (VFS) for navigating mfbt project data. **Always call `readMeFirst`** at the start of a session to get the full VFS guide, available tools, and recommended workflow.
46
+
47
+ ### Key MCP Concepts
48
+
49
+ - The VFS exposes project phases, modules, features, and implementations as a navigable filesystem
50
+ - Use UNIX-like commands: `ls`, `cat`, `tree`, `find`, `grep`, `head`, `tail`
51
+ - Smart metadata on directories guides what to work on next (progress %, next feature, completion status)
52
+ - Two feature sources: `system-generated/` (AI-created from brainstorming) and `user-defined/` (manually created or imported)
53
+
54
+ ### MCP VFS Structure
55
+
56
+ ```
57
+ /
58
+ ├── phases/
59
+ │ ├── system-generated/{phase}/
60
+ │ │ ├── phase-spec/ # full.md, summary.md, by-section/
61
+ │ │ ├── phase-prompt-plan/ # full.md, by-section/
62
+ │ │ └── features/{module}/{feature}/
63
+ │ │ ├── implementations/{impl}/
64
+ │ │ │ ├── spec.md # WHAT to build
65
+ │ │ │ ├── prompt_plan.md # HOW to build
66
+ │ │ │ └── notes.md # Writable learnings
67
+ │ │ └── conversations/conversations.md
68
+ │ └── user-defined/features/{module}/{feature}/
69
+ │ └── (same structure as above)
70
+ ├── project-info/team-info.json
71
+ ├── system-info/users/available-users-list.csv
72
+ └── for-coding-agents/
73
+ ├── agents.md # Grounding context (read at session start)
74
+ └── mfbt-usage-guide/ # Workflow guides
75
+ ```
76
+
77
+ ### MCP Recommended Workflow
78
+
79
+ 1. `cat /for-coding-agents/agents.md --branch_name='your-branch'` — grounding context
80
+ 2. `ls /` → `ls /phases/` → drill into phases, modules, features
81
+ 3. Read `spec.md` (what to build) and `prompt_plan.md` (how to build)
82
+ 4. `setMetadataValueForKey .../features/{module}/{feature}/ in_progress true` — mark as started
83
+ 5. Implement the feature
84
+ 6. `write .../implementations/{impl}/notes.md '<learnings>'` — document what you learned
85
+ 7. `setMetadataValueForKey .../implementations/{impl}/ is_complete true` — mark done (auto-syncs feature status)
86
+
87
+ ### MCP Tips
88
+
89
+ - Include `coding_agent_name: "claude_code"` and `branch_name` in tool calls
90
+ - Use `summary.md` for quick spec overviews; `by-section/` for large specs
91
+ - Focus on `must_have` features first, then `important`, then `optional`
92
+ - `notes.md` auto-feeds into `agents.md` grounding — document architectural decisions and gotchas
93
+ - Use `grep` to search across specs and prompt plans
94
+ - For team communication (posting comments), see `/for-coding-agents/mfbt-usage-guide/`
95
+ - To update status: `in_progress` on features when starting, `is_complete` on implementations when done
96
+
97
+ ## Development
98
+
99
+ - **Venv:** `.venv/bin/python`, `.venv/bin/pytest`
100
+ - **Run tests:** `.venv/bin/pytest tests/unit/ralph/ -v`
101
+ - **API response formats:** List endpoints (`/features`, `/implementations`) return **paginated** `{"items": [...], "total": N, ...}` — always extract via `body["items"]`. Some endpoints (`/brainstorming-phases`) return plain lists. See `src/mfbt/tui/data_provider.py` for the canonical parsing pattern.
102
+ - **Ralph subcommand:** `src/mfbt/commands/ralph/` — orchestrator, display (console), tui_display (Textual), agent runner, progress (API), prompt builder, types
103
+ - **Ralph TUI:** Standalone Textual app (`tui_app.py`), separate from main mfbt TUI. Uses `RalphTUIDisplay` adapter (same 8-method interface as `RalphDisplay`) with `call_from_thread()` to marshal UI updates from the orchestrator's worker thread.
104
+ - **Display duck typing:** `RalphOrchestrator.display` is typed as `Any` — both `RalphDisplay` and `RalphTUIDisplay` are structurally compatible (same 8 methods).
mfbt_cli-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Zipstack
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.
@@ -0,0 +1,119 @@
1
+ Metadata-Version: 2.4
2
+ Name: mfbt-cli
3
+ Version: 0.1.0
4
+ Summary: CLI tool for the mfbt platform — interactive TUI and subcommands for managing mfbt projects
5
+ Project-URL: Homepage, https://github.com/Zipstack/mfbt-cli
6
+ Project-URL: Repository, https://github.com/Zipstack/mfbt-cli
7
+ Project-URL: Issues, https://github.com/Zipstack/mfbt-cli/issues
8
+ Author-email: Zipstack <engineering@zipstack.com>
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
22
+ Classifier: Typing :: Typed
23
+ Requires-Python: >=3.10
24
+ Requires-Dist: httpx>=0.24.0
25
+ Requires-Dist: platformdirs>=3.0.0
26
+ Requires-Dist: rich>=13.0.0
27
+ Requires-Dist: textual>=0.86.0
28
+ Requires-Dist: typer>=0.9.0
29
+ Requires-Dist: websockets>=12.0
30
+ Description-Content-Type: text/markdown
31
+
32
+ # mfbt CLI
33
+
34
+ Command-line tool for the [mfbt](https://mfbt.ai) platform. Provides both an interactive TUI mode and traditional subcommands for managing mfbt projects.
35
+
36
+ ## Features
37
+
38
+ - **Interactive TUI** -- K9S-style keyboard-driven interface for navigating projects, phases, modules, and features
39
+ - **Subcommands** -- Traditional CLI commands for scripting and automation (`auth`, `projects`, `ralph`, and more)
40
+ - **OAuth 2.1 Authentication** -- Secure browser-based login with PKCE and API key support
41
+ - **Real-time Updates** -- WebSocket-powered job monitoring and status tracking
42
+ - **Agent Orchestration** -- Auto-invoke coding agents to implement pending features with `mfbt ralph`
43
+
44
+ ## Requirements
45
+
46
+ - Python 3.10+
47
+
48
+ ## Installation
49
+
50
+ ```bash
51
+ pip install mfbt-cli
52
+ ```
53
+
54
+ ## Quick Start
55
+
56
+ ```bash
57
+ # Authenticate with the mfbt platform
58
+ mfbt auth login
59
+
60
+ # List your projects
61
+ mfbt projects list
62
+
63
+ # Launch the interactive TUI
64
+ mfbt
65
+
66
+ # Show version
67
+ mfbt --version
68
+ ```
69
+
70
+ ## Usage
71
+
72
+ ```bash
73
+ # Run with verbose output
74
+ mfbt -v
75
+ mfbt -vv # debug
76
+ mfbt -vvv # trace
77
+
78
+ # Authentication commands
79
+ mfbt auth login
80
+ mfbt auth status
81
+ mfbt auth logout
82
+
83
+ # Project management
84
+ mfbt projects list
85
+ mfbt projects show
86
+ mfbt projects switch
87
+
88
+ # Auto-invoke coding agents
89
+ mfbt ralph
90
+ ```
91
+
92
+ ## Development Setup
93
+
94
+ ```bash
95
+ # Clone the repository
96
+ git clone https://github.com/Zipstack/mfbt-cli.git
97
+ cd mfbt-cli
98
+
99
+ # Create a virtual environment
100
+ python -m venv .venv
101
+ source .venv/bin/activate # Unix
102
+ # .venv\Scripts\activate # Windows
103
+
104
+ # Install in editable mode with dev dependencies
105
+ pip install -e .
106
+ pip install -r requirements-dev.txt
107
+
108
+ # Run tests
109
+ pytest tests/ -v
110
+
111
+ # Code quality
112
+ black --check src/ tests/
113
+ ruff check src/ tests/
114
+ mypy src/
115
+ ```
116
+
117
+ ## License
118
+
119
+ MIT -- see [LICENSE](LICENSE) for details.
@@ -0,0 +1,88 @@
1
+ # mfbt CLI
2
+
3
+ Command-line tool for the [mfbt](https://mfbt.ai) platform. Provides both an interactive TUI mode and traditional subcommands for managing mfbt projects.
4
+
5
+ ## Features
6
+
7
+ - **Interactive TUI** -- K9S-style keyboard-driven interface for navigating projects, phases, modules, and features
8
+ - **Subcommands** -- Traditional CLI commands for scripting and automation (`auth`, `projects`, `ralph`, and more)
9
+ - **OAuth 2.1 Authentication** -- Secure browser-based login with PKCE and API key support
10
+ - **Real-time Updates** -- WebSocket-powered job monitoring and status tracking
11
+ - **Agent Orchestration** -- Auto-invoke coding agents to implement pending features with `mfbt ralph`
12
+
13
+ ## Requirements
14
+
15
+ - Python 3.10+
16
+
17
+ ## Installation
18
+
19
+ ```bash
20
+ pip install mfbt-cli
21
+ ```
22
+
23
+ ## Quick Start
24
+
25
+ ```bash
26
+ # Authenticate with the mfbt platform
27
+ mfbt auth login
28
+
29
+ # List your projects
30
+ mfbt projects list
31
+
32
+ # Launch the interactive TUI
33
+ mfbt
34
+
35
+ # Show version
36
+ mfbt --version
37
+ ```
38
+
39
+ ## Usage
40
+
41
+ ```bash
42
+ # Run with verbose output
43
+ mfbt -v
44
+ mfbt -vv # debug
45
+ mfbt -vvv # trace
46
+
47
+ # Authentication commands
48
+ mfbt auth login
49
+ mfbt auth status
50
+ mfbt auth logout
51
+
52
+ # Project management
53
+ mfbt projects list
54
+ mfbt projects show
55
+ mfbt projects switch
56
+
57
+ # Auto-invoke coding agents
58
+ mfbt ralph
59
+ ```
60
+
61
+ ## Development Setup
62
+
63
+ ```bash
64
+ # Clone the repository
65
+ git clone https://github.com/Zipstack/mfbt-cli.git
66
+ cd mfbt-cli
67
+
68
+ # Create a virtual environment
69
+ python -m venv .venv
70
+ source .venv/bin/activate # Unix
71
+ # .venv\Scripts\activate # Windows
72
+
73
+ # Install in editable mode with dev dependencies
74
+ pip install -e .
75
+ pip install -r requirements-dev.txt
76
+
77
+ # Run tests
78
+ pytest tests/ -v
79
+
80
+ # Code quality
81
+ black --check src/ tests/
82
+ ruff check src/ tests/
83
+ mypy src/
84
+ ```
85
+
86
+ ## License
87
+
88
+ MIT -- see [LICENSE](LICENSE) for details.
@@ -0,0 +1,24 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ | Version | Supported |
6
+ | ------- | --------- |
7
+ | 0.1.x | Yes |
8
+
9
+ ## Reporting a Vulnerability
10
+
11
+ If you discover a security vulnerability, please report it responsibly:
12
+
13
+ 1. **Do not** open a public issue.
14
+ 2. Email security details to the project maintainers.
15
+ 3. Include steps to reproduce, impact assessment, and any suggested fixes.
16
+
17
+ We will acknowledge receipt within 48 hours and aim to provide a fix within 7 days for critical issues.
18
+
19
+ ## Scope
20
+
21
+ - Authentication token storage and handling
22
+ - API key management
23
+ - File permission management for `.mfbt/` directory
24
+ - Any data transmission to/from the mfbt API