Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rsookram/oktypes
oktypes is a command line tool that outputs the names of types defined in Kotlin source files
https://github.com/rsookram/oktypes
cli kotlin rust tree-sitter
Last synced: 18 days ago
JSON representation
oktypes is a command line tool that outputs the names of types defined in Kotlin source files
- Host: GitHub
- URL: https://github.com/rsookram/oktypes
- Owner: rsookram
- License: mit
- Archived: true
- Created: 2021-08-25T00:19:41.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-22T05:11:04.000Z (almost 3 years ago)
- Last Synced: 2024-07-30T20:56:10.146Z (3 months ago)
- Topics: cli, kotlin, rust, tree-sitter
- Language: Rust
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# oktypes
oktypes is a command line tool that outputs the names of types defined in Kotlin source files.
## Install
Currently, pre-compiled binaries of oktypes aren't being distributed. You can install it with
[Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html) by running```
cargo install --git https://github.com/rsookram/oktypes
```## Usage
Simply call `oktypes` from the command line and pass the paths of the Kotlin files to look at as
arguments.For example, if you want to see all the types defined in `*.kt` files in a git repository, you can
run:```shell
git ls-files '*.kt' | xargs oktypes
```## Build
oktypes can be built from source by cloning this repository and using Cargo.
```
git clone https://github.com/rsookram/oktypes
cd oktypes
cargo build --release
```## Dependencies
The following dependencies are used to implement oktypes:
- [`tree-sitter`](https://crates.io/crates/tree-sitter) to generate a parser for parsing Kotlin
source code.
- [`tree-sitter-kotlin`](https://github.com/rsookram/tree-sitter-kotlin) (my fork) to define the
tree-sitter grammar
- [`rayon`](https://crates.io/crates/rayon) to process input files in parallel