Publish a chart or a hosted document from a file, a pipe, or a CI job. Zero runtime dependencies, Node 18+.
npx @embd/cli chart data.csv # no install npm i -g @embd/cli && embd --help # or install the `embd` binary
Always use the scoped name. The unscoped embd package on npm belongs to an unrelated project, so npx embd runs something else entirely. With bunx the binary name differs from the package name, so it needs --package:
bunx --package @embd/cli embd chart data.csv
--link encodes the whole chart into the URL fragment and prints it. No API key, nothing uploaded, nothing stored — the data travels in the link itself. The fastest way to see what embd does.
embd chart data.csv --link embd chart data.csv --link --open # and open it in a browser embd chart data.csv --link --edit # open the editor instead of the preview
Because the payload rides in the URL, a large dataset will not fit; the CLI says so and points at the hosted path instead. Markdown documents support --link too. HTML does not — hosted HTML is served from an account so it can be revoked.
Only needed for hosted embeds. embd login opens the sign-in page and, once you are in, lands you on your account page to create a key — then prompts for it back in the terminal, with the input hidden.
embd login # opens embd.sh/account, then prompts embd login --no-browser # prints the URL instead of opening it embd login --key embd_sk_… # non-interactive, for CI
The key is stored in ~/.config/embd/config.json at mode 0600. EMBD_API_KEY always takes precedence over the stored key, which is what you want in CI.
embd chart data.csv # publish, print the URL embd chart data.csv --kind bar --title "Q3 sales" embd chart data.csv --x month --y revenue --y profit cat rows.json | embd chart - --title "Signups" embd chart data.csv --draft # save privately embd chart data.csv --json # full response, incl. iframe snippet
CSV, a JSON array of row objects, and markdown tables are all accepted and detected automatically. Columns are inferred too — override with --x, --y (repeat it or comma-separate for multiple measures), and --split for one series per value. --theme picks a theme, --slug sets a custom slug on Pro.
embd doc report.md # hosted markdown page embd doc page.html --title "Launch" # hosted HTML page cat notes.md | embd doc - --format markdown --draft
The format is inferred from the extension (.md/.markdown, .html/.htm); stdin has no extension, so it needs --format. Hosted HTML renders without JavaScript — see what still works. The CLI warns you, with line numbers, when the file you passed depends on script that will not run.
embd list # every embed: id, kind, status, title, url embd delete <id> # permanent
Publish a chart from build output and capture the iframe snippet for a PR comment:
- run: bunx --package @embd/cli embd chart out/benchmarks.csv \
--title "Benchmarks ${GITHUB_SHA}" --json > chart.json
env:
EMBD_API_KEY: ${{ secrets.EMBD_API_KEY }}embd --help lists every command, and each takes --help of its own. EMBD_API_URL overrides the API base URL.