{"id":19457884,"url":"https://github.com/sharparam/facti","last_synced_at":"2025-04-25T05:31:25.560Z","repository":{"id":188040822,"uuid":"677293362","full_name":"Sharparam/facti","owner":"Sharparam","description":"Rust tool to interact with Factorio mods","archived":false,"fork":false,"pushed_at":"2025-01-13T20:22:57.000Z","size":546,"stargazers_count":1,"open_issues_count":7,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T03:42:31.309Z","etag":null,"topics":["cli","factorio","hacktoberfest","modding","rust","tool"],"latest_commit_sha":null,"homepage":"https://facti.rs/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sharparam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null},"funding":{"community_bridge":null,"github":["Sharparam"],"issuehunt":null,"ko_fi":"sharparam","liberapay":"Sharparam","open_collective":null,"otechie":null,"patreon":null,"tidelift":null,"custom":["https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026business=5SCGZ5FTAQM38\u0026currency_code=EUR"]}},"created_at":"2023-08-11T07:56:46.000Z","updated_at":"2024-10-22T15:59:26.000Z","dependencies_parsed_at":"2024-11-10T17:26:15.720Z","dependency_job_id":"f3bf544a-fca6-4873-b315-a470911fbbe4","html_url":"https://github.com/Sharparam/facti","commit_stats":null,"previous_names":["sharparam/facti"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sharparam%2Ffacti","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sharparam%2Ffacti/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sharparam%2Ffacti/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sharparam%2Ffacti/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sharparam","download_url":"https://codeload.github.com/Sharparam/facti/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250760816,"owners_count":21482873,"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":["cli","factorio","hacktoberfest","modding","rust","tool"],"created_at":"2024-11-10T17:24:27.073Z","updated_at":"2025-04-25T05:31:24.835Z","avatar_url":"https://github.com/Sharparam.png","language":"Rust","funding_links":["https://github.com/sponsors/Sharparam","https://ko-fi.com/sharparam","https://liberapay.com/Sharparam","https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026business=5SCGZ5FTAQM38\u0026currency_code=EUR"],"categories":[],"sub_categories":[],"readme":"# Facti \u0026ensp; [![crates.io][cratesio-badge]][cratesio] [![docs.rs][docsrs-badge]][docsrs] [![Build status][build-badge]][build] [![Audit status][audit-badge]][audit]\n\nA CLI tool to interact with [Factorio][factorio] [mods][factorio-mods] both locally and via the [API][factorio-api] and aid in mod development.\n\n\u003e [!IMPORTANT]\n\u003e\n\u003e Facti is in its early stages and very much a work in progress and highly\n\u003e experimental.\n\u003e\n\u003e Any commands and APIs are subject to change while it's still in pre-release.\n\nQuick links: [Installation](#installation) \u0026mdash; [Building](#building) \u0026mdash; [Usage](#usage) \u0026mdash; [Configuration](#configuration)\n\n## Contributing\n\n[![GitHub discussions][discussions-badge]][discussions] \u0026emsp; [![Matrix room][matrix-badge]][matrix-room]\n\nContributors are very welcome!\n\nIf you want to discuss the project you can do so in [the discussions on GitHub][discussions] or join the [Matrix room][matrix-room].\n\n## Installation\n\n### Cargo\n\nYou can install Facti using [`cargo binstall`][cargo-binstall]:\n\n```sh\ncargo binstall facti\n```\n\nThis will fetch and install binaries from [the latest release of Facti][latest-release]\nautomatically.\n\nIf you don't want to use `binstall` you can also use regular [`cargo install`][cargo-install]:\n\n```sh\ncargo install facti\n```\n\nWhich will download, compile, and install Facti from [crates.io][cratesio].\n\n[cargo-binstall]: https://github.com/cargo-bins/cargo-binstall\n[cargo-install]: https://doc.rust-lang.org/cargo/commands/cargo-install.html\n\n\u003c!--\n### Arch Linux\n\nFacti is available on the [AUR][aur] in different versions:\n\n * **[`facti`][aur-facti]:** *(Recommended)* Builds from source using the latest stable release.\n * **[`facti-bin`][aur-facti-bin]:** Installs the [latest stable pre-built binaries][latest-release].\n * **[`facti-git`][aur-facti-git]:** Builds from source using the latest commit on the [`main` branch][main].\n\nUse your favourite AUR helper to install it, for example:\n\n#### [aurutils][]\n\n```sh\naur sync facti\nsudo pacman -Syu facti\n```\n\n#### [paru][]\n\n```sh\nparu facti\n```\n\n#### [yay][]\n\n```sh\nyay facti\n```\n\n[aur]: https://aur.archlinux.org\n[aur-facti]: https://aur.archlinux.org/packages/facti\n[aur-facti-bin]: https://aur.archlinux.org/packages/facti-bin\n[aur-facti-git]: https://aur.archlinux.org/packages/facti-git\n[paru]: https://github.com/morganamilo/paru#readme\n[yay]: https://github.com/Jguer/yay#readme\n[aurutils]: https://github.com/AladW/aurutils#readme\n--\u003e\n\n### Pre-built binaries\n\nIf all else fails, you can manually download and use pre-built binaries from [the latest release of Facti][latest-release].\n\n## Building\n\nFacti is written in [Rust][], so you'll have to [install Rust][rust-install] to build it.\n\nAfter you have it set up, it's as simple as these steps:\n\n```sh\ngit clone https://github.com/Sharparam/facti.git\ncd facti\n\ncargo build --workspace --release\n# Or if you want all available features:\ncargo build --workspace --release --all-features\n\n# If you want to build just the facti binary:\ncargo build --package facti --release\n\n# The finished binary will be in target/release where you can run it directly:\n./target/release/facti --help\n\n# Or copy it somewhere like your local bin directory:\ncp target/release/facti ~/.local/bin\n```\n\n### Running tests\n\nFacti has several tests that can be run with [`cargo test`][cargo-test]:\n\n```sh\ncargo test --workspace --all-features\n```\n\n[cargo-test]: https://doc.rust-lang.org/cargo/commands/cargo-test.html\n\n### Features\n\nFacti has a few optional features that can be enabled when building, these are:\n\n * **`ron`:** Enables support for the [RON][] format when converting between formats.\n\n   E.g. `facti changelog convert --to ron changelog.txt` to convert a changelog to [RON][].\n\n * **`sexpr`:** Enables support for the [S-expression][sexpr] format when converting between formats.\n\n   E.g. `facti changelog convert --to sexpr changelog.txt` to convert a changelog to [S-expressions][sexpr].\n\n * **`yaml`:** Enables support for the [YAML][] format when converting between formats.\n\n   E.g. `facti changelog convert --to yaml changelog.txt` to convert a changelog to [YAML][].\n\n[ron]: https://github.com/ron-rs/ron#readme\n[sexpr]: https://en.wikipedia.org/wiki/S-expression\n[yaml]: https://yaml.org\n\n### Manpages\n\nYou can generate manpages for Facti using the `man` task in `xtask`:\n\n```sh\ncargo xtask man\n```\n\nThe finished manpages will be in `target/assets/man`.\n\n### Completions\n\nGenerating shell completions is done with the `facti` binary itself,\nand supports completions for [Bash][], [Zsh][], [fish][], [Elvish][], and [PowerShell][].\n\n```sh\nfacti completion bash\nfacti completion zsh\nfacti completion fish\nfacti completion elvish\nfacti completion powershell\n```\n\n[bash]: https://www.gnu.org/software/bash\n[zsh]: https://www.zsh.org\n[fish]: https://fishshell.com\n[elvish]: https://elv.sh\n[powershell]: https://docs.microsoft.com/en-us/powershell\n\n## Usage\n\nFor more help on the CLI commands, you can run `facti help \u003ccommand\u003e`\nor `facti \u003ccommand\u003e --help`.\n\n\u003e [!WARNING]\n\u003e\n\u003e Commands outlined here are still experimental and subject to change.\n\u003e Additionally, some commands may not have been implemented yet.\n\n### Expected mod layout\n\nThis tool expects your mod to be organized a certain way, as shown by the diagram below.\n\n(The `.git` folder is just to show where the root of the Git repo is.)\n\n```\nmy-mod/\n├── .git/\n└── src/\n    ├── locale/\n    │   └── en/\n    │       └── mod.cfg\n    ├── info.json\n    ├── changelog.txt\n    ├── control.lua\n    ├── data.lua\n    └── thumbnail.png\n```\n\n### Create new mod\n\nFacti can bootstrap a new mod for you, placing some placeholder files and\nsetting up the expected folder structure:\n\n```sh\nfacti new [mod-name]\n```\n\nWhen invoked without a name, it will set it up in the current directory,\nif it is empty, using the directory name as the mod name.\n\n### Packaging\n\nYou can use facti to package your mod for distribution to the mod portal\n(or elsewhere) by using `facti pack`:\n\n```sh\nfacti pack\n```\n\nIf this command is used inside a Git repo, it will check to make sure the\nproject layout matches the one describes under [Expected mod layout](#expected-mod-layout).\n\nIf the current directory is not a Git repo, but contains an `info.json` file,\nit will treat that as the mod directory.\n\nTo override the mod directory, pass it as an argument to `pack`:\n\n```sh\nfacti pack cool/path/to/mod\n```\n\nPassing an explicit directory will disable Git repository detection and fail\nif the specified directory does not contain an `info.json` file.\n\n### Mod Portal\n\nYou can interact with the [Factorio mod portal][factorio-mods] via facti by using the `facti portal` command.\n\nHere are some examples:\n\n```sh\n# Search for mods that match the name \"cybersyn-combinator\"\nfacti portal search cybersyn-combinator\n\n# Show information about the cybersyn-combinator mod\nfacti portal show cybersyn-combinator\n\n# Show more detailed information about the cybersyn-combinator mod\nfacti portal show --full cybersyn-combinator\n\n# By default, deprecated mods are excluded from search\n# if you want to show them you have to specify the --deprecated flag\nfacti portal search --deprecated\n\n# You can enable JSON output by supplying the --json flag.\n# In a non-interactive context, this is the default\n# and can be negated with --no-json\nfacti portal --json show --full cybersyn-combinator\n\n# Checks if all listed mods are compatible with each other.\n# Currently this just makes sure none of the mods have each other listed\n# as \"incompatible\"\nfacti portal check cybersyn-combinator cybersyn\n\n# By default the above command will check against the latest version of each\n# mod, to check a specific version you can include a version requirement\nfacti portal check cybersyn-combinator@0.6.0 cybersyn@1.0.2\n```\n\n## Configuration\n\nSome commands like uploading mod packages to the mod portal require the use\nof an API key.\n\nTo obtain this, you must generate an API key on your [Factorio profile page][factorio-profile].\n\n\u003e [!IMPORTANT]\n\u003e\n\u003e Your API key is *highly sensitive*, do not store it anywhere other people than\n\u003e you might get access to it.\n\u003e\n\u003e Facti maintainers will **NEVER** ask for your API key.\n\u003e\n\u003e Anyone who gets access to your API key can publish and/or modify your mods\n\u003e without your approval, depending on the permissions on the key.\n\nTo make use of all features in facti, you must enable all three usage checkboxes:\n\n * ModPortal: Upload Mods\n * ModPortal: Publish Mods\n * ModPortal: Edit Mods\n\nOf course, if you know you will not use some of these, you can disable them\nto avoid granting more permissions than necessary.\n\nYou can either provide the API key with every invocation of facti like so:\n\n```sh\n# Directly as a parameter\nfacti --api-key \u003cyour-api-key\u003e ...\n\n# from stdin to avoid it showing up in shell history\n$ facti --api-key-stdin ...\nPlease input your Factorio API key to continue:\n\u003e\n\n# read it from a file\n$ facti --api-key-file \u003cpath-to-file\u003e ...\n```\n\nOr save it in facti's configuration file:\n\n```toml\n[factorio]\napi-key = \"\u003cyour-api-key\u003e\"\n```\n\nfacti will look for its configuration file in the following places and in this\norder:\n\n 1. `$XDG_CONFIG_HOME/facti/config.toml`\n 2. `$HOME/.config/facti/config.toml`\n\nYou can manually specify the location of the config file when invoking facti:\n\n```sh\nfacti --config \u003cpath-to-config-file\u003e ...\n```\n\nYou can also supply the API key via environment variables:\n\n```sh\nexport FACTI_FACTORIO_API_KEY=\"\u003cyour-api-key\u003e\"\nfacti ...\n```\n\nAs well as the path to the config file:\n\n```sh\nexport FACTI_CONFIG=\"\u003cpath-to-config-file\u003e\"\nfacti ...\n```\n\n### Configuration hierarchy\n\nAs a rule, the most \"direct\" application of a setting is the one that will be in\neffect.\n\nEssentially, this means settings are resolved in this order:\n\n 1. Command line arguments\n 2. Environment variables\n 3. Configuration file\n\nThe first one encountered \"wins\".\n\n\nFor API keys specifially, there is also a priority within the different ways to\nsupply it:\n\n 1. Direct value\n\n     * `--api-key` command line option\n     * `FACTI_FACTORIO_API_KEY` environment variable\n     * `api-key` setting in config file\n  2. From standard input (stdin) with `--api-key-stdin`\n  3. From file\n\n      * `--api-key-file` command line option\n      * `FACTI_FACTORIO_API_KEY_FILE` environment variable\n      * `api-key-file` setting in config file\n\nThe first one encountered wins, with respect to the primary hierarchy of\nCLI arguments vs environment variables vs config file.\n\nFor example: If your config file has a value for `api-key`, and\nthe environment variable `FACTI_FACTORIO_API_KEY_FILE` is set,\nand you also specify `--api-key-stdin`, then the stdin method will win,\nbecause it was specified via command line argument, which is in the top primary\npriority.\n\n\n## License\n\nCopyright © 2023 by [Adam Hellberg][sharparam].\n\nThis Source Code Form is subject to the terms of the\n[Mozilla Public License, v. 2.0][mpl-2.0].\nIf a copy of the MPL was not distributed with this file,\nYou can obtain one at \u003chttp://mozilla.org/MPL/2.0/\u003e.\n\n[sharparam]: https://sharparam.com\n[mpl-2.0]: http://mozilla.org/MPL/2.0/\n\n[cratesio]: https://crates.io/crates/facti\n[librs]: https://lib.rs/crates/facti\n[docsrs]: https://docs.rs/facti\n[cratesio-badge]: https://img.shields.io/crates/v/facti?logo=rust\n[docsrs-badge]: https://img.shields.io/docsrs/facti/latest?logo=docsdotrs\n\n[build]: https://github.com/Sharparam/facti/actions/workflows/test.yml?query=branch%3Amain\n[audit]: https://github.com/Sharparam/facti/actions/workflows/audit.yml?query=branch%3Amain\n[build-badge]: https://img.shields.io/github/actions/workflow/status/Sharparam/facti/test.yml?logo=github\n[audit-badge]: https://img.shields.io/github/actions/workflow/status/Sharparam/facti/audit.yml?logo=github\u0026label=audit\n\n[discussions]: https://github.com/Sharparam/facti/discussions\n[matrix-room]: https://matrix.to/#/#facti:sharparam.com\n[discussions-badge]: https://img.shields.io/github/discussions/Sharparam/facti?logo=github\n[matrix-badge]: https://img.shields.io/matrix/facti%3Asharparam.com?logo=matrix\u0026label=%23facti%3Asharparam.com\n\n[main]: https://github.com/Sharparam/facti/tree/main\n[latest-release]: https://github.com/Sharparam/facti/releases/latest\n\n[rust]: https://www.rust-lang.org\n[rust-install]: https://www.rust-lang.org/tools/install\n\n[factorio]: https://factorio.com\n[factorio-api]: https://wiki.factorio.com/Factorio_HTTP_API_usage_guidelines\n[factorio-mods]: https://mods.factorio.com/\n[factorio-profile]: https://factorio.com/profile\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharparam%2Ffacti","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsharparam%2Ffacti","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharparam%2Ffacti/lists"}