{"id":24390415,"url":"https://github.com/pgedge/cli","last_synced_at":"2025-08-21T14:09:03.800Z","repository":{"id":121849887,"uuid":"581350517","full_name":"pgEdge/cli","owner":"pgEdge","description":"pgEdge Command Line Interface","archived":false,"fork":false,"pushed_at":"2025-08-19T10:37:18.000Z","size":102547,"stargazers_count":29,"open_issues_count":7,"forks_count":17,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-08-19T12:35:24.134Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pgedge.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pgEdge.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2022-12-23T00:00:24.000Z","updated_at":"2025-08-19T10:36:57.000Z","dependencies_parsed_at":"2023-12-23T12:20:36.880Z","dependency_job_id":"5499a0ab-fa7b-4002-b133-fb6272547ec1","html_url":"https://github.com/pgEdge/cli","commit_stats":null,"previous_names":["pgedge/platform-ctl","pgedge/nodectl","pgedge/cli"],"tags_count":67,"template":false,"template_full_name":null,"purl":"pkg:github/pgEdge/cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgEdge%2Fcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgEdge%2Fcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgEdge%2Fcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgEdge%2Fcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pgEdge","download_url":"https://codeload.github.com/pgEdge/cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgEdge%2Fcli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271493232,"owners_count":24769117,"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","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-01-19T16:17:25.321Z","updated_at":"2025-08-21T14:09:03.773Z","avatar_url":"https://github.com/pgEdge.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pgEdge Command Line Interface (CLI)\n\nThe pgEdge Command Line Interface (CLI) for managing pgEdge Platform components. \n\n[Release notes](https://docs.pgedge.com/platform/pgedge_rel_notes) and further documentation are available on [docs.pgedge.com](https://docs.pgedge.com)\n\n## Table of Contents\n- [Creating a Development Environment](README.md#creating-a-development-environment)\n- [CLI Functions](docs/cli_functions.md)\n\n### Prerequisites\n\nOn each machine that will host a replication node, you must:\n\n* Open any firewalls that could obstruct access between your servers.\n* Set SELinux to `permissive` or `disabled` mode on each host, followed by a system reboot.\n* Configure [passwordless sudo access](#configuring-passwordless-sudo) for a non-root OS user on each host.\n* Configure [passwordless ssh](#configuring-passwordless-ssh) access for the same non-root OS user on each host.\n\n### Creating a Development Environment\n\nAfter meeting the prerequisites:\n\n1.) Clone this repository.\n\n2.) Move into the setup directory: `cd cli/devel/setup`\n\n3.) Run the setup scripts: `./10-toolset.sh` through `30-bashrc.sh`\n\n4.) Source the `~/.bashrc` file.\n\n5.) Run `40-awscli.sh` to install AWS in a virtual environment.\n\n6.) Configure your `~/.aws/config` credentials.\n\n7.) Run `50-pull-IN.sh` to retrieve the REPO files.\n\nA [Docker Compose](devel/setup/compose/README.md) setup is also available for development and testing.\n\n### Using the CLI\n\nWhen using the CLI, you should ensure that you:\n\n**Include a Primary Key in Each Table** \n\nAll tables must include a primary key; this allows pgEdge to replicate `INSERT`, `UPDATE`, and `DELETE` statements. If your table does not include a primary key, only `INSERT` statements will be replicated to the table.\n\n**Use Snowflake Sequences instead of PostgreSQL sequences** \n\nIf you use a PostgreSQL sequence as part of your primary key, you should convert your sequences to [Snowflake sequences](https://github.com/pgEdge/snowflake). Snowflake sequences are composed of multiple data types that ensure a unique transaction sequence when processing your data in multiple regions. This helps  accurately preserve the order in which globally distributed transactions are performed, and alleviates concerns that network lag could disrupt sequences in distributed transactions.\n\n**Include the ENABLE ALWAYS clause in Triggers** \n\nPostgreSQL triggers will fire only from the node on which they were invoked. If you have triggers that are related to the replication process, you should include the `ENABLE ALWAYS` clause when attaching a trigger to a table:\n\n```\nCREATE TRIGGER ins_trig AFTER INSERT ON my_table FOR EACH ROW EXECUTE PROCEDURE ins_history();\nALTER TABLE trans_history ENABLE ALWAYS TRIGGER ins_trig;\n```\n\n#### Configuring Passwordless SSH\n\nYou can use the following steps to configure passwordless SSH on each node of the replication cluster:\n\n```sh\nssh-keygen -t rsa\ncd ~/.ssh\ncat id_rsa.pub \u003e\u003e authorized_keys\nchmod 700 ~/.ssh \u0026\u0026 chmod 600 ~/.ssh/authorized_keys\n```\n\n#### Configuring Passwordless sudo\n\nTo configure passwordless sudo, open the /etc/sudoers file, and add a line of the form:\n\n%username         ALL = (ALL) NOPASSWD: ALL\n\nWhere `username` specifies the name of your operating system user.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgedge%2Fcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpgedge%2Fcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgedge%2Fcli/lists"}