PyMosaygent
A locally running Python API server that powers Mosayic — a development companion for managing full-stack React Native and Python projects with integrated support for Firebase, Google Cloud, GitHub, Expo, and Supabase.
Features
- Environment Management — Configure project directories, detect Python and React Native codebases, track git status
- Expo Dev Server Control — Start, stop, and monitor Metro bundler with live reload support
- Firebase Integration — Manage projects, configure Android/iOS/Web apps, deploy functions, handle secrets
- GitHub Operations — Clone templates, initialize repositories, manage Actions secrets
- Supabase Local Dev — Control local Supabase instance, run migrations, manage database
- Google Cloud Run — Deploy containerized services
Requirements
- Python 3.10 - 3.12
- External CLI tools (depending on features used):
firebase-cliandgcloudfor Firebase/GCP operationsghfor GitHub operationsnode,npm,expo, andeasfor Expo/React Nativesupabaseanddockerfor Supabase local developmentgitfor version control
Installation
uv add mosaygent
For development:
git clone https://github.com/yourusername/pymosaygent
cd pymosaygent
uv sync
Project Structure
pymosaygent/
├── mosaygent/
│ ├── __init__.py # App entry, service initialization
│ ├── command_runner.py # Async subprocess execution
│ ├── logger.py # Colored logging setup
│ ├── middleware.py # Exception handling
│ ├── routes/ # API endpoints
│ │ ├── environment.py # Project & codebase management
│ │ ├── expo.py # Expo dev server control
│ │ ├── firebase.py # Firebase CLI operations
│ │ ├── github.py # GitHub & repo operations
│ │ └── supabase.py # Supabase local dev
│ └── services/ # Business logic
│ ├── environment.py # Project detection, git ops
│ ├── expo.py # Expo process management
│ ├── github.py # GitHub CLI wrapper
│ ├── cloudrun.py # Cloud Run deployment
│ └── firebase/ # Firebase service modules
├── tests/ # Test suite
├── pyproject.toml # Project metadata
└── CLAUDE.md # Code standards
API Endpoints
Environment
| Method | Endpoint | Description |
|---|---|---|
| POST | /environment/set-directory |
Set project root directory |
| GET | /environment/status |
Check API & mobile codebase status |
| POST | /environment/clone-api |
Initialize Python API from template |
Expo
| Method | Endpoint | Description |
|---|---|---|
| POST | /expo/start |
Start Metro bundler |
| POST | /expo/stop |
Stop development server |
| GET | /expo/status |
Get server status |
| POST | /expo/reload |
Trigger live reload |
| GET | /expo/logs |
Fetch captured output |
| GET | /expo/connection |
Get Metro URL and port |
Firebase
| Method | Endpoint | Description |
|---|---|---|
| GET | /firebase/cli-installed |
Check Firebase & gcloud CLI |
| GET | /firebase/auth-status |
Authentication state |
| GET | /firebase/projects |
List accessible projects |
| POST | /firebase/create-android-app |
Create Android app, get google-services.json |
| POST | /firebase/fetch-firebase-configs |
Download platform configs |
| POST | /firebase/deploy |
Deploy Firebase project |
| POST | /firebase/deploy-cloud-run |
Deploy Cloud Run service |
| POST | /firebase/set-secrets |
Create env files & upload secrets |
GitHub
| Method | Endpoint | Description |
|---|---|---|
| GET | /github/auth |
Check gh CLI auth status |
| GET | /github/accounts |
List user & organizations |
| POST | /github/init-repo |
Clone template, create GitHub repo |
| POST | /github/set-secret |
Set GitHub Actions secret |
Supabase
| Method | Endpoint | Description |
|---|---|---|
| GET | /supabase/check-installation |
Verify Docker & Supabase CLI |
| GET | /supabase/migrations |
List migrations |
| POST | /supabase/migrations |
Create migration via db diff |
| POST | /supabase/start |
Start local Supabase |
| POST | /supabase/stop |
Stop Supabase |
| GET | /supabase/status |
Get running services info |
| POST | /supabase/reset-database |
Reset local database |
Health
| Method | Endpoint | Description |
|---|---|---|
| GET | /health |
Liveness check |
Configuration
Project directory is persisted in ~/.mosayic/config.txt and auto-loaded on startup.
Codebase detection:
- Python API: Looks for
pyproject.tomlin subdirectories - React Native: Looks for
app.jsonwith Expo configuration
Testing
pytest
pytest --cov # with coverage
License
MIT
Metadata
Release files for mosaygent 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mosaygent-0.1.9.tar.gz | 121.3 kB | Without provenance | Details for mosaygent-0.1.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mosaygent-0.1.9-py3-none-any.whl | Python 3 | none | any | Details for mosaygent-0.1.9-py3-none-any.whl |
Total release size: 164.6 kB
Release files / mosaygent-0.1.9.tar.gz
| Download URL | mosaygent-0.1.9.tar.gz |
|---|---|
| Size | 121.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ff0a77ae337584d3d9d415ef4f5d68154eee72781486c746c66ede5c63719e7d
|
|
BLAKE2b-256 checksum How to use checksums |
aaff263bdd0622c72373924c2cc4367501d4c87a39041a9050d7a18dc2d6e7d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.14 {"installer":{"name":"uv","version":"0.9.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / mosaygent-0.1.9-py3-none-any.whl
| Download URL | mosaygent-0.1.9-py3-none-any.whl |
|---|---|
| Size | 43.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0f460734fb1f8f24eb9612c473c47b0762d0fbca730659192e5f4499d8fd7bca
|
|
BLAKE2b-256 checksum How to use checksums |
01d3ea434f4733e8d859a709c98c442506b0a887d69e2eb535942ca565923b05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.14 {"installer":{"name":"uv","version":"0.9.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for mosaygent 0.1.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.