{"id":15069135,"url":"https://github.com/theapache64/fig","last_synced_at":"2025-05-09T00:09:33.312Z","repository":{"id":246795063,"uuid":"819508884","full_name":"theapache64/fig","owner":"theapache64","description":"Use Google sheet as remote config","archived":false,"fork":false,"pushed_at":"2024-07-05T17:37:13.000Z","size":184,"stargazers_count":157,"open_issues_count":1,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-09T00:09:26.037Z","etag":null,"topics":["android","config-lib","google-sheets","jvm"],"latest_commit_sha":null,"homepage":"https://github.com/theapache64/fig","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theapache64.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-06-24T16:39:41.000Z","updated_at":"2025-04-28T06:38:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"093f3750-46f2-4c28-aa8c-03d95e0721fb","html_url":"https://github.com/theapache64/fig","commit_stats":null,"previous_names":["theapache64/fig"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theapache64%2Ffig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theapache64%2Ffig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theapache64%2Ffig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theapache64%2Ffig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theapache64","download_url":"https://codeload.github.com/theapache64/fig/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253166521,"owners_count":21864482,"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":["android","config-lib","google-sheets","jvm"],"created_at":"2024-09-25T01:40:39.558Z","updated_at":"2025-05-09T00:09:33.292Z","avatar_url":"https://github.com/theapache64.png","language":"Kotlin","readme":"![](cover.jpeg)\n\n\n# fig\n\n\n\u003ca href=\"https://twitter.com/theapache64\" target=\"_blank\"\u003e\n\u003cimg alt=\"Twitter: theapache64\" src=\"https://img.shields.io/twitter/follow/theapache64.svg?style=social\" /\u003e\n\u003c/a\u003e\n\n\u003e Use Google sheet as remote config\n\n### ✨ Demo\n\n**Sheet:**\n\n\u003cimg src=\"https://github.com/theapache64/fig/assets/9678279/fb610e72-f880-4131-b9fd-0f8e255a862e\" width=\"300\"/\u003e\n\n\n**Code:**\n```kotlin\nsuspend fun main() {\n    val fig = Fig()\n    fig.init(sheetUrl = \"https://docs.google.com/spreadsheets/d/../edit?usp=sharing\") // your Google sheet URL\n    println(\"Fruit is '${fig.getValue(\"fruit\", null)}'\")\n}\n```\n\n**Output:**\n```\nFruit is 'apple'\n```\n\n## ⌨️ Usage\n\n1. 📄 Create a Google Sheet with two columns `key` and `value`\n\u003cimg src=\"https://github.com/theapache64/fig/assets/9678279/fb610e72-f880-4131-b9fd-0f8e255a862e\" width=\"300\"/\u003e\n\n2. 🔗 Choose \"Anyone with link\" and copy the link\n\n\u003cimg src=\"https://github.com/theapache64/fig/assets/9678279/1e789776-aabb-40c5-a7a8-97aca27108b3\" width=\"300\"/\u003e\n\n\n\n3. 🤝 Add dependency\n\n![latestVersion](https://img.shields.io/github/v/release/theapache64/fig)\n\n```kotlin\nrepositories {\n    maven { url = uri(\"https://jitpack.io\") }\n}\n\ndependencies {\n    implementation(\"com.github.theapache64:fig:0.0.3\")\n}\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003eGroovy:\u003c/summary\u003e\n  \n  ```groovy\nrepositories {\n    maven { url 'https://jitpack.io' } // Add jitpack\n}\ndependencies {\n    implementation 'com.github.theapache64:fig:0.0.3'\n}\n ```\n\u003c/details\u003e\n\n\n\n4. ⌨️ Use `Fig.init` and `Fig.getValue`\n\n```kotlin\nsuspend fun main() {\n    val fig = Fig()\n    fig.init(sheetUrl = \"YOUR-GOOGLE-SHEET-URL-GOES-HERE\")\n    println(\"Fruit is '${fig.getValue(\"fruit\", null)}'\")\n}\n```\n\n\n5. 💻 **Output**\n\n```\nFruit is 'apple'\n```\n\n## ▶️ Video Tutorial\nIf you want to see this library in practice, you can check out this video tutorial on YouTube: https://youtu.be/E8X94pCJ2zs \n\n## 🚫 Limitations \n- Your value field can't have two data types. To solve this always wrap your number inputs with `TO_TEXT` function. Eg: `=TO_TEXT(\"2.4\")`\n- This library uses an unofficial Google Sheets API to fetch data, which may stop working at any time. It's best to use this library only for small projects where you need quick, dynamic values without setting up something like Firebase (and honestly, most of my projects use this library as a config source and database, so if it crashes, I'll be crying right alongside you).\n\n\n## ✍️ Author\n\n👤 **theapache64**\n\n* Twitter: \u003ca href=\"https://twitter.com/theapache64\" target=\"_blank\"\u003e@theapache64\u003c/a\u003e\n* Email: theapache64@gmail.com\n\nFeel free to ping me 😉\n\n## 🤝 Contributing\n\nContributions are what make the open source community such an amazing place to be learn, inspire, and create. Any\ncontributions you make are **greatly appreciated**.\n\n1. Open an issue first to discuss what you would like to change.\n1. Fork the Project\n1. Create your feature branch (`git checkout -b feature/amazing-feature`)\n1. Commit your changes (`git commit -m 'Add some amazing feature'`)\n1. Push to the branch (`git push origin feature/amazing-feature`)\n1. Open a pull request\n\nPlease make sure to update tests as appropriate.\n\n## ❤ Show your support\n\nGive a ⭐️ if this project helped you!\n\n\u003ca href=\"https://www.patreon.com/theapache64\"\u003e\n  \u003cimg alt=\"Patron Link\" src=\"https://c5.patreon.com/external/logo/become_a_patron_button@2x.png\" width=\"160\"/\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://www.buymeacoffee.com/theapache64\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" width=\"160\"\u003e\n\u003c/a\u003e\n\n\n## 📝 License\n\n```\nCopyright © 2024 - theapache64\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\n_This README was generated by [readgen](https://github.com/theapache64/readgen)_ ❤\n","funding_links":["https://www.patreon.com/theapache64","https://www.buymeacoffee.com/theapache64"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheapache64%2Ffig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheapache64%2Ffig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheapache64%2Ffig/lists"}