{"id":22739836,"url":"https://github.com/nimish-nimishmittal/mydb-cli","last_synced_at":"2026-03-16T11:35:01.806Z","repository":{"id":261902357,"uuid":"885676431","full_name":"nimish-nimishmittal/mydb-cli","owner":"nimish-nimishmittal","description":"SQL based db management dev tool.","archived":false,"fork":false,"pushed_at":"2024-12-21T05:11:08.000Z","size":1277,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T19:50:03.756Z","etag":null,"topics":["auraui","auth0","click","conda","gemini","mysql","python","react","shell-script","streamlit","tabulate"],"latest_commit_sha":null,"homepage":"https://nimish-nimishmittal.github.io/mydb-cli/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nimish-nimishmittal.png","metadata":{"files":{"readme":"README.md","changelog":"history_manager.py","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-09T05:04:45.000Z","updated_at":"2025-02-11T08:17:06.000Z","dependencies_parsed_at":"2024-12-18T09:40:32.999Z","dependency_job_id":null,"html_url":"https://github.com/nimish-nimishmittal/mydb-cli","commit_stats":null,"previous_names":["nimish-nimishmittal/mydb-cli"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nimish-nimishmittal%2Fmydb-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nimish-nimishmittal%2Fmydb-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nimish-nimishmittal%2Fmydb-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nimish-nimishmittal%2Fmydb-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nimish-nimishmittal","download_url":"https://codeload.github.com/nimish-nimishmittal/mydb-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248830389,"owners_count":21168272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["auraui","auth0","click","conda","gemini","mysql","python","react","shell-script","streamlit","tabulate"],"created_at":"2024-12-10T23:06:19.042Z","updated_at":"2026-03-16T11:35:01.734Z","avatar_url":"https://github.com/nimish-nimishmittal.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MyDB CLI Tool [draft]\n\nMyDB is a powerful database management tool that provides Git-like branching functionality for MySQL databases. It allows developers to create isolated database environments, manage migrations, and merge changes between branches.\n\n📚 Related Documentation:\n- [MyDB Landing Page](landingREADME.md)\n- [MyDB Studio Documentation](studioREADME.md)\n\n## Table of Contents\n- [Features](#features)\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n- [Getting Started](#getting-started)\n- [Usage](#usage)\n  - [Branch Management](#branch-management)\n  - [Table Operations](#table-operations)\n  - [Migration Management](#migration-management)\n  - [GUI Interface](#gui-interface)\n- [Screenshots](#screenshots)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Features\n\n- 🌳 Git-like branching for databases\n- 📊 Table creation and management\n- 🔄 Database migrations with up/down support\n- 🔀 Branch merging capabilities\n- 📱 GUI interface via MyDB Studio\n- 🔒 Automated schema tracking\n- 📝 Detailed migration history\n\n## Prerequisites\n\n- Python 3.7+\n- MySQL Server 5.7+ or 8.0+\n- pip (Python package manager)\n\n## Installation\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/yourusername/mydb-cli.git\ncd mydb-cli\n```\n\n2. Create and activate a virtual environment (recommended):\n```bash\npython -m venv venv\nsource venv/bin/activate  # On Windows: venv\\Scripts\\activate\n```\n\n3. Install the package in development mode:\n```bash\npip install -e .\n```\n\n4. Install required dependencies:\n```bash\npip install -r requirements.txt\n```\n\n5. Make the CLI tool accessible system-wide:\n```bash\n# Add to your .bashrc or .zshrc:\nexport PATH=\"$PATH:/path/to/mydb-cli/bin\"\n\n# On Windows, add the bin directory to your system PATH\n```\n\n## Getting Started\n\n1. Initialize your database configuration:\n```bash\nmydb-cli status\n```\nThis will create a default configuration file at `.mydb/config.json`.\n\n2. Update the configuration file with your MySQL credentials:\n```json\n{\n    \"connection\": {\n        \"user\": \"your_username\",\n        \"password\": \"your_password\",\n        \"host\": \"localhost\",\n        \"port\": 3306,\n        \"database\": \"your_database\",\n        \"auth_plugin\": \"mysql_native_password\"\n    }\n}\n```\n\n## Usage\n\n### Branch Management\n\nCreate a new branch:\n```bash\nmydb-cli create-branch --branch dev\n```\n\nList all branches:\n```bash\nmydb-cli list-branches\n```\n\nSwitch to a different branch:\n```bash\nmydb-cli switch-branch --branch dev\n```\n\nDelete a branch:\n```bash\nmydb-cli delete-branch --branch old_feature\n```\n\nMerge branches:\n```bash\nmydb-cli merge-branch --source feature --target main\n```\n\n### Table Operations\n\nCreate a new table:\n```bash\nmydb-cli create-table --name users\n# Follow the interactive prompts to define columns\n```\n\nList all tables:\n```bash\nmydb-cli list-tables\n```\n\nDescribe table structure:\n```bash\nmydb-cli describe-table --name users\n```\n\nDrop a table:\n```bash\nmydb-cli drop-table --name old_table\n```\n\n### Migration Management\n\nCreate a new migration:\n```bash\nmydb-cli create-migration --name add_users_table --description \"Create users table with basic fields\"\n```\n\nApply migrations:\n```bash\nmydb-cli migrate-up          # Apply next pending migration\nmydb-cli apply-migration --number 1  # Apply specific migration\n```\n\nRollback migrations:\n```bash\nmydb-cli migrate-down  # Rollback last applied migration\n```\n\nCheck migration status:\n```bash\nmydb-cli migration-status\n```\n\n### GUI Interface\n\nLaunch the MyDB Studio interface:\n```bash\nmydb-cli studio\n```\n\n## Screenshots\n\n### Branch Management\n![Branch Management](screenshots/branch-management.png)\n\n\n### Migration Status\n![Migration Status](/screenshots/migration-status.png)\n\n\n### MyDB Studio\n![MyDB Studio](/screenshots/studio-interface.png)\n\n\n## Project Structure\n\n```\n.\n├── LICENSE\n├── README.md\n├── assets\n│   ├── index-BKO7flFT.css\n│   └── index-D0-aluUL.js\n├── image-1.png\n├── image.png\n├── index.html\n├── main.py\n├── migrations/\n├── requirements.txt\n├── streamlit.png\n├── studio.py\n├── testsqlcode01.txt\n├── testsqlcode02.txt\n└── vite.svg\n\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the BSD 3-Clause License - see the [LICENSE](LICENSE) file for details.\nThis would allow me to make some features of this tool to be served on a proprietory basis as well where i'll earn by providing subscriptions for my dev tool features.\n\n## Support\n\nIf you encounter any issues or have questions, please [open an issue](https://github.com/nimish-nimishmittal/mydb-cli/issues) on GitHub.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnimish-nimishmittal%2Fmydb-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnimish-nimishmittal%2Fmydb-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnimish-nimishmittal%2Fmydb-cli/lists"}