codeboost
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

codeboost logo

codeboost

Run Tests Codecov license
techdebt scrutinizer score

dependabot status Depfu

codeboost is a CLI tool and library that enables developers to automate common repository tasks such as updating dependencies, fixing linting errors, modifying READMEs, or adding new workflows.

Run these tasks across a single repository or multiple repositories at once with a single command.

Quick Start

npm install -g codeboost

codeboost init

Usage

You must initialize codeboost before you can run any boosts. You only need to run this command once to initialize the global configuration file:

codeboost init

Run a boost:

codeboost run -r <repository> <boost>

Run a boost on a batch of repositories:

codeboost run --batch repositories.json --size 3 <boost>

When running in batch mode, the --size option can be used to specify the number of repositories to process at once. The default is 1. The --batch option can be used to specify a JSON file containing an array of objects that have a name property that resolves to "owner/repo-name". The object can contain other attributes as well, but MUST contain the name property for batch mode to work correctly.

Example of a batch JSON file (repositories.json):

[
    {
        "name": "permafrost-dev/node-ray"
    },
    {
        "name": "permafrost-dev/vue-ray"
    },
    {
        "name": "permafrost-dev/alpinejs-ray"
    }
]

Configuration

To use the codeboost CLI, create a file named boost.config.js in your current working directory or run codeboost init to create a default configuration file.

This file should export a default configuration object with the following properties:

export interface AppSettings {
    github_token: string;
    repository_storage_path: string;
    boosts_path: string;
    use_forks: boolean;
    use_pull_requests: boolean;
    log_target: 'console' | 'file';
}

Example configuration file:

module.exports.default = {
    github_token: '$CODEBOOST_GITHUB_TOKEN',
    repository_storage_path: `${__dirname}/repositories`,
    boosts_path: `${__dirname}/boosts`,
    use_forks: true,
    use_pull_requests: true,
    log_target: 'console',
};

Note that the github_token property can be set to a string value or an environment variable name prefixed with a '$'. If the value is an environment variable name, the value of the environment variable will be used.

Development Setup

npm install

npm run dev

Testing

codeboost uses Jest for unit tests. To run the test suite:

npm run test


Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

Package Sidebar

Install

npm i codeboost

Weekly Downloads

25

Version

1.0.2

License

MIT

Unpacked Size

203 kB

Total Files

26

Last publish

Collaborators

  • patinthehat