An open API service indexing awesome lists of open source software.

https://github.com/mainak55512/stto

Simple line of code counter written in Go
https://github.com/mainak55512/stto

cli cloc command-line command-line-tool community concurrency concurrent-programming go gocloc golang golang-application golang-library line-of-code linux loc open-source scc sloc tokei tui

Last synced: 8 months ago
JSON representation

Simple line of code counter written in Go

Awesome Lists containing this project

README

          

# STTO

Command-line utility written in Go to check total line of code in a file present in a directory.

## Authors

- [Mainak Bhattacharjee](https://github.com/mainak55512)

## Dependencies

- go 1.22.5
- github.com/mattn/go-runewidth v0.0.9
- github.com/olekukonko/tablewriter v0.0.5

## Benchmark

#### Benchmark was run on the clone of '[Redis](https://github.com/redis/redis)' repository

![Demo](./resources/benchmark.gif)

**N.B: stto is no way near the more established options like 'scc' or 'tokei' in terms of features. It is in early development stage and isn't production ready.

All the tools read over 1.5k files
![stto](./resources/stto_redis.png)
![scc](./resources/scc_redis.png)
![tokei](./resources/tokei_redis.png)

## Installation

Install using the following command for latest features
```bash
go install github.com/mainak55512/stto@latest
```
Alternatively you can use the optimized builds from the [release section](https://github.com/mainak55512/stto/releases)

N.B. Release builds are generally more optimized but lack latest features, 'go install' command is the prefered way to download the executable.

## Usage

Full usage details available in
```bash
stto --help
```

### Usage 1:
![stto_usage_1](./resources/stto_usage_1.png)

### Usage 2:
![stto_usage_2](./resources/stto_usage_2.png)

### Usage 3:
![stto_usage_3](./resources/stto_usage_3.png)

N.B. 'jproc' is a json query tool writtrn in javascript. For more details check out the [repo](https://github.com/mainak55512/JSONProcessor).

## 🚀 About Me
I'm a Tech enthusiast and a hobby programmer.
You can visit my [Github profile](https://github.com/mainak55512) to see my other works :)