Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/deploy-site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Deploy site

# Publishes the auto-generated jc CLI showcase site to GitHub Pages on
# every merge to main. The site is regenerated from internal/schema in
# the workflow itself (defense in depth — the verify-site CI gate on PRs
# already keeps the committed docs/site/ in sync). This way Pages always
# reflects what's actually shipping.

on:
push:
branches: [main]
paths:
- 'docs/site/**'
- 'cmd/sitegen/**'
- 'internal/schema/**'
- 'Makefile'
- '.github/workflows/deploy-site.yml'
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

# Only one Pages deploy at a time. If a second merge lands while one is
# deploying, the second waits — we want the latest deploy to win, not the
# earliest. cancel-in-progress: false because actions/deploy-pages doesn't
# tolerate mid-flight cancellation cleanly.
concurrency:
group: pages
cancel-in-progress: false

jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v5

- uses: actions/setup-go@v6
with:
go-version-file: go.mod

- name: Regenerate site artifacts
run: make site

- uses: actions/configure-pages@v5

- uses: actions/upload-pages-artifact@v3
with:
path: docs/site

- id: deployment
uses: actions/deploy-pages@v4
33 changes: 33 additions & 0 deletions .github/workflows/verify-site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Verify site

# Catches stale docs/site/ artifacts on incoming PRs. If a contributor
# touched internal/schema, cmd/sitegen, the Makefile site target, or
# docs/site/ directly without running `make site`, this job fails and
# tells them how to fix it. Complements the deploy-site workflow, which
# regenerates at deploy time but only after merge.

on:
pull_request:
branches: [main]
paths:
- 'internal/schema/**'
- 'cmd/sitegen/**'
- 'docs/site/**'
- 'Makefile'
- '.github/workflows/verify-site.yml'

permissions:
contents: read

jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- uses: actions/setup-go@v6
with:
go-version-file: go.mod

- name: Verify docs/site/ is up to date
run: make verify-site
25 changes: 24 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ BIN := jc
DIST := dist
PLATFORMS := darwin/amd64 darwin/arm64 linux/amd64 linux/arm64 windows/amd64

.PHONY: build test lint install clean vet integration-test integration-test-readonly clean-dist dist release
.PHONY: build test lint install clean vet integration-test integration-test-readonly clean-dist dist release site verify-site

build:
go build -ldflags "$(LDFLAGS)" -o $(BIN) ./cmd/jc
Expand Down Expand Up @@ -64,3 +64,26 @@ integration-test: build

integration-test-readonly: build
@JC=./$(BIN) ./scripts/integration-test.sh --skip-mutable

# Regenerate docs/site/ artifacts (commands.json, llms.txt, llms-full.txt)
# from the schema manifest. Run after touching internal/schema or any
# command that should appear in the public catalog.
site:
go run ./cmd/sitegen -out docs/site

# CI gate: fail if docs/site/ is stale relative to the current schema.
# Regenerates into a temp dir and diffs the three generated artifacts
# against the committed copies. Catches "added a new command but forgot
# to run make site."
verify-site:
@tmp=$$(mktemp -d) && \
go run ./cmd/sitegen -out $$tmp >/dev/null && \
for f in commands.json llms.txt llms-full.txt; do \
diff -u docs/site/$$f $$tmp/$$f || { \
echo "verify-site: docs/site/$$f is stale — run 'make site' and commit"; \
rm -rf $$tmp; \
exit 1; \
}; \
done && \
rm -rf $$tmp && \
echo "verify-site: docs/site/ is up to date"
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

Single Go binary. Full API coverage (V1, V2, Directory Insights, Graph). Six output formats. Built-in MCP server for AI assistants. Interactive TUI browser with full CRUD. Recipe engine for multi-step workflows. Plan mode for safe mutation previews. Natural language interface via `jc ask`.

**Browse the full command catalog:** [thejumpcloud.github.io/jc-cli](https://thejumpcloud.github.io/jc-cli/) — searchable reference for every command and flag, plus [`llms.txt`](https://thejumpcloud.github.io/jc-cli/llms.txt) / [`llms-full.txt`](https://thejumpcloud.github.io/jc-cli/llms-full.txt) for AI agents.

---

## Installation
Expand Down Expand Up @@ -912,8 +914,14 @@ make lint # Run go vet
make install # Install to $GOPATH/bin
make integration-test # Full integration test (requires auth)
make integration-test-readonly # Read-only probes only (no create/delete)
make site # Regenerate docs/site/ from the schema manifest
make verify-site # Fail if docs/site/ drifted from the schema
```

### Showcase site

The public command catalog at [thejumpcloud.github.io/jc-cli](https://thejumpcloud.github.io/jc-cli/) is generated from `internal/schema/schema.go` (the same source the `jc schema` command uses). After adding or renaming a command, run `make site` and commit the regenerated files under `docs/site/`. The `verify-site` CI gate fails the PR if you forget.

### Shell Completion

```bash
Expand Down
Loading
Loading