npm package: @stepsbyai/cli
Description: Steps by AI CLI tool to create interaction graph from source
Author: https://github.com/steps-by-ai/
Latest version: 0.0.8

<div align="center">
  <div>
    <img src=".github/logo-grad.svg" alt="OpenCommit logo"/>
    <h1 align="center">Steps CLI</h1>
    <h1 align="center">by Steps By AI</h1>
  </div>
	<h2>CLI to create Interaction Graphs of your entire application</h2>
	<a href="https://www.npmjs.com/package/@steps-by-ai/cli"><img src="https://img.shields.io/npm/v/@steps-by-ai/cli" alt="Current version"></a>
</div>

---

<!-- <div align="center">
    <img src=".github/opencommit-example.png" alt="OpenCommit example"/>
</div> -->


## Setup

1. Install Steps globally to use in any repository:

   ```sh
   npm install -g @steps-by-ai/cli
   ```

<!-- TODO account login stuff
 2. Get your API key from [OpenAI](https://platform.openai.com/account/api-keys). Make sure you add payment details, so API works.

3. Set the key to OpenCommit config:

   ```sh
   opencommit config set OPENAI_API_KEY=<your_api_key>
   ```

   Your api key is stored locally in `~/.opencommit` config file. -->

## Usage

You can call OpenCommit directly to generate a commit message for your staged changes:

```sh
git add <files...>
steps
```

## Features

### Filetype support

To specify the files to look for components and pages:

```sh
# React components
oc config set filetypes=tsx,jsx

```
The default filetypes set is **tsx,jsx**  
<!-- TODO note on compatibility -->

### Internationalization support

To specify the language used to generate commit messages:

```sh
# de, German ,Deutsch
oc config set language=de
oc config set language=German
oc config set language=Deutsch

# fr, French, française
oc config set language=fr
oc config set language=French
oc config set language=française
```
The default language set is **English**  
All available languages are currently listed in the [i18n](https://github.com/di-sukharev/opencommit/tree/master/src/i18n) folder

### Ignore files
You can ignore files from submission to Steps By AI by creating a `.stepsignore` file. For example:

```ignorelang
path/to/large-asset.zip
**/*.jpg
```

This is useful for preventing opencommit from uploading artifacts and large files.

By default, steps ignores files matching: `out/**`, `dist/**`, `build/**`, `node_modules/**`, `*-lock.*` and `*.lock`

## Git hook

You can set OpenCommit as Git [`prepare-commit-msg`](https://git-scm.com/docs/githooks#_prepare_commit_msg) hook. Hook integrates with you IDE Source Control and allows you edit the message before commit.

To set the hook:

```sh
steps hook set
```

To unset the hook:

```sh
steps hook unset
```

To use the hook:

```sh
git add <files...>
git commit
```

Or follow the process of your IDE Source Control feature, when it calls `git commit` command — OpenCommit will integrate into the flow.

## Acknowledgements

We would like to express our gratitude to the dev at [OpenCommit](https://github.com/di-sukharev/opencommit) for providing inspiration for the structure and design of the CLI for this project. We appreciate their dedication to open-source software and their commitment to making development more accessible and enjoyable for everyone.