@articlessh/cli
v0.1.0
Published
Command-line client and JavaScript API for articles.sh
Readme
@articlessh/cli
Save articles to articles.sh from a terminal or Node.js.
npm install --global @articlessh/cli
pbpaste | articlesh auth login --token-stdin
articlesh add https://example.com/article --category research --sourceRun it without a global installation:
npx --package @articlessh/cli articlesh add https://example.com/articleCreate and revoke personal access tokens from Account → CLI access in the
web app. Pass tokens through stdin or ARTICLESH_TOKEN so they do not land in
shell history. For CI, set ARTICLESH_TOKEN; use ARTICLESH_API_URL to target
an HTTPS preview or a localhost deployment.
JavaScript API
import { createArticlesClient } from "@articlessh/cli";
const client = createArticlesClient({ token: process.env.ARTICLESH_TOKEN });
const article = await client.createArticle({
url: "https://example.com/article",
processInCloud: true,
});Build and inspect the publishable package from the repository root:
pnpm --filter @articlessh/cli build
npm publish packages/cli --dry-run --access public