{"id":22850202,"url":"https://github.com/ramadani/adminarea-cli","last_synced_at":"2025-09-10T04:03:40.224Z","repository":{"id":144233465,"uuid":"153421779","full_name":"ramadani/adminarea-cli","owner":"ramadani","description":"Administrative Area Command Line Interface (CLI)","archived":false,"fork":false,"pushed_at":"2018-10-25T09:37:10.000Z","size":19,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-06T10:53:23.639Z","etag":null,"topics":["administrative-areas","cities","cli","command-line-tool","countries","districts","golang","golang-cli","golang-library","indonesia","provinces","villages"],"latest_commit_sha":null,"homepage":"","language":"Go","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/ramadani.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":"2018-10-17T08:23:50.000Z","updated_at":"2018-11-11T23:44:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"14e24ec8-ee29-4e5f-a986-37a0cc57b7a1","html_url":"https://github.com/ramadani/adminarea-cli","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramadani%2Fadminarea-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramadani%2Fadminarea-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramadani%2Fadminarea-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramadani%2Fadminarea-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ramadani","download_url":"https://codeload.github.com/ramadani/adminarea-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246427599,"owners_count":20775615,"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":["administrative-areas","cities","cli","command-line-tool","countries","districts","golang","golang-cli","golang-library","indonesia","provinces","villages"],"created_at":"2024-12-13T05:06:48.805Z","updated_at":"2025-03-31T06:28:29.457Z","avatar_url":"https://github.com/ramadani.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# adminarea-cli\n\nAdministrative Area CLI\n\n## Features\n\n* Create db table\n* Save a country\n* Save the provinces of a country\n* Save the cities/regencies of a country\n* Save the districts of a country\n* Save the villages of a country\n\n### Available Countries\n\n- Indonesia (id)\n\n## Installation\n\nTo install the library and command line program, use the following:\n\n```bash\ngo get -v github.com/ramadani/adminarea-cli/...\n```\n\n## Usage\n\nCreate `adminarea_config.yml` and fill it with following this values:\n\n```yaml\ndb:\n  driver: mysql\n  dsn: user:password@tcp(127.0.0.1:3306)/dbname?parseTime=true\n```\n\n### Available Commands\n\n```cmd\nsetup     Create administrative areas table\ncountry   Save a country     province  Save the provinces of a country\ncity      Save the cities/regencies of a country\ndistrict  Save the districts of a country\nvillage   Save the villages of a country\n```\n\n### Create DB table\n\nTo create `administrative_areas` table to your database, run this command:\n\n```cmd\nadminarea-cli setup\n```\n\n### Save the country\n\n```cmd\n// adminarea-cli country [COUNTRY_CODE_ID]\nadminarea-cli country id\n```\n\n### Save the provinces of a country\n\n```cmd\n// adminarea-cli province [COUNTRY_CODE_ID]\nadminarea-cli province id\n```\n\n### Save the cities/regencies of a country\n\n```cmd\n// adminarea-cli city [COUNTRY_CODE_ID]\nadminarea-cli city id\n```\n\n### Save the districts of a country\n\n```cmd\n// adminarea-cli district [COUNTRY_CODE_ID]\nadminarea-cli district id\n```\n\n### Save the villages of a country\n\n```cmd\n// adminarea-cli village [COUNTRY_CODE_ID]\nadminarea-cli village id\n```\n\n## TODO\n\n- [x] Can create db table\n- [ ] Config file can pass by argument\n- [x] Save a country\n- [x] Save provinces by country\n- [x] Save regencies by country\n- [x] Save districts by country\n- [x] Save villages by country\n\n## References\n\n* [edwardsamuel/Wilayah-Administratif-Indonesia](https://github.com/edwardsamuel/Wilayah-Administratif-Indonesia)\n* [Country Codes List](https://www.nationsonline.org/oneworld/country_code_list.htm)\n\n## License\n\nThis library is distributed under the [MIT](LICENSE) license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framadani%2Fadminarea-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Framadani%2Fadminarea-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framadani%2Fadminarea-cli/lists"}