{"id":24803025,"url":"https://github.com/paulgeorge35/db-cli","last_synced_at":"2025-03-25T05:37:36.413Z","repository":{"id":273013072,"uuid":"918466058","full_name":"paulgeorge35/db-cli","owner":"paulgeorge35","description":"A command-line interface tool for managing PostgreSQL databases with a focus on simplicity and user experience. Features interactive prompts and beautiful terminal output using chalk and boxen.","archived":false,"fork":false,"pushed_at":"2025-01-18T05:18:12.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-30T05:17:01.815Z","etag":null,"topics":["cli","keychain","yargs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paulgeorge35.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2025-01-18T02:16:59.000Z","updated_at":"2025-01-19T15:48:03.000Z","dependencies_parsed_at":"2025-01-18T03:36:31.753Z","dependency_job_id":null,"html_url":"https://github.com/paulgeorge35/db-cli","commit_stats":null,"previous_names":["paulgeorge35/db-cli"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulgeorge35%2Fdb-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulgeorge35%2Fdb-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulgeorge35%2Fdb-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulgeorge35%2Fdb-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paulgeorge35","download_url":"https://codeload.github.com/paulgeorge35/db-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245407759,"owners_count":20610232,"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":["cli","keychain","yargs"],"created_at":"2025-01-30T05:17:04.087Z","updated_at":"2025-03-25T05:37:36.393Z","avatar_url":"https://github.com/paulgeorge35.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DB CLI\n\n\u003e A command-line interface tool for managing PostgreSQL databases with a focus on simplicity, security, and user experience.\n\u003e Features interactive prompts, beautiful terminal output, and secure credential storage.\n\nA JavaScript CLI tool that helps you configure database connections and create new databases with ease.\n\n## Features\n\n- 🔧 Interactive configuration system\n- 🗄️ PostgreSQL database management\n- 🎨 Beautiful terminal output with colors and boxes\n- 🔐 Secure password storage using system keychain\n- 💾 Connection string generation\n\n## Prerequisites\n\n- PostgreSQL server installed and running\n- Node.js 16.x or higher\n- npm or yarn package manager\n- sudo access (for global installation)\n- System keychain requirements:\n  - Linux: `libsecret` and `gnome-keyring`\n  - macOS: Keychain Access\n  - Windows: Credential Manager\n\n## Installation\n\nYou can install the CLI tool in two ways:\n\n### 1. Via npm (Recommended)\n\n```bash\nnpm install -g https://github.com/paulgeorge35/db-cli\n```\n\n### 2. From Source\n\n```bash\n# Clone the repository\ngit clone https://github.com/paulgeorge35/db-cli\ncd db-cli\n\n# Install dependencies\nnpm install\n\n# Link the package globally\nnpm link\n```\n\n## Usage\n\n### Configure Database Connection\n\n```bash\ndb-cli config\n```\n\nThis interactive command will help you set up your database connection:\n\n```bash\n? Enter database host: localhost\n? Enter port: (5432)\n? Enter username: (root)\n? Enter password: [hidden]\n```\n\n### Create New Database\n\n```bash\ndb-cli add db\n```\n\nExample output:\n```bash\n? Enter database name: myapp_development\n✔ Database created successfully!\nConnection string: postgresql://root:****@localhost:5432/myapp_development\n```\n\n### View Configuration\n\nView your current database configuration:\n\n```bash\n# Hide password (default)\ndb-cli view\n\n# Show password\ndb-cli view --show-password\n```\n\n### Reset Configuration\n\nRemove all saved configuration:\n\n```bash\ndb-cli reset\n```\n\n### Help\n\nGet help on available commands:\n\n```bash\ndb-cli --help\n```\n\n## Configuration Storage\n\nThe tool uses two secure storage mechanisms:\n\n1. Non-sensitive configuration (host, port, username) is stored using the `conf` package in:\n   - macOS: `~/Library/Preferences/db-cli-nodejs`\n   - Windows: `%APPDATA%/db-cli-nodejs/Config`\n   - Linux: `~/.config/db-cli-nodejs`\n\n2. Passwords are securely stored in the system's native keychain:\n   - macOS: Keychain Access\n   - Windows: Credential Manager\n   - Linux: Secret Service API (GNOME Keyring/KWallet)\n\n## Dependencies\n\nCore dependencies:\n- `boxen` (^8.0.1): Create boxes in terminal\n- `chalk` (^5.4.1): Terminal string styling\n- `yargs` (^17.7.2): Command-line argument parsing\n- `inquirer` (^9.2.15): Interactive command prompts\n- `pg` (^8.11.3): PostgreSQL client\n- `conf` (^12.0.0): Configuration storage\n\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Contact\n\nPaul George - contact@paulgeorge.dev\n\nProject Link: [https://github.com/paulgeorge35/db-cli](https://github.com/paulgeorge35/db-cli)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulgeorge35%2Fdb-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaulgeorge35%2Fdb-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulgeorge35%2Fdb-cli/lists"}