llm-docs-builder 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.dockerignore +44 -0
- data/.github/workflows/ci.yml +71 -0
- data/.github/workflows/docker.yml +102 -0
- data/.github/workflows/push.yml +35 -0
- data/.gitignore +66 -0
- data/.rubocop.yml +74 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +66 -0
- data/CLAUDE.md +178 -0
- data/Dockerfile +64 -0
- data/Gemfile +10 -0
- data/Gemfile.lock +88 -0
- data/LICENSE +21 -0
- data/README.md +684 -0
- data/Rakefile +10 -0
- data/bin/llm-docs-builder +7 -0
- data/bin/rspecs +7 -0
- data/lib/llm_docs_builder/bulk_transformer.rb +135 -0
- data/lib/llm_docs_builder/cli.rb +434 -0
- data/lib/llm_docs_builder/comparator.rb +238 -0
- data/lib/llm_docs_builder/config.rb +116 -0
- data/lib/llm_docs_builder/errors.rb +31 -0
- data/lib/llm_docs_builder/generator.rb +234 -0
- data/lib/llm_docs_builder/markdown_transformer.rb +90 -0
- data/lib/llm_docs_builder/parser.rb +223 -0
- data/lib/llm_docs_builder/validator.rb +216 -0
- data/lib/llm_docs_builder/version.rb +6 -0
- data/lib/llm_docs_builder.rb +130 -0
- data/llm-docs-builder.gemspec +45 -0
- data/llm-docs-builder.yml +7 -0
- data/llm-docs-builder.yml.example +26 -0
- data/renovate.json +33 -0
- metadata +171 -0
data/Dockerfile
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Multi-stage Dockerfile for llm-docs-builder
|
4
|
+
# Creates a minimal Docker image (~50MB) for running the CLI without Ruby installation
|
5
|
+
|
6
|
+
# Stage 1: Builder
|
7
|
+
FROM ruby:3.4-alpine AS builder
|
8
|
+
|
9
|
+
# Install build dependencies
|
10
|
+
RUN apk add --no-cache \
|
11
|
+
build-base \
|
12
|
+
git
|
13
|
+
|
14
|
+
# Set working directory
|
15
|
+
WORKDIR /gem
|
16
|
+
|
17
|
+
# Copy gemspec and version files first for better caching
|
18
|
+
COPY llm-docs-builder.gemspec ./
|
19
|
+
COPY lib/llm_docs_builder/version.rb ./lib/llm_docs_builder/
|
20
|
+
|
21
|
+
# Copy the rest of the gem (needed for gemspec)
|
22
|
+
COPY . .
|
23
|
+
|
24
|
+
# Initialize git repo so gemspec can use git ls-files
|
25
|
+
RUN git init && \
|
26
|
+
git add -A && \
|
27
|
+
git config user.email "docker@localhost" && \
|
28
|
+
git config user.name "Docker Build" && \
|
29
|
+
git commit -m "Docker build"
|
30
|
+
|
31
|
+
# Install dependencies
|
32
|
+
RUN bundle config set --local without 'development test' && \
|
33
|
+
bundle install
|
34
|
+
|
35
|
+
# Build the gem
|
36
|
+
RUN gem build llm-docs-builder.gemspec
|
37
|
+
|
38
|
+
# Stage 2: Runtime
|
39
|
+
FROM ruby:3.4-alpine
|
40
|
+
|
41
|
+
# Install runtime dependencies only
|
42
|
+
RUN apk add --no-cache \
|
43
|
+
ca-certificates \
|
44
|
+
tzdata
|
45
|
+
|
46
|
+
# Copy built gem and install it
|
47
|
+
COPY --from=builder /gem/llm-docs-builder-*.gem /tmp/
|
48
|
+
RUN gem install /tmp/llm-docs-builder-*.gem --no-document && \
|
49
|
+
rm /tmp/llm-docs-builder-*.gem
|
50
|
+
|
51
|
+
# Set working directory for user files
|
52
|
+
WORKDIR /workspace
|
53
|
+
|
54
|
+
# Set entrypoint to the CLI
|
55
|
+
ENTRYPOINT ["llm-docs-builder"]
|
56
|
+
|
57
|
+
# Default command shows help
|
58
|
+
CMD ["--help"]
|
59
|
+
|
60
|
+
# Metadata
|
61
|
+
LABEL maintainer="Maciej Mensfeld <maciej@mensfeld.pl>"
|
62
|
+
LABEL description="Build and optimize documentation for LLMs - generate llms.txt, transform markdown, and more"
|
63
|
+
LABEL org.opencontainers.image.source="https://github.com/mensfeld/llm-docs-builder"
|
64
|
+
LABEL org.opencontainers.image.licenses="MIT"
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
llm-docs-builder (0.3.0)
|
5
|
+
zeitwerk (~> 2.6)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
ast (2.4.3)
|
11
|
+
byebug (12.0.0)
|
12
|
+
coderay (1.1.3)
|
13
|
+
diff-lcs (1.6.2)
|
14
|
+
docile (1.4.1)
|
15
|
+
json (2.13.2)
|
16
|
+
language_server-protocol (3.17.0.5)
|
17
|
+
lint_roller (1.1.0)
|
18
|
+
method_source (1.1.0)
|
19
|
+
parallel (1.27.0)
|
20
|
+
parser (3.3.9.0)
|
21
|
+
ast (~> 2.4.1)
|
22
|
+
racc
|
23
|
+
prism (1.4.0)
|
24
|
+
pry (0.15.2)
|
25
|
+
coderay (~> 1.1)
|
26
|
+
method_source (~> 1.0)
|
27
|
+
pry-byebug (3.11.0)
|
28
|
+
byebug (~> 12.0)
|
29
|
+
pry (>= 0.13, < 0.16)
|
30
|
+
racc (1.8.1)
|
31
|
+
rainbow (3.1.1)
|
32
|
+
rake (13.3.0)
|
33
|
+
regexp_parser (2.11.2)
|
34
|
+
rspec (3.13.1)
|
35
|
+
rspec-core (~> 3.13.0)
|
36
|
+
rspec-expectations (~> 3.13.0)
|
37
|
+
rspec-mocks (~> 3.13.0)
|
38
|
+
rspec-core (3.13.5)
|
39
|
+
rspec-support (~> 3.13.0)
|
40
|
+
rspec-expectations (3.13.5)
|
41
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
42
|
+
rspec-support (~> 3.13.0)
|
43
|
+
rspec-mocks (3.13.5)
|
44
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
45
|
+
rspec-support (~> 3.13.0)
|
46
|
+
rspec-support (3.13.5)
|
47
|
+
rubocop (1.80.0)
|
48
|
+
json (~> 2.3)
|
49
|
+
language_server-protocol (~> 3.17.0.2)
|
50
|
+
lint_roller (~> 1.1.0)
|
51
|
+
parallel (~> 1.10)
|
52
|
+
parser (>= 3.3.0.2)
|
53
|
+
rainbow (>= 2.2.2, < 4.0)
|
54
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
55
|
+
rubocop-ast (>= 1.46.0, < 2.0)
|
56
|
+
ruby-progressbar (~> 1.7)
|
57
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
58
|
+
rubocop-ast (1.46.0)
|
59
|
+
parser (>= 3.3.7.2)
|
60
|
+
prism (~> 1.4)
|
61
|
+
ruby-progressbar (1.13.0)
|
62
|
+
simplecov (0.22.0)
|
63
|
+
docile (~> 1.1)
|
64
|
+
simplecov-html (~> 0.11)
|
65
|
+
simplecov_json_formatter (~> 0.1)
|
66
|
+
simplecov-html (0.13.2)
|
67
|
+
simplecov_json_formatter (0.1.4)
|
68
|
+
unicode-display_width (3.1.5)
|
69
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
70
|
+
unicode-emoji (4.0.4)
|
71
|
+
zeitwerk (2.7.3)
|
72
|
+
|
73
|
+
PLATFORMS
|
74
|
+
ruby
|
75
|
+
x86_64-linux
|
76
|
+
|
77
|
+
DEPENDENCIES
|
78
|
+
bundler (~> 2.0)
|
79
|
+
llm-docs-builder!
|
80
|
+
pry
|
81
|
+
pry-byebug
|
82
|
+
rake (~> 13.0)
|
83
|
+
rspec (~> 3.0)
|
84
|
+
rubocop (~> 1.0)
|
85
|
+
simplecov (~> 0.21)
|
86
|
+
|
87
|
+
BUNDLED WITH
|
88
|
+
2.7.1
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2025 Maciej Mensfeld
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|