Skip to content

Commit 05500d3

Browse files
fentasclaude
andauthored
docs: fix overview icons and add authentication page (#103)
## Summary - Fix verify card icon: `check-badge` → `check-circle-solid` (exists in registry) - Fix cache card icon: `archive-box` → `folder-open` (exists in registry) - Add `docs/authentication.mdx` with provider token documentation (GITHUB_TOKEN, GITLAB_TOKEN, GITEA_TOKEN) **Required before next docs deploy** — sidebars.js on the `docs` branch references the `authentication` doc ID. ## Test plan - [ ] Merge to main triggers docs workflow rebuild - [ ] Verify/cache cards show proper icons on overview page - [ ] Authentication page renders at /authentication 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0745cce commit 05500d3

File tree

2 files changed

+74
-2
lines changed

2 files changed

+74
-2
lines changed

docs/authentication.mdx

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
description: "Configure authentication tokens for private repositories and higher rate limits"
3+
---
4+
5+
# Authentication
6+
7+
`b` supports authentication tokens for accessing private repositories and increasing API rate limits. Tokens are read from environment variables.
8+
9+
## Provider Tokens
10+
11+
| Provider | Environment Variable | Header Format |
12+
| -------- | -------------------- | ------------- |
13+
| GitHub | `GITHUB_TOKEN` | `Authorization: Bearer <token>` |
14+
| GitLab | `GITLAB_TOKEN` | `PRIVATE-TOKEN: <token>` |
15+
| Gitea / Codeberg | `GITEA_TOKEN` | `Authorization: token <token>` |
16+
17+
## Usage
18+
19+
Export the appropriate variable before running `b`:
20+
21+
```bash
22+
export GITHUB_TOKEN="ghp_..."
23+
b install owner/private-repo
24+
```
25+
26+
### GitHub
27+
28+
A GitHub token increases the API rate limit from 60 to 5,000 requests per hour and allows access to private repositories.
29+
30+
```bash
31+
export GITHUB_TOKEN="ghp_..."
32+
```
33+
34+
Without a token, `b` will show a warning when rate-limited:
35+
36+
> GitHub API rate limited (set GITHUB_TOKEN for higher limits)
37+
38+
### GitLab
39+
40+
A GitLab token is required for private repositories on `gitlab.com` or self-hosted instances.
41+
42+
```bash
43+
export GITLAB_TOKEN="glpat-..."
44+
```
45+
46+
### Gitea / Codeberg
47+
48+
A Gitea token is required for private repositories on Gitea or Forgejo instances like Codeberg.
49+
50+
```bash
51+
export GITEA_TOKEN="..."
52+
```
53+
54+
## CI/CD
55+
56+
In CI/CD pipelines, use secrets or environment variables provided by your CI system:
57+
58+
```yaml
59+
# GitHub Actions
60+
steps:
61+
- name: Install tools
62+
env:
63+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64+
run: b install
65+
66+
# GitLab CI
67+
install_tools:
68+
script:
69+
- b install
70+
variables:
71+
GITLAB_TOKEN: $GITLAB_API_TOKEN
72+
```

docs/b/overview.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ b install github.com/org/infra:/manifests/** ./manifests
9393
href: '/b/subcommands/verify',
9494
label: 'b verify',
9595
customProps: {
96-
icon: Icons['check-badge'],
96+
icon: Icons['check-circle-solid'],
9797
description: 'Verify installed artifacts against b.lock checksums.'
9898
}
9999
},
@@ -102,7 +102,7 @@ b install github.com/org/infra:/manifests/** ./manifests
102102
href: '/b/subcommands/cache',
103103
label: 'b cache',
104104
customProps: {
105-
icon: Icons['archive-box'],
105+
icon: Icons['folder-open'],
106106
description: 'Manage the local git cache for env file syncing.'
107107
}
108108
},

0 commit comments

Comments
 (0)