git-log-to-elasticsearch
Version, currently main branch1 version
- main branchlatestJun 23, 2021
github.com/spinscale/git-log-to-elasticsearch
A CLI tool to index git repository metadata into Elasticsearch
2 stars
0 dependents
License: Apache-2.0
Installation
# Add this to your shard.yml
dependencies:
git-log-to-elasticsearch:
github: spinscale/git-log-to-elasticsearch
branch: mainmain is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
1.0.0- Author
- Alexander Reelsen
- Target
git-log-to-elasticsearchfrom src/git-log-to-elasticsearch.cr
Dependencies
Runtime Dependencies
- git*github: smacker/libgit2.cr, branch: master
- progress_bar.cr*github: tpei/progress_bar.cr, branch: master
README
git-log-to-elasticsearch
Usage
Make sure crystal is installed (tested with Crystal 1.0.0)
shards update --ignore-crystal-version
shards build --production --release
# this only imports the main branch
./bin/git-log-to-elasticsearch -v -b '^origin/main$' \
-n 'org/my-repo-name' v ~/path/to/repo
Possible arguments:
--host=URL: Target URL to index into, defaulthttp://localhost:9200-b regex, --branch=regex: specifies the branches to import as regex, default.*(all branches)-u, --user=user:pass: basic auth info-n NAME, --name=NAME: specifies the repo name, i.e.elastic/elasticsearch-v, --verbose: Verbose output-d, --dry-run: Don't index into Elasticsearch, exit before
Sample run to index only the master branch data of my local Elasticsearch repo in one of my Elastic Cloud clusters
./bin/git-log-to-elasticsearch -b '^origin/master$' -n 'elastic/elasticsearch' \
--host https://my-cloud-cluster.es.europe-west3.gcp.cloud.es.io:9243 \
-u elastic:$PASS ~/devel/elasticsearch/
This takes a couple of minutes. I have not yet taken the time to parallelize this using fibers and multi threading. Feel free to send a PR.
Contributing
- Fork it (https://github.com/spinscale/git-log-to-elasticsearch/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Alexander Reelsen - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
main- Seen
- Jun 23, 2021
- Crystal
1.0.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/spinscale/git-log-to-elasticsearch
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 1