Skip to content

Commit 62850c8

Browse files
authored
Merge pull request #1 from yavydev/develop
feat: harden CLI for public release
2 parents df280e2 + e6f4e13 commit 62850c8

29 files changed

+1465
-1413
lines changed

.github/workflows/prettier.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Prettier
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
prettier:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: 20
18+
19+
- run: npm ci
20+
- run: npx prettier --check "src/**/*.{ts,js}" "*.{json,md}"

.github/workflows/publish.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Publish to npm
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: read
10+
id-token: write
11+
12+
jobs:
13+
publish:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: 20
21+
registry-url: https://registry.npmjs.org
22+
23+
- run: npm ci
24+
- run: npm run build
25+
- run: npm run test
26+
- run: npm publish --provenance --access public
27+
env:
28+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/tests.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
node-version: [18, 20, 22]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
23+
- run: npm ci
24+
- run: npm run typecheck
25+
- run: npm run test

.prettierrc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"singleAttributePerLine": false,
5+
"printWidth": 150,
6+
"tabWidth": 4,
7+
"overrides": [
8+
{
9+
"files": "**/*.yml",
10+
"options": {
11+
"tabWidth": 2
12+
}
13+
},
14+
{
15+
"files": "*.md",
16+
"options": {
17+
"tabWidth": 2
18+
}
19+
}
20+
]
21+
}

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ yavy generate my-org/my-project
2727

2828
### `yavy login`
2929

30-
Opens your browser to authenticate with your Yavy account. Credentials are stored in `~/.yavy/credentials.json`.
30+
Opens your browser to authenticate with your Yavy account using OAuth (PKCE). Credentials are stored in `~/.yavy/credentials.json`.
3131

3232
### `yavy logout`
3333

@@ -43,24 +43,31 @@ Lists all projects you have access to across your organizations.
4343

4444
### `yavy generate <org/project>`
4545

46-
Generates a skill file from a project's indexed documentation.
46+
Downloads a skill from a project's indexed documentation.
4747

4848
| Flag | Description |
4949
| ----------------- | ----------------------------------------------------- |
5050
| `--global` | Save to global skills directory (`~/.claude/skills/`) |
5151
| `--output <path>` | Custom output path |
52-
| `--force` | Force regeneration even if cached |
52+
| `--force` | Overwrite existing skill files |
5353
| `--json` | Output as JSON |
5454

55-
By default, skills are saved to `.claude/skills/<project>/SKILL.md` in the current directory.
55+
By default, skills are saved to `.claude/skills/<project>/` in the current directory.
5656

5757
## How It Works
5858

5959
1. Yavy indexes your documentation sources (websites, GitHub repos, Confluence, Notion)
60-
2. The CLI calls the Yavy API to generate a skill using the indexed content
60+
2. The CLI calls the Yavy API to download a skill using the indexed content
6161
3. The skill file is saved locally for your AI coding tools to discover
6262
4. AI coding assistants automatically activate the skill when working with relevant code
6363

64+
## Configuration
65+
66+
| Environment Variable | Description | Default |
67+
| -------------------- | ------------------------ | ------------------ |
68+
| `YAVY_BASE_URL` | Override API base URL | `https://yavy.dev` |
69+
| `YAVY_CLIENT_ID` | Override OAuth client ID | (built-in) |
70+
6471
## Related
6572

6673
- [Yavy Claude Code Plugin](https://github.com/yavydev/claude-code) — Claude Code plugin with interactive setup

0 commit comments

Comments
 (0)