tokens-bruecke 3.2.1 → 3.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.
- package/CONTRIBUTING.md +1 -1
- package/README.md +37 -13
- package/bin/cli.js +1 -1
- package/examples/cli-options.json +26 -0
- package/llms.txt +19 -0
- package/package.json +2 -2
- package/schemas/cli-options.schema.json +108 -0
- package/skills/tokens-bruecke/SKILL.md +65 -0
package/CONTRIBUTING.md
CHANGED
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# TokensBruecke — Figma plugin
|
|
2
2
|
|
|
3
3
|
<a href="https://www.figma.com/community/plugin/1254538877056388290" target="_blank">
|
|
4
4
|
<img src="./readme-assets/preview.webp" alt="preview" width="100%">
|
|
@@ -12,7 +12,7 @@ The plugin converts Figma variables into design-tokens JSON that are compatible
|
|
|
12
12
|
|
|
13
13
|
## Table of contents
|
|
14
14
|
|
|
15
|
-
- [
|
|
15
|
+
- [TokensBruecke — Figma plugin](#tokensbruecke--figma-plugin)
|
|
16
16
|
- [What is this plugin for?](#what-is-this-plugin-for)
|
|
17
17
|
- [Table of contents](#table-of-contents)
|
|
18
18
|
- [How to use](#how-to-use)
|
|
@@ -36,6 +36,7 @@ The plugin converts Figma variables into design-tokens JSON that are compatible
|
|
|
36
36
|
- [Usage](#usage)
|
|
37
37
|
- [Options](#options)
|
|
38
38
|
- [CLI Configuration File](#cli-configuration-file)
|
|
39
|
+
- [For AI agents](#for-ai-agents)
|
|
39
40
|
- [Push to server](#push-to-server)
|
|
40
41
|
- [JSONBin](#jsonbin)
|
|
41
42
|
- [GitHub](#github)
|
|
@@ -386,16 +387,26 @@ This will fetch figma variables and export them in `out/tokens.json`
|
|
|
386
387
|
|
|
387
388
|
### Options
|
|
388
389
|
|
|
389
|
-
| Option | Alias | Description
|
|
390
|
-
| ------------------------- | ----- |
|
|
391
|
-
| `--api-key` | `-a` | Figma personal access token (PAT)
|
|
392
|
-
| `--oauth-token` | `-t` | Figma OAuth token
|
|
393
|
-
| `--file-key` | `-f` | Figma file key
|
|
394
|
-
| `--output` | `-o` | Path to output file, or output directory when `--split-by-collection` or `--split-by-mode`
|
|
395
|
-
| `--
|
|
396
|
-
| `--
|
|
397
|
-
| `--split-by-
|
|
398
|
-
| `--
|
|
390
|
+
| Option | Alias | Description | Required |
|
|
391
|
+
| ------------------------- | ----- | ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
|
|
392
|
+
| `--api-key` | `-a` | Figma personal access token (PAT) | One of `--api-key` or `--oauth-token` is required |
|
|
393
|
+
| `--oauth-token` | `-t` | Figma OAuth token | One of `--api-key` or `--oauth-token` is required |
|
|
394
|
+
| `--file-key` | `-f` | Figma file key | Yes |
|
|
395
|
+
| `--output` | `-o` | Path to output file, or output directory when `--split-by-collection` or `--split-by-mode` | Yes, unless `--stdout` is used |
|
|
396
|
+
| `--stdout` | | Print tokens JSON to stdout instead of writing a file (mutually exclusive with `--output` and split flags) | No |
|
|
397
|
+
| `--config` | `-c` | Path to configuration file | No |
|
|
398
|
+
| `--split-by-collection` | `-s` | Write each collection as a separate `.tokens.json` file in `--output` | No |
|
|
399
|
+
| `--split-by-mode` | `-m` | Write each mode as a separate `.tokens.json` file under its collection directory in `--output` | No |
|
|
400
|
+
| `--omit-collection-names` | | Drop top-level collection names and merge all variables into one flat namespace | No |
|
|
401
|
+
| `--quiet` | `-q` | Suppress progress logs (errors are still printed) | No |
|
|
402
|
+
| `--help` | `-h` | Show usage help | No |
|
|
403
|
+
| `--version` | | Show the CLI version | No |
|
|
404
|
+
|
|
405
|
+
Progress logs are printed to **stderr**, so stdout stays clean for piping:
|
|
406
|
+
|
|
407
|
+
```bash
|
|
408
|
+
tokens-bruecke -a $FIGMA_TOKEN -f $FIGMA_FILE --stdout --quiet | jq .
|
|
409
|
+
```
|
|
399
410
|
|
|
400
411
|
> [!TIP]
|
|
401
412
|
> For automated pipelines, `--oauth-token` is preferred over `--api-key`. Personal Access Tokens expire every 90 days and require manual renewal, while OAuth tokens support programmatic refresh for indefinite access.
|
|
@@ -427,7 +438,20 @@ You can use a JSON configuration file to specify the export options for the CLI.
|
|
|
427
438
|
}
|
|
428
439
|
```
|
|
429
440
|
|
|
430
|
-
Save this JSON file and pass it to the CLI using the `--config` option
|
|
441
|
+
Save this JSON file and pass it to the CLI using the `--config` option. A JSON schema with all options, types and defaults is available at [schemas/cli-options.schema.json](schemas/cli-options.schema.json) — reference it via a `$schema` key for editor validation and autocompletion (see [examples/cli-options.json](examples/cli-options.json)).
|
|
442
|
+
|
|
443
|
+
> [!NOTE]
|
|
444
|
+
> Explicit CLI flags (e.g. `--split-by-collection`) override values from the config file, which override the defaults.
|
|
445
|
+
|
|
446
|
+
### For AI agents
|
|
447
|
+
|
|
448
|
+
This repository and the npm package ship agent-friendly docs:
|
|
449
|
+
|
|
450
|
+
- [llms.txt](llms.txt) — entry point for LLM-based tools
|
|
451
|
+
- [skills/tokens-bruecke/SKILL.md](skills/tokens-bruecke/SKILL.md) — an [agent skill](https://code.visualstudio.com/docs/copilot/customization/agent-skills) covering CLI usage, auth, config and exit codes; copy the `skills/tokens-bruecke` folder into your project's skills directory to teach your agent the CLI
|
|
452
|
+
- [schemas/cli-options.schema.json](schemas/cli-options.schema.json) — machine-readable config schema
|
|
453
|
+
|
|
454
|
+
For scripted/agent usage prefer `--stdout --quiet` (pure JSON on stdout, logs on stderr) and pass tokens via environment variables.
|
|
431
455
|
|
|
432
456
|
---
|
|
433
457
|
|