{"id":30407884,"url":"https://github.com/nadim147c/chromashift","last_synced_at":"2025-08-21T20:55:39.585Z","repository":{"id":259166701,"uuid":"860008587","full_name":"Nadim147c/ChromaShift","owner":"Nadim147c","description":"A output colorizer for your favorite commands","archived":false,"fork":false,"pushed_at":"2025-08-05T06:31:32.000Z","size":304,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-05T08:35:54.205Z","etag":null,"topics":["cli","colors","terminal","unix"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nadim147c.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,"zenodo":null}},"created_at":"2024-09-19T16:51:55.000Z","updated_at":"2025-08-05T06:31:36.000Z","dependencies_parsed_at":"2025-07-27T18:22:40.257Z","dependency_job_id":"1009b777-8c71-46c1-b572-1b3b772807e7","html_url":"https://github.com/Nadim147c/ChromaShift","commit_stats":null,"previous_names":["nadim147c/chromashift"],"tags_count":37,"template":false,"template_full_name":null,"purl":"pkg:github/Nadim147c/ChromaShift","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nadim147c%2FChromaShift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nadim147c%2FChromaShift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nadim147c%2FChromaShift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nadim147c%2FChromaShift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nadim147c","download_url":"https://codeload.github.com/Nadim147c/ChromaShift/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nadim147c%2FChromaShift/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271539817,"owners_count":24777495,"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":["cli","colors","terminal","unix"],"created_at":"2025-08-21T20:55:31.986Z","updated_at":"2025-08-21T20:55:39.556Z","avatar_url":"https://github.com/Nadim147c.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ChromaShift\n\nA output colorizer for your favorite commands.\n\n![preview](./assets/cshift.png)\n\n## Installation\n\n### Arch User Repository (AUR)\n\n```bash\nyay -S chromashift\n```\n\nOr,\n\n```bash\nyay -S chromashift-git\n```\n\n### Pre-Build Binary\n\nDownload pre-build binary from\n[release](https://github.com/Nadim147c/ChromaShift/releases).\n\n### Build from source\n\n```bash\ngit clone https://github.com/Nadim147c/ChromaShift.git\ncd ChromaShift\nmake\nsudo make install PREFIX=/usr\n```\n\n## Usage\n\nSimply run your favorite commands through ChromaShift to see the output in enhanced\ncolors. For example:\n\n```bash\ncshift -- \u003cyour-command\u003e\n```\n\nList of available command can be found in [config.toml](./config.toml) file.\n\n## Contribution\n\nIf your favorite command is not supported yet, feel free to create an\n[issue](https://github.com/Nadim147c/ChromaShift/issues). If you want to contribute\nyour rules for any specific command, follow the guide below.\n\n## Creating a New Rule\n\nTo create your own colorization rules, you’ll need a basic understanding of regular\nexpressions (regex). Let’s walk through an example where you want to create a\ncolorization rule for the `du` command (note: a rule for `du` already exists).\n\n1. First, create the configuration file if it doesn’t exist:\n\n   ```sh\n   mkdir -p ~/.config/Chromashift\n   touch ~/.config/Chromashift/config.toml\n   ```\n\n   Then, add an entry in the configuration file located at\n   `~/.config/Chromashift/config.toml` like this:\n\n   ```toml\n   [du]\n   regexp = '^([/\\w\\.]+/)?du\\b'\n   file = 'du.toml'\n   ```\n\n   Here's how it works: `ChromaShift` first checks if the command name matches `du`\n   exactly, then loads the corresponding `du.toml` file to apply the colorization\n   rules. If it doesn’t find a direct match, it uses the specified `regexp` to check\n   the command. This means running `cshift -- /usr/bin/du` will also work as\n   expected.\n\n2. Next, create a TOML file in `~/.config/Chromashift/rules/`. The file name should\n   match what you specified in `config.toml`, in this case, `du.toml`:\n\n   ```sh\n   mkdir -p ~/.config/Chromashift/rules\n   touch ~/.config/Chromashift/rules/du.toml\n   ```\n\n3. For schema validation, add the following line to the top of your TOML file:\n\n   ```toml\n   \"$schema\" = '../rule.schema.json'\n   ```\n\n   This ensures that the rules you define will be validated according to the schema,\n   providing helpful feedback as you work on them.\n\n4. **How do rules work?**\n\n   Each rule is defined as an array block within the TOML file. Here's an example of\n   a rule for highlighting totals:\n\n   ```toml\n   [[rules]] # Total\n   regexp = '(.*)\\s+(total)$'\n   colors = ',bold yellow bgblue'\n   ```\n\n   In this example:\n   - `regexp` is the regular expression that matches the text you want to style.\n   - `colors` specifies the styles to apply. You can use multiple styles by\n     separating them with spaces (e.g., `bold yellow bgblue` applies bold yellow text\n     with a blue background).\n\n   If you want to apply different styles to different capture groups in your regex,\n   separate the styles with a comma (`,`).\n\n   ```toml\n   [[rules]] # Destination\n   regexp = '^\\[download\\] (Destination): (.*)'\n   colors = ',yellow,path'\n   ```\n\n   In this rule:\n   - The word \"Destination\" is colored yellow.\n   - The second group (anything that comes after \"Destination\") is colored using\n     path. The path is special color because it looks the file permission and your\n     `LS_COLORS` variable to style the selected group.\n\n5. **More Options:**\n   - `pty`: Executes the command inside a pseudo-terminal (pty).\n   - `stderr`: Colors the output of stderr instead of stdout.\n   - `rules.overwrite`: Overwrites a matching rule if another rule applies to the\n     current line.\n   - `rules.priority`: Sets the priority for a rule if multiple rules match a line.\n\n## Contributing Your Rule\n\nIf you want to share your rule with the community, add it to the official ChromaShift\nrepository. To do this:\n\n1. Copy your rule file to the repository’s `rules/` directory.\n2. Update the repository's `config.toml` accordingly.\n3. Submit a pull request.\n\nBy following these steps, you can easily create new colorization rules for any\ncommand!\n\n## LICENSE \u0026 CREDIT\n\nChromaShift is licensed under the [GNU-GPL-3](./LICENSE). Most of its features have\nbeen shamelessly stolen from [garabik/grc](https://github.com/garabik/grc).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnadim147c%2Fchromashift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnadim147c%2Fchromashift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnadim147c%2Fchromashift/lists"}