{"id":15324524,"url":"https://github.com/mrinjamul/mrinjamulcf-cli","last_synced_at":"2025-03-27T14:43:21.534Z","repository":{"id":104210145,"uuid":"515342662","full_name":"mrinjamul/mrinjamulcf-cli","owner":"mrinjamul","description":"[Public] A CLI to interact with Cloudflare API and manipulate DNS records.","archived":false,"fork":false,"pushed_at":"2022-07-18T21:35:18.000Z","size":46,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-01T18:43:51.466Z","etag":null,"topics":["automation","cli","dns","go"],"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/mrinjamul.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2022-07-18T21:11:56.000Z","updated_at":"2023-05-29T21:31:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"74f65bc0-b8f7-4b06-92dd-e3a23ce30a22","html_url":"https://github.com/mrinjamul/mrinjamulcf-cli","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrinjamul%2Fmrinjamulcf-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrinjamul%2Fmrinjamulcf-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrinjamul%2Fmrinjamulcf-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrinjamul%2Fmrinjamulcf-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrinjamul","download_url":"https://codeload.github.com/mrinjamul/mrinjamulcf-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245864332,"owners_count":20685011,"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":["automation","cli","dns","go"],"created_at":"2024-10-01T09:27:06.082Z","updated_at":"2025-03-27T14:43:21.495Z","avatar_url":"https://github.com/mrinjamul.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003e\u003ccode\u003emrinjamulcf-cli\u003c/code\u003e\u003c/h1\u003e\n  \u003cp\u003e\n    \u003cstrong\u003e📦 A CLI to sync domains from local to Cloudflare.\u003c/strong\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n## Installation\n\n### From source\n\nIf you want to build `mrinjamulcf-cli` from source, you need Go 1.16 or\nhigher. You can then use `go build` to build everything:\n\n```\ngit clone https://github.com/mrinjamul/mrinjamulcf-cli.git\ncd mrinjamulcf-cli\ngo mod download\nmake install\n```\n\n#### From prebuilt binaries:\n\nYou can download prebuilt binaries from the [Release page](https://github.com/mrinjamul/mrinjamulcf-cli/releases),\n\n#### Via Homebrew\n\n```\n    brew tap mrinjamul/main\n    brew install mrinjamulcf-cli\n```\n\n## Prerequisites\n\nwe need to have a Cloudflare account and API key.\n\nand we need to have a top level domain.\n\nset up `.env` file with content,\n\n```\nCF_ZID=\"your-zone-id\"\nCF_TOK=\"your-api-key\"\n```\n\nAvailable envs:\n\n- `CF_ZID`: Cloudflare zone id (required)\n- `CF_TOK`: Cloudflare API key (required)\n- `DOMAIN_NAME`: Top level domain name (optional)\n- `RECORD_FILE`: Path to file with domains (optional)\n- `RESTRICTED_FILE`: Path to file with restricted domains (optional)\n\nor\n\n- `CONFIG_FILE`: location to configuration file (optional)\n\n## Configurations\n\nUse environment variables to configure the CLI.\n\nor you can use configuaration file `$HOME/.mrinjamulcli.json`\n\nSample config file:\n\n```json\n{\n  \"cf_token\": \"your-api-key\",\n  \"zone_id\": \"your-zone-id\",\n  \"domain_name\": \"your-domain.com\",\n  \"record_file\": \"records.json\",\n  \"restricted_file\": \"restricted.json\"\n  \"record_type\": [\"A\", \"CNAME\"]\n}\n```\n\n## Usage\n\n`mrinjamulcf-cli` is a CLI to sync domains from local to Cloudflare.\n\n```\n    mrinjamul.in CLI\n\n    Usage:\n    mrinjamul [flags]\n    mrinjamul [command]\n\n    Available Commands:\n    completion  Generate the autocompletion script for the specified shell\n    export      export DNS records to file.\n    fmt         format the records\n    help        Help about any command\n    sync        sync with remote DNS.\n    version     prints version.\n\n    Flags:\n    -h, --help   help for mrinjamul\n\n    Use \"mrinjamul [command] --help\" for more information about a command.\n\n```\n\n`mrinjamulcf-cli fmt --check` will check if the records are ok.\n\n```\n    format the records\n\n    Usage:\n    mrinjamul fmt [flags]\n\n    Flags:\n    -c, --check           checks if the records has for errors\n        --domain string   specify the domain name\n    -f, --file string     specify the records file\n    -h, --help            help for fmt\n\n```\n\n`mrinjamulcf-cli sync` will sync the records from local to remote.\n\n```\n    sync with remote DNS.\n\n    Usage:\n    mrinjamul sync [flags]\n\n    Flags:\n        --domain string   specify the domain name\n        --dry-run         dry run the sync\n    -f, --file string     specify the records file\n    -h, --help            help for sync\n    -p, --proxied         set all records proxied\n\n```\n\n`mrinjamulcf-cli export` will export the records to a file.\n\n```\n    export DNS records to file.\n\n    Usage:\n    mrinjamul export [flags]\n\n    Flags:\n        --domain string   specify the domain name\n    -f, --file string     specify the export file\n    -h, --help            help for export\n\n```\n\n`mrinjamulcf-cli version` will print the version.\n\n```\n    prints version.\n\n    Usage:\n    mrinjamul version [flags]\n\n    Flags:\n    -h, --help   help for version\n\n```\n\n## License\n\n- open sourced under [MIT license](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrinjamul%2Fmrinjamulcf-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrinjamul%2Fmrinjamulcf-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrinjamul%2Fmrinjamulcf-cli/lists"}