{"id":23186637,"url":"https://github.com/imlymei/foji","last_synced_at":"2026-02-17T22:02:10.429Z","repository":{"id":241369437,"uuid":"804606358","full_name":"imLymei/foji","owner":"imLymei","description":"⚒ Forge your code in a new way","archived":false,"fork":false,"pushed_at":"2024-10-04T20:46:14.000Z","size":161,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-27T19:51:31.093Z","etag":null,"topics":["automation","cli","cloud-sync","commands","developer-tools","local-first","nodejs","open-source","productivity","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/imLymei.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-05-22T23:07:56.000Z","updated_at":"2024-10-04T20:44:25.000Z","dependencies_parsed_at":"2025-08-18T16:43:29.747Z","dependency_job_id":null,"html_url":"https://github.com/imLymei/foji","commit_stats":null,"previous_names":["imlymei/foji"],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/imLymei/foji","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imLymei%2Ffoji","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imLymei%2Ffoji/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imLymei%2Ffoji/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imLymei%2Ffoji/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imLymei","download_url":"https://codeload.github.com/imLymei/foji/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imLymei%2Ffoji/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29559961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T21:50:49.831Z","status":"ssl_error","status_checked_at":"2026-02-17T21:46:15.313Z","response_time":100,"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":["automation","cli","cloud-sync","commands","developer-tools","local-first","nodejs","open-source","productivity","typescript"],"created_at":"2024-12-18T10:17:01.203Z","updated_at":"2026-02-17T22:02:10.412Z","avatar_url":"https://github.com/imLymei.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Foji ⚒️\n\nFoji is a powerful command-line interface (CLI) tool designed to streamline and automate long or repetitive commands in your daily workflow. With Foji, you can define and execute custom commands, integrate custom parameters, and simplify complex processes, reducing the need to repeatedly type lengthy commands.\n\n## 🚀 Features\n\n- [x] Run custom commands with flexible argument handling.\n- [x] Supports options, conditional, and spread arguments for advanced customization.\n- [x] Easily add, edit and remove commands in the CLI.\n- [x] Sync configuration to the cloud.\n\n## 📦 Installation\n\n\u003e [!IMPORTANT]\n\u003e Foji requires [Node.js](https://nodejs.org/) to be installed on your system. Make sure you have it installed before proceeding.\n\nTo install Foji, run the following command:\n\n```bash\nnpm i foji -g\n```\n\n## 🚦 Usage\n\nFoji stores your commands and configurations in its configuration file (`~/.config/foji.json`). You can access it using:\n\n```bash\nfoji config\n```\n\nOr open it directly:\n\n```bash\nfoji config -f\n```\n\n### Running a Command\n\nTo execute a saved `command`:\n\n```bash\nfoji [command name] [...command args]\n```\n\n\u003e [!TIP]\n\u003e If you don’t provide a valid command name, Foji will list all available commands, including default commands like `add`, `remove`, and `sync`, along with any custom commands you've added.\n\n### Skipping an Argument\n\nIf you want to skip an optional argument, use the `_` symbol:\n\n```bash\nfoji [command name] [arg1] _ [arg3]\n```\n\n## ⚙️ Configuration Management\n\nFoji allows you to easily create and update your command configurations.\n\n### Adding a New Command\n\nTo add a new command to the configuration:\n\n```bash\nfoji add [command name] [command]\n```\n\nSupported argument types:\n\n1. **Required Arguments**:  \n   These arguments **must** be provided for the command to run.\n\n   ```json\n   \"command\": \"echo \u003crequiredArgumentOne\u003e \u003crequiredArgumentTwo\u003e\"\n   ```\n\n2. **Optional Arguments**:  \n   These arguments **are not mandatory**. If not provided, they will be skipped.\n\n   ```json\n   \"command\": \"echo \u003crequiredArgumentOne\u003e \u003coptionalArgumentOne?\u003e\"\n   ```\n\n3. **Optional Arguments with Default Values**:  \n   If not provided, a default value will be used.\n\n   ```json\n   \"command\": \"echo \u003crequiredArgumentOne\u003e \u003coptionalArgumentOne ?? My Default Value\u003e\"\n   ```\n\n4. **Ternary Arguments**:  \n   Works as a boolean argument, only checking whether it was passed.\n\n   ```json\n   \"command\": \"echo i want pizza of \u003crequiredArgumentOne\u003e with \u003chasCheese ? cheese : no cheese\u003e\"\n   ```\n\n5. **Spread Argument**:  \n   Catches all the remaining arguments.\n\n   ```json\n   \"command\": \"echo [\u003cargOne\u003e] {\u003cargTwo...\u003e}\"\n   ```\n\nExample of usage:\n\n```bash\nfoji command \"my arg one\" one two three --my --options\n```\n\nThe resulting final command would be:\n\n```bash\necho [my arg one] {one two three --my --options}\n```\n\n\u003e [!IMPORTANT]  \n\u003e **Always** provide required arguments **before** any optional ones.\n\n### Removing a Command\n\nTo remove a command:\n\n```bash\nfoji remove [command name]\n```\n\n## 🌐 Cloud Sync\n\nYou can easily sync your configurations using cloud services.\n\n\u003e [!NOTE]\n\u003e Foji uses [Github CLI](https://cli.github.com/) to create, read and update your configuration gist.\n\n### Upload Configuration\n\nTo upload your configuration to a gist (or create a new gist if one doesn’t exist):\n\n```bash\nfoji upload\n```\n\n### Download Configuration\n\nTo download a configuration file from a gist:\n\n```bash\nfoji download [gist url]\n```\n\n### Sync Configuration\n\nTo sync your local configuration with its URL:\n\n```bash\nfoji sync\n```\n\n\u003e [!CAUTION]\n\u003e Be careful when syncing from external sources. Always verify the origin of the gist to avoid overriding your custom commands.\n\n## 🛠️ Development\n\nIf you want to contribute or customize Foji, follow these steps:\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/imLymei/foji.git\n   cd foji\n   ```\n\n2. Install dependencies:\n\n   ```bash\n   npm install\n   ```\n\n3. Build the project:\n\n   ```bash\n   npm run build:local\n   ```\n\n## 📜 Credits\n\nThis project makes use of several open-source libraries and tools. Special thanks to the following:\n\n- [TypeScript](https://www.typescriptlang.org/) - Type-safe JavaScript.\n- [Commander](https://www.npmjs.com/package/commander) - CLI framework.\n- [@inquirer/prompts](https://www.npmjs.com/package/@inquirer/prompts) - Command-line prompts.\n- [semantic-release](https://www.npmjs.com/package/semantic-release) - Automates versioning and package publishing.\n- [fast-levenshtein](https://www.npmjs.com/package/fast-levenshtein) - Fast string distance algorithm.\n\n## 📄 License\n\nFoji is licensed under the MIT License.\n\nSee the [LICENSE](https://github.com/imLymei/foji/blob/master/LICENSE) file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimlymei%2Ffoji","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimlymei%2Ffoji","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimlymei%2Ffoji/lists"}