{"id":28560114,"url":"https://github.com/capsulescodes/flint","last_synced_at":"2026-03-01T14:05:23.992Z","repository":{"id":284953731,"uuid":"870751487","full_name":"capsulescodes/flint","owner":"capsulescodes","description":"Write code your way while ensuring remote consistency.","archived":false,"fork":false,"pushed_at":"2026-01-01T21:46:27.000Z","size":301,"stargazers_count":16,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-15T14:17:53.595Z","etag":null,"topics":["format","git","hooks","lint"],"latest_commit_sha":null,"homepage":"https://flintable.com/docs/flint/","language":"Shell","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/capsulescodes.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-10T15:46:42.000Z","updated_at":"2026-02-13T12:12:26.000Z","dependencies_parsed_at":"2025-06-10T09:07:37.274Z","dependency_job_id":"5a15899f-89f4-49e1-8fc4-7b45874c7973","html_url":"https://github.com/capsulescodes/flint","commit_stats":null,"previous_names":["capsulescodes/flint"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/capsulescodes/flint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capsulescodes%2Fflint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capsulescodes%2Fflint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capsulescodes%2Fflint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capsulescodes%2Fflint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/capsulescodes","download_url":"https://codeload.github.com/capsulescodes/flint/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capsulescodes%2Fflint/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29970546,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T13:32:00.443Z","status":"ssl_error","status_checked_at":"2026-03-01T13:32:00.084Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["format","git","hooks","lint"],"created_at":"2025-06-10T09:07:32.209Z","updated_at":"2026-03-01T14:05:23.984Z","avatar_url":"https://github.com/capsulescodes.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"\n\u003cp align=\"center\"\u003e\u003cimg src=\"docs/public/flint-readme.png\" height=\"265px\" alt=\"Flint Image\" /\u003e\u003c/p\u003e\n\n\u003cbr\u003e\n\nWrite code your way while ensuring remote consistency.\n\n\u003cbr\u003e\n\nFlint empowers developers to use their personal style and formatting preferences locally, while maintaining a consistent remote codebase. By integrating with Git, Flint automatically formats code during `pull` and `push` operations. This approach prevents commits from being cluttered with formatting changes, making code reviews cleaner and collaboration smoother.\n\n\u003cbr\u003e\n\n\u003e [!NOTE]\n\u003e Flint is currently in alpha. Contributions are warmly welcomed.\n\n\u003cbr\u003e\n\n## Table of Contents\n\n1. [Installation](#installation)\n1. [Usage](#usage)\n1. [Caveats](#caveats)\n1. [Configuration](#configuration)\n1. [Options](#options)\n1. [Package Managers](#currently-supported-package-managers)\n1. [Testing](#testing)\n1. [Credits](#credits)\n1. [License](#license)\n\n\u003cbr\u003e\n\n## Installation\n\n**1. Install Flint using your package manager**\n\n```shell\n# npm\nnpm install --save-dev @capsulescodes/flint\n```\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n**2. Initialize Flint**\n\n```shell\n# npm\nnode_modules/.bin/flint init\n```\n\n- The command creates a `.flint` directory in your project's root [ unless already present ].\n- The command creates a `flint.config.json` file in your project's root [ unless already present ].\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n**3. Optional - Copy the Flint git wrapper inside your local shell configuration file**\n\n```shell\n# Flint git wrapper\ngit() {\n  if [[ -f \"$PWD/.flint/git.sh\" ]]; then\n    bash \"$PWD/.flint/git.sh\" \"$@\";\n  else\n    command git \"$@\";\n  fi\n}\n```\n\n- The function calls **flint** around **git** if a `.flint/git.sh` file is present inside the current working directory. If not, it will call **git** as usual.\n\n\u003cbr\u003e\n\n\u003e [!NOTE]\n\u003e Running ```flint init --wrap``` integrates the wrapper during setup.\n\u003e\n\u003e You can also use `flint` as a `git` alternative.\n\u003e\n\u003e More options below.\n\n\u003cbr\u003e\n\n## Usage\n\nOnce initialized, Flint integrates with your Git workflow to streamline coding practices.\n\n- **Local Development** : Format your code according to personal preferences.\n- **Pulling Code** : Flint adapts remote code to your local style for easier readability.\n- **Committing and Pushing Code** : Flint reformats your code to align with remote style guidelines.\n\n\u003cbr\u003e\n\nThis ensures :\n\n- **Maintaining Code Consistency** :Ensures the repository always adheres to agreed-upon styles.\n- **Improving Readability** : Local preferences don’t impact others' workflows.\n- **Cleaner Commits** : Keeps formatting changes separate from logic changes.\n\n\u003cbr\u003e\n\n## Caveats\n\nFlint creates a hidden temporary commit during certain `git` operations, which may result in the following message to appear when running `git status` :\n\n```diff\nOn branch main\n+ Your branch is ahead of 'origin/main' by 1 commit.\n+     (use \"git push\" to publish your local commits)\n\nnothing to commit, working tree clean\n```\n\n\u003cbr\u003e\n\nThis message indicates that your local branch is configured to track the remote branch, and Flint's hidden temporary commit makes your local branch appear ahead by one commit. If it bothers you, you can unset the upstream tracking for your branch by running :\n\n```git\ngit branch --unset-upstream \u003cbranch-name\u003e\n```\n\n\u003cbr\u003e\n\n## Configuration\n\nFlint uses a `flint.config.json` file to manage formatting commands. Specify your local and remote formatting commands here.\n\n\u003cbr\u003e\n\nBelow is an example configuration file formatting Javascript files with [ESLint](https://eslint.org/). It formats locally based on `eslint.local.config.js` file and remotely based on `eslint.remote.config.js` :\n\n\u003cbr\u003e\n\n```json\n{\n    \"linters\" :\n    [\n        {\n            \"extensions\" : [ \"js\" ],\n            \"binary\" : \"node_modules/.bin/eslint\",\n            \"commands\" : {\n                \"local\" : \"--fix --config eslint.local.config.js --quiet\",\n                \"remote\" : \"--fix --config eslint.remote.config.js --quiet\"\n            }\n        }\n    ]\n}\n```\n\n\u003cbr\u003e\n\n## Options\n\n**- Include Flint hooks during initialization**\n\nIf you want to access Flint hooks, use the `init` argument with the `--hooks` option.\n\n```shell\n# npm\nnode_modules/.bin/flint init --hooks\n```\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n**- Include Git wrapper function during initialization**\n\nIf you want to run Flint while using Git, use the `init` argument with the `--wrap` option.\n\n```shell\n# npm\nnode_modules/.bin/flint init --wrap\n```\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n**- Skip adding default configuration file during initialization**\n\nIf you don't want to add a configuration file template to your project, use the `init` argument with the `--no-config` option.\n\n```shell\n# npm\nnode_modules/.bin/flint init --no-config\n```\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n**- Run Flint command manually**\n\nIf you want to run a specific **command** from configuration file property ***commands***, use your command after the `run` argument. Default is `local`.\n\n```shell\n# npm\nnode_modules/.bin/flint run\n\nnode_modules/.bin/flint run remote\n\nnode_modules/.bin/flint run local foo.js\n```\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n**- Use Flint as a Git alternative**\n\nFlint can act as a Git wrapper, allowing you to seamlessly use Git commands while benefiting from Flint's formatting hooks. To enable this, simply replace `git` with `flint` in your commands.\n\n```shell\n# npm\nnode_modules/.bin/flint status\n```\n\n\u003cbr\u003e\n\n## Currently supported Package Managers\n\n- [x] Flint is available on [npm](https://www.npmjs.com/package/@capsulescodes/flint).\n\n\u003cbr\u003e\n\n\u003e [!NOTE]\n\u003e Flint is written entirely in Bash, making it highly adaptable.\n\u003e\n\u003e Adding support for new package managers primarily involves creating the appropriate configuration files.\n\u003e\n\u003e Additional package managers are expected to be supported in future updates.\n\n\u003cbr\u003e\n\n## Contributing\n\nContributions are warmly welcomed. For major changes, please open an issue first to discuss what you would like to change.\nPlease make sure to update tests as appropriate.\n\n\u003cbr\u003e\n\n## Testing\n\n```shell\n# npm\nnpm run test\n\n# bash\nbash tests/runner.sh\n```\n\n\u003cbr\u003e\n\n## Credits\n\n[Capsules Codes](https://github.com/capsulescodes)\n\n\u003cbr\u003e\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n\n\u003cbr\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapsulescodes%2Fflint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapsulescodes%2Fflint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapsulescodes%2Fflint/lists"}