# fark

> A command line tool to work with the mess that is your projects folder.

Latest version **1.1.7** (published 2021-07-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install fark
pnpm add fark
yarn add fark
bun add fark
```

Provides the command `fark`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.7 |
| Published | 2021-07-13 |
| First published | 2018-03-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 52.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | wvbe |
| Maintainers | wvbe |
| Keywords | git, list, cli, repository, management |

## Links

- npm: https://www.npmjs.com/package/fark
- Repository: https://github.com/wvbe/fark
- Homepage: https://github.com/wvbe/fark#readme
- Issues: https://github.com/wvbe/fark/issues
- npm.io page: https://npm.io/package/fark

## Dependencies (7)

- [gauge](https://npm.io/package/gauge.md) ^2.7.4
- [table](https://npm.io/package/table.md) ^4.0.3
- [semver](https://npm.io/package/semver.md) ^5.5.0
- [ask-nicely](https://npm.io/package/ask-nicely.md) ^3.0.1
- [multi-glob](https://npm.io/package/multi-glob.md) ^1.0.1
- [cross-spawn](https://npm.io/package/cross-spawn.md) ^6.0.5
- [string-similarity](https://npm.io/package/string-similarity.md) ^3.0.0

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.1.7 (latest) — 2021-07-13
- 1.1.6 — 2021-06-30
- 1.1.5 — 2019-01-09
- 1.1.4 — 2018-12-17
- 1.1.3 — 2018-09-14
- 1.1.2 — 2018-06-22
- 1.1.1 — 2018-06-07
- 1.1.0 — 2018-05-23
- 1.0.2 — 2018-05-16
- 1.0.1 — 2018-05-14
- 1.0.0 — 2018-04-12
- 0.0.1 — 2018-03-15

## README

# fark

**A command line tool to work with the mess that is your projects folder.**

You would `fark` by typing in your terminal, for example:

```sh
# Lists all your projects
/home/wvbe/projects> fark

# Lists all projects that have uncommitted changes
/home/wvbe/projects> fark -f status:dirty

# Pull-rebase all projects that have a clean git state
/home/wvbe/projects> fark -f status:clean -$ git pull -r

# Create an npm package out of every project that isn't already
/home/wvbe/projects> fark -f ~has-file:package.json -$ npm init --yes
```

The power of `fark` lies in combining small easy to use filters (`-f`) with column output (`-c`) or a shell command you
want to repeat over the results (`-$`, `--run`).

- Filters narrow down the scope of projects that are logged back to you, or used for `--run`.
- Columns simply log more stuff in an invention called "table".
- Run a command to gain additional skill points in crafting unicorn blockchain hacks. Use responsibly.

Output of `fark` could be something like:

```sh
/home/wvbe/projects> fark --filters is-npm --columns name npm-prop:version is-git status is-git-ahead
╔══════════════╤═════════════╤════════╤════════╤══════════════╗
║ name         │ npm-prop    │ is-git │ status │ is-git-ahead ║
╟──────────────┼─────────────┼────────┼────────┼──────────────╢
║ ask-nicely   │ 3.0.1       │ yes    │        │ no           ║
║ fark         │ 1.0.2       │ yes    │ M      │ no           ║
║ luggage      │ 1.0.0       │ yes    │        │ no           ║
║ oxee         │ 4.0.0-alpha │ yes    │ UDM    │ no           ║
║ poseidon     │ 0.1.0       │ yes    │        │ no           ║
║ react-world  │ 0.1.0       │ yes    │ UDM    │ no           ║
║ wyb.be       │ 0.1.0       │ yes    │ UDM    │ no           ║
║ xml-renderer │ 1.2.0       │ yes    │ UADM   │ no           ║
╟──────────────┼─────────────┼────────┼────────┼──────────────╢
║ name         │ npm-prop    │ is-git │ status │ is-git-ahead ║
╚══════════════╧═════════════╧════════╧════════╧══════════════╝

Directories:  8
Filters:      is-npm
Props:        name, npm-prop, is-git, status, is-git-ahead
Time:         217ms

# If you use --run, the execution results for each project listed above are shown here
```

## Install

```sh
npm install fark -g
```

## Extending

Building an Informer is pretty easy, see any of the informers in the `api/` directory. You can make `fark` load
additional informers by creating a directory `.fark` in your home folder, and in it a file called `myInformer.js` (or
something that matches `*Informer.js`). Feel free to `npm install` additional stuff that you need.

# Help

Type `fark -h` in your terminal to get the following summary of options, columns and filters you have available. If you
have any custom informers, they will be included too. An installation of `fark` that is not extended includes the
the following:

<!-- Start of autogenerated README -->

## Options

| short | long         | description                                                                                                                     | required |
|-------|--------------|---------------------------------------------------------------------------------------------------------------------------------|----------|
| -c    | --columns    | Additional properties to show for each directory, see also the available Columns.                                               | no       |
| -C    | --concurrent | The amount of execution tasks to perform concurrently                                                                           | no       |
| -f    | --filters    | Show only results that match all given Filters. Use "~" to invert the filter response, and ":" for additional filter arguments. | no       |
| -g    | --glob       | Globbing pattern(s) for finding your projects. Defaults to "*".                                                                 | no       |
| -h    | --help       | Shows you this help page                                                                                                        | no       |
| -W    | --nowrap     | Do not stretch or shrink the results table to terminal width                                                                    | no       |
| -$    | --run        | Run this command in every result directory                                                                                      | no       |
| -s    | --sort       | Sort on this column. Use the negation character ("~") to inversely sort. Defaults to the first column.                          | no       |
| -v    | --version    | Gives the fark version                                                                                                          | no       |

## Columns

| name              | description                                                                                           |
|-------------------|-------------------------------------------------------------------------------------------------------|
| accessed          | The last time this file was accessed                                                                  |
| changed           | The last time the file status was changed                                                             |
| git-branch        | The branch name that is currently checked out                                                         |
| git-remote-names  | The names of repository git remotes                                                                   |
| git-remote-url    | The URL of a specific git remote                                                                      |
| git-remote-urls   | The URLs of repository git remotes                                                                    |
| has-addition      | Wether the repository has any, or a file $1 marked as addition                                        |
| has-branch        | Assert wether $1 is a branch on the local machine or any of the remotes                               |
| has-deletion      | Wether the repository has any, or a file $1 marked as deletion                                        |
| has-file          | Assert wether file $1 exists                                                                          |
| has-local-branch  | Assert wether $1 is a branch on the local machine                                                     |
| has-modification  | Wether the repository has any, or a file $1 marked as modification                                    |
| has-npm-keyword   | The package has been labelled with keyword $1                                                         |
| has-npm-script    | The package has an npm script called $1                                                               |
| has-remote-branch | Assert wether $1 is a branch on any of the remotes, or on remote $2 if the second argument is used.   |
| has-unstaged      | Wether the repository has any, or a file $1 marked as unstaged                                        |
| is-git            | This is a git versioned repository                                                                    |
| is-git-ahead      | The repository has a commit that has not been pushed to remote.                                       |
| is-git-behind     | The remote has a commit that has not been pulled.                                                     |
| is-link           | Symbolic link, or no                                                                                  |
| is-npm            | This is an npm package                                                                                |
| is-npm-private    | Is this a private package                                                                             |
| modified          | The last time this file was modified                                                                  |
| name              | The directory name                                                                                    |
| name-ends-with    | Only repositories whose directory ends with $1                                                        |
| name-starts-with  | Only repositories whose directory starts with $1                                                      |
| npm-prop          | Property $1 of package.json                                                                           |
| path              | The full path to repo                                                                                 |
| path-contains     | Only repositories whose full path contains $1                                                         |
| remote-status     | The number of commits ahead and behind on the tracked remote branch                                   |
| status            | Clean status, or any combination of (U) unstaged, (A) additions, (M) modifications and (D) deletions. |

## Filters

| name              | description                                                                                         |
|-------------------|-----------------------------------------------------------------------------------------------------|
| has-addition      | Wether the repository has any, or a file $1 marked as addition                                      |
| has-branch        | Assert wether $1 is a branch on the local machine or any of the remotes                             |
| has-deletion      | Wether the repository has any, or a file $1 marked as deletion                                      |
| has-file          | Assert wether file $1 exists                                                                        |
| has-local-branch  | Assert wether $1 is a branch on the local machine                                                   |
| has-modification  | Wether the repository has any, or a file $1 marked as modification                                  |
| has-npm-keyword   | The package has been labelled with keyword $1                                                       |
| has-npm-script    | The package has an npm script called $1                                                             |
| has-remote-branch | Assert wether $1 is a branch on any of the remotes, or on remote $2 if the second argument is used. |
| has-unstaged      | Wether the repository has any, or a file $1 marked as unstaged                                      |
| is-git            | This is a git versioned repository                                                                  |
| is-git-ahead      | The repository has a commit that has not been pushed to remote.                                     |
| is-git-behind     | The remote has a commit that has not been pulled.                                                   |
| is-link           | Symbolic link, or no                                                                                |
| is-npm            | This is an npm package                                                                              |
| is-npm-private    | Is this a private package                                                                           |
| name-ends-with    | Only repositories whose directory ends with $1                                                      |
| name-starts-with  | Only repositories whose directory starts with $1                                                    |
| path-contains     | Only repositories whose full path contains $1                                                       |
| status            | filter by clean, dirty, or any combination of U (unstaged), A (added), M (modded) or D (deleted)    |

---
_Source: https://npm.io/package/fark · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
