{"id":19418971,"url":"https://github.com/playform/maintain","last_synced_at":"2026-01-12T07:17:46.875Z","repository":{"id":221505765,"uuid":"754374756","full_name":"PlayForm/Maintain","owner":"PlayForm","description":"🔧 Maintain —","archived":false,"fork":false,"pushed_at":"2024-10-29T23:04:13.000Z","size":1451,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"Current","last_synced_at":"2024-10-30T01:47:13.670Z","etag":null,"topics":["git","github","maintain","playform","repository","workflow"],"latest_commit_sha":null,"homepage":"https://NPMJS.Org/@playform/maintain","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PlayForm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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},"funding":{"open_collective":"playform-cloud-collective"}},"created_at":"2024-02-07T23:15:17.000Z","updated_at":"2024-10-29T23:04:17.000Z","dependencies_parsed_at":"2024-03-17T11:29:21.348Z","dependency_job_id":"f099123b-4812-40f2-9d6b-84ddc39b68bb","html_url":"https://github.com/PlayForm/Maintain","commit_stats":null,"previous_names":["yesmaintain/npmscript","yesmaintain/npmcli","playform/maintain"],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PlayForm%2FMaintain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PlayForm%2FMaintain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PlayForm%2FMaintain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PlayForm%2FMaintain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PlayForm","download_url":"https://codeload.github.com/PlayForm/Maintain/tar.gz/refs/heads/Current","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223954708,"owners_count":17231189,"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":["git","github","maintain","playform","repository","workflow"],"created_at":"2024-11-10T13:15:45.297Z","updated_at":"2026-01-12T07:17:46.868Z","avatar_url":"https://github.com/PlayForm.png","language":"TypeScript","readme":"# [Maintain] 🔧\n\nMaintain GitHub repositories and automate common tasks related to project\nupkeep, CI/CD workflows, and dependency management.\n\n## Installation 🚀\n\nUsing NPM\n\n```sh\nnpm install -g @playform/maintain\n```\n\nUsing Yarn\n\n```sh\nyarn global add @playform/maintain\n```\n\nUsing PNPM\n\n```sh\npnpm install -g @playform/maintain\n```\n\nor direct usage:\n\nUsing NPM\n\n```sh\nnpx @playform/maintain \u003c Command \u003e [Arguments...]\n```\n\nUsing Yarn\n\n```sh\nyarn @playform/maintain \u003c Command \u003e [Arguments...]\n```\n\nUsing PNPM\n\n```sh\npnpx @playform/maintain \u003c Command \u003e [Arguments...]\n```\n\n## CLI Usage:\n\nThe CLI is invoked using the `Maintain` command, followed by a specific\nsubcommand.\n\n```sh\nMaintain \u003c Command \u003e [Arguments...]\n```\n\n### Commands:\n\n**`Clean [Repositories...]`**\n\nDeletes GitHub Actions workflow runs, their logs, and actions caches for\nspecified repositories. If no repositories are listed, it attempts to clean all\nrepositories accessible to the configured user.\n\n- **Arguments:**\n    - `[Repositories...]`: (Optional) A list of repository names to clean.\n- **Example:**\n    ```sh\n    Maintain Clean MyRepo AnotherRepo\n    Maintain Clean # Cleans all accessible repositories\n    ```\n\n**`Dependabot`**\n\nScans project directories (identified by various package manifest files like\n`package.json`, `Cargo.toml`, etc.) and generates/updates\n`.github/dependabot.yml` configuration files. It also creates a supporting\n`.github/workflows/Dependabot.yml` GitHub Actions workflow. This helps in\nkeeping project dependencies up-to-date automatically.\n\n- **Example:**\n    ```sh\n    Maintain Dependabot\n    ```\n\n**`Dispatch [Repositories...]`**\n\nTriggers `workflow_dispatch` events for all workflows found in the specified\nrepositories. If no repositories are listed, it attempts to dispatch events for\nall repositories accessible to the configured user. The dispatch is triggered on\na ref named \"Current\".\n\n- **Arguments:**\n    - `[Repositories...]`: (Optional) A list of repository names to dispatch\n      workflow events for.\n- **Example:**\n    ```sh\n    Maintain Dispatch MyRepo AnotherRepo\n    Maintain Dispatch # Dispatches for all accessible repositories\n    ```\n\n**`Edit [Repositories...]`**\n\nConfigures a wide range of settings for your GitHub organizations and\nrepositories. This includes enabling vulnerability alerts, automated security\nfixes, adjusting merge strategies (e.g., allow squash merge, auto-merge, delete\nbranch on merge), fork settings, requiring web commit signoffs, and setting\ndefault permissions for GitHub Actions at both repository and organization\nlevels. Applies to specified repositories or all accessible ones.\n\n- **Arguments:**\n    - `[Repositories...]`: (Optional) A list of repository names to edit.\n- **Example:**\n    ```sh\n    Maintain Edit MyRepo AnotherRepo\n    Maintain Edit # Edits settings for all accessible repositories and organizations\n    ```\n\n**`Node`**\n\nGenerates or updates a `.github/workflows/Node.yml` GitHub Actions workflow for\nprojects using Node.js (identified by `package.json` files). The workflow\nconfigures Node.js, installs dependencies using `pnpm` (with caching for\n`pnpm-lock.yaml`), and includes steps for common npm scripts like `build`,\n`test`, and `prepublishOnly`. Build artifacts from `./Target` (if a build script\nis present) are uploaded.\n\n- **Example:**\n    ```sh\n    Maintain Node\n    ```\n\n**`Cloudflare`**\n\nGenerates or updates a `.github/workflows/Cloudflare.yml` GitHub Actions\nworkflow for projects intended for Cloudflare deployment (identified by\n`wrangler.toml` files). It sets up the `cloudflare/wrangler-action` for\ndeployments.\n\n- **Example:**\n    ```sh\n    Maintain Cloudflare\n    ```\n\n**`NPM`**\n\nGenerates or updates a `.github/workflows/NPM.yml` GitHub Actions workflow for\nNode.js projects that publish packages to NPM. If `build`, `prepublishOnly`, or\n`Build` scripts are found in `package.json`, it adds steps to publish the\npackage using `npm publish --legacy-peer-deps --ignore-scripts`.\n\n- **Example:**\n    ```sh\n    Maintain NPM\n    ```\n\n**`Rust`**\n\nGenerates or updates a `.github/workflows/Rust.yml` GitHub Actions workflow for\nRust projects (identified by `Cargo.toml` files). The workflow includes steps\nfor caching Cargo dependencies and building the project in release mode\n(`cargo build --release --all-features`).\n\n- **Example:**\n    ```sh\n    Maintain Rust\n    ```\n\n**`GitHub`**\n\nGenerates or updates a generic `.github/workflows/GitHub.yml` GitHub Actions\nworkflow. This workflow can be used for general CI purposes across your\nrepositories.\n\n- **Example:**\n    ```sh\n    Maintain GitHub\n    ```\n\n**`Workflow`**\n\nA meta-command that executes all individual workflow generation commands:\n`Dependabot`, `Node`, `Cloudflare`, `NPM`, `Rust`, and `GitHub`. This is useful\nfor setting up all standard workflows in a project.\n\n- **Example:**\n    ```sh\n    Maintain Workflow\n    ```\n\n**`Star`**\n\nScans all `package.json` files found within the `Base` directory (see `.env`\nconfiguration), extracts all NPM dependencies (both `dependencies` and\n`devDependencies`), and attempts to star their corresponding GitHub\nrepositories.\n\n- **Example:**\n    ```sh\n    Maintain Star\n    ```\n\n**`Complexity [files...]`** Scans specified files or project directories and\nlogs package file information. (Note: Advanced complexity analysis features may\nbe under development, current primary function is discovery and logging of\nproject structure related to package files).\n\n- **Arguments:**\n    - `[files...]`: (Optional) A list of files or globs to scan.\n- **Example:**\n    ```sh\n    Maintain Complexity \"src/**/*.ts\"\n    Maintain Complexity # Scans based on located package files\n    ```\n\n## .env Configuration\n\nCreate a `.env` file in the root directory where you run `Maintain` or ensure\nthese environment variables are set:\n\n```sh\n# Your GitHub username.\n# Used by: Clean, Dispatch, Edit.\nUser=\"YourGitHubUsername\"\n\n# The base directory for operations like scanning for package.json files.\n# Defaults to the current working directory.\n# Used by: Star, and all workflow generation commands (Dependabot, Node, Cloudflare, NPM, Rust, GitHub, Complexity).\nBase=\"/path/to/your/projects_root_or_monorepo_root\"\n\n# Your GitHub Personal Access Token (PAT) with appropriate permissions.\n# (e.g., repo, workflow, admin:org for organization edits).\n# Used by: Clean, Dispatch, Edit, Star.\nToken=\"YourGitHubPAT\"\n```\n\n## Links\n\n- **Project Repository:** [Maintain]\n- **NPM Package:** [@playform/maintain]\n\n[Maintain]: https://GitHub.Com/PlayForm/Maintain.git\n[@playform/maintain]: https://www.npmjs.com/package/@playform/maintain\n","funding_links":["https://opencollective.com/playform-cloud-collective"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplayform%2Fmaintain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplayform%2Fmaintain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplayform%2Fmaintain/lists"}