Skip to content

Commit 83c797d

Browse files
committed
docs: update sections
1 parent 0598755 commit 83c797d

14 files changed

Lines changed: 374 additions & 78 deletions

docs/authentication.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ Kasetto identifies the git host from the URL hostname:
5252

5353
Works for `github.com` and GitHub Enterprise Server alike.
5454

55-
```console
56-
$ export GITHUB_TOKEN=ghp_...
57-
$ kst sync --config kasetto.yaml
55+
```bash
56+
export GITHUB_TOKEN=ghp_...
57+
kst sync --config kasetto.yaml
5858
```
5959

6060
### GitLab
@@ -66,9 +66,9 @@ $ kst sync --config kasetto.yaml
6666

6767
Works for `gitlab.com` and any self-hosted instance whose hostname starts with `gitlab.`.
6868

69-
```console
70-
$ export GITLAB_TOKEN=glpat-...
71-
$ kst sync --config kasetto.yaml
69+
```bash
70+
export GITLAB_TOKEN=glpat-...
71+
kst sync --config kasetto.yaml
7272
```
7373

7474
### Bitbucket Cloud
@@ -105,9 +105,9 @@ All three are checked in order — the first one found is used for any Gitea-fam
105105

106106
Authentication also applies when you fetch a config via `--config <url>`. The token is chosen based on the URL hostname, using the same detection rules above.
107107

108-
```console
109-
$ export GITHUB_TOKEN=ghp_...
110-
$ kst sync --config https://github.com/org/private-repo/raw/main/kasetto.yaml
108+
```bash
109+
export GITHUB_TOKEN=ghp_...
110+
kst sync --config https://github.com/org/private-repo/raw/main/kasetto.yaml
111111
```
112112

113113
If the URL points to a private resource and no matching token is set, Kasetto reports an HTTP error with a hint about which variable to set.

docs/ci.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# CI & Automation
2+
3+
**When you need this:** You want to validate `kasetto.yaml` in CI, keep team environments reproducible, or integrate Kasetto into scripts.
4+
5+
**What you'll learn:**
6+
7+
- Recommended flags (`--dry-run`, `--json`, `--plain`, `--quiet`)
8+
- Exit-code expectations
9+
- A GitHub Actions example
10+
11+
## Recommended Commands
12+
13+
### Validate Without Writing
14+
15+
Use `--dry-run` to check that sources resolve and that the plan matches expectations without touching disk:
16+
17+
```bash
18+
kst sync --dry-run
19+
```
20+
21+
### JSON Output for CI Logs
22+
23+
Use `--json` for structured logs:
24+
25+
```bash
26+
kst sync --dry-run --json
27+
```
28+
29+
### Avoid TUIs in Non-Interactive Environments
30+
31+
Kasetto will avoid interactive UIs when it detects non-interactive output, but you can force it:
32+
33+
- Set `NO_TUI=1`
34+
- Or use `--plain` / `--quiet` as needed
35+
36+
```bash
37+
NO_TUI=1 kst sync --dry-run --plain
38+
```
39+
40+
## Exit Codes
41+
42+
Kasetto is designed to keep going when individual skills are missing/broken in a source, but failures that prevent reading sources/configs are treated as errors.
43+
44+
If you're depending on strict enforcement in CI, pair `--dry-run` with `--json` and enforce policy in the CI step based on the report.
45+
46+
## GitHub Actions Example
47+
48+
This validates a repo's `kasetto.yaml` (project scope) without writing changes:
49+
50+
```yaml
51+
name: kasetto
52+
53+
on:
54+
pull_request:
55+
push:
56+
branches: [main]
57+
58+
jobs:
59+
validate:
60+
runs-on: ubuntu-latest
61+
steps:
62+
- uses: actions/checkout@v4
63+
64+
- name: Install kasetto
65+
run: curl -fsSL https://raw.githubusercontent.com/pivoshenko/kasetto/main/scripts/install.sh | sh
66+
67+
- name: Validate kasetto.yaml
68+
env:
69+
NO_TUI: "1"
70+
# Add tokens if you pull from private sources:
71+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
run: kst sync --project --dry-run --json
73+
```

docs/commands.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
Generates a starter `kasetto.yaml` in the current directory — a good jumping-off point before you edit by hand.
66

7-
```console
8-
$ kst init [OPTIONS]
7+
```bash
8+
kst init [OPTIONS]
99
```
1010

1111
### Options
@@ -18,8 +18,8 @@ $ kst init [OPTIONS]
1818

1919
Reads your config, fetches any remote skills, and brings your local install up to date.
2020

21-
```console
22-
$ kst sync [OPTIONS]
21+
```bash
22+
kst sync [OPTIONS]
2323
```
2424

2525
### Options
@@ -45,8 +45,8 @@ Missing skills are reported as broken but won't stop the rest of the run. The ex
4545

4646
Shows everything Kasetto has installed (skills and MCP servers from the lock file).
4747

48-
```console
49-
$ kst list [OPTIONS]
48+
```bash
49+
kst list [OPTIONS]
5050
```
5151

5252
### Options
@@ -72,8 +72,8 @@ In a terminal (and without `--plain`), this opens an interactive browser — **S
7272

7373
Prints a local health check: your version, lock file location, install paths, last sync time, and any skills that failed.
7474

75-
```console
76-
$ kst doctor [OPTIONS]
75+
```bash
76+
kst doctor [OPTIONS]
7777
```
7878

7979
### Options
@@ -90,8 +90,8 @@ $ kst doctor [OPTIONS]
9090

9191
Removes everything Kasetto installed for the given scope — skills, MCP configs, and lock file entries.
9292

93-
```console
94-
$ kst clean [OPTIONS]
93+
```bash
94+
kst clean [OPTIONS]
9595
```
9696

9797
### Options
@@ -113,8 +113,8 @@ Manage Kasetto itself — update to a new version or remove it completely.
113113

114114
Fetches the latest release from GitHub and swaps out the binary in-place.
115115

116-
```console
117-
$ kst self update [OPTIONS]
116+
```bash
117+
kst self update [OPTIONS]
118118
```
119119

120120
#### Options
@@ -132,8 +132,8 @@ $ kst self update [OPTIONS]
132132

133133
A full teardown: removes installed skills and MCP configs, clears Kasetto's data directories, and deletes the binary.
134134

135-
```console
136-
$ kst self uninstall [OPTIONS]
135+
```bash
136+
kst self uninstall [OPTIONS]
137137
```
138138

139139
#### Options
@@ -146,8 +146,8 @@ $ kst self uninstall [OPTIONS]
146146

147147
Generates completion scripts for your shell.
148148

149-
```console
150-
$ kst completions <SHELL>
149+
```bash
150+
kst completions <SHELL>
151151
```
152152

153153
Supported shells: `bash`, `zsh`, `fish`, `powershell`.

docs/configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ for Cursor). See [how sync works](./how-sync-works.md) for merge behavior detail
9999

100100
Kasetto can fetch configs from any HTTPS URL:
101101

102-
```console
103-
$ kst sync --config https://example.com/team-skills.yaml
102+
```bash
103+
kst sync --config https://example.com/team-skills.yaml
104104
```
105105

106106
Great for sharing a single config across a team without checking it into every repository.
@@ -132,7 +132,7 @@ If you set both, `destination` wins. Use `agent` for convenience with [supported
132132

133133
Use `destination` when targeting an agent that isn't in the supported list.
134134

135-
## Scope: Global vs Project
135+
## Scope: Global Vs Project
136136

137137
By default, skills are installed globally into the agent's home-directory path. Add `scope: project` to your config, or pass `--project` on the command line, to install into the current project directory instead.
138138

docs/cookbook.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Cookbook
2+
3+
**When you need this:** You want copy-paste setups for common real workflows (teams, monorepos, multiple agents, pinned rollouts).
4+
5+
**What you'll learn:**
6+
7+
- Patterns that work well in practice
8+
- How to pin and roll out changes safely
9+
10+
## Team Bootstrap From A URL Config
11+
12+
Host a shared `kasetto.yaml` somewhere reachable over HTTPS (public or private), then have each developer run:
13+
14+
```bash
15+
kst sync --config https://example.com/team/kasetto.yaml
16+
```
17+
18+
For private configs hosted on git providers, set the matching token env var (see [Authentication](./authentication.md)).
19+
20+
## Monorepo: Project Scope Per Workspace
21+
22+
Keep one `kasetto.yaml` per workspace folder and make it project-scoped:
23+
24+
```yaml
25+
scope: project
26+
agent: cursor
27+
28+
skills:
29+
- source: https://github.com/acme/monorepo-skills
30+
skills:
31+
- code-reviewer
32+
- doc-coauthoring
33+
```
34+
35+
Then run sync from each workspace directory:
36+
37+
```bash
38+
kst sync
39+
```
40+
41+
Each workspace gets its own `./kasetto.lock`.
42+
43+
## Multiple Agents From One Config
44+
45+
Install the same skills (and MCP servers) into multiple agents:
46+
47+
```yaml
48+
agent:
49+
- claude-code
50+
- cursor
51+
- codex
52+
53+
skills:
54+
- source: https://github.com/acme/skills
55+
skills: "*"
56+
57+
mcps:
58+
- source: https://github.com/acme/mcp-packs
59+
```
60+
61+
## MCP Packs: Pinning And Rollouts
62+
63+
Pin an MCP pack source to a git tag or commit SHA:
64+
65+
```yaml
66+
agent: claude-code
67+
68+
skills:
69+
- source: https://github.com/acme/skills
70+
skills: "*"
71+
72+
mcps:
73+
- source: https://github.com/acme/mcp-packs
74+
ref: v2.4.1
75+
```
76+
77+
Roll forward by bumping `ref`, then use `--dry-run` to preview:
78+
79+
```bash
80+
kst sync --dry-run
81+
```
82+
83+
## Explicit MCP Pack Path (`mcps.path`)
84+
85+
If a repo contains multiple MCP config files or doesn't match the default discovery layout, point directly at one:
86+
87+
```yaml
88+
mcps:
89+
- source: https://github.com/acme/monorepo
90+
path: mcps/servers/pack.json
91+
```

docs/faq.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# FAQ
2+
3+
**When you need this:** You have a quick "what happens if…" question about syncing skills or MCP servers.
4+
5+
## Will Kasetto Overwrite My MCP Entries?
6+
7+
No. MCP merges are **additive** and existing server entries are **never overwritten**. See [How Sync Works](./how-sync-works.md#mcp-servers-discovery-and-additive-merge).
8+
9+
## What Happens When Two Sources Define The Same MCP Server Name?
10+
11+
**First write wins** based on config order. Later sources with the same server name are skipped. See [How Sync Works](./how-sync-works.md#edge-cases).
12+
13+
## Where Is The Lock File?
14+
15+
- **Global scope**: `$XDG_DATA_HOME/kasetto/kasetto.lock` (default: `~/.local/share/kasetto/kasetto.lock`)
16+
- **Project scope**: `./kasetto.lock`
17+
18+
See [How Sync Works](./how-sync-works.md#lock-file).
19+
20+
## How Do I Uninstall Safely?
21+
22+
- To remove tracked installs for a scope: `kst clean`
23+
- To remove everything including the binary: `kst self uninstall`
24+
25+
See `kst clean` and `kst self uninstall` in [Commands](./commands.md).
26+
27+
## Can I Use Multiple Agents?
28+
29+
Yes. Set `agent` to a list. See [Configuration](./configuration.md#multiple-agents).
30+
31+
## Does Kasetto Run Code From Skills?
32+
33+
No. Skills are copied as directories. Execution is up to the agent you load them into.
34+
35+
## Can I Pin Sources To A Known-Good Version?
36+
37+
Yes. Use `ref:` with a tag or commit SHA. See [Cookbook](./cookbook.md#mcp-packs-pinning-and-rollouts).
38+
39+
## What Does `--dry-run` Do?
40+
41+
It prints what would change without writing any files. Useful in CI. See [CI & automation](./ci.md).
42+
43+
## Why Didn't My MCP Servers Show Up?
44+
45+
Most common causes:
46+
47+
- The target agent settings file is malformed JSON/TOML
48+
- The MCP file doesn't contain a top-level `mcpServers` object
49+
50+
See [How Sync Works](./how-sync-works.md#edge-cases) (corrupted settings file behavior).
51+
52+
## How Do Remote Configs (`--config https://...`) Authenticate?
53+
54+
Kasetto selects tokens by the URL hostname using the same rules as skill/MCP sources. See [Authentication](./authentication.md#remote-configs).

0 commit comments

Comments
 (0)