Zhang Lu.

NPM PACKAGE

Read this site with one line of npx zhanglu-net.

zhanglu-net is this site's official npm CLI. It is not a second data source; it is a thin wrapper around /api/*.json. By default it is human-readable. Add --json when an agent or script wants raw payloads.

package: zhanglu-net version: 0.2.0 Node >= 18 0 dependencies MIT 542 lines

First: npm vs npx

npm package

npm is the JavaScript package registry. This site's package is zhanglu-net. It contains the CLI source, README and package.json. Once installed, it exposes the zhanglu-net command.

npx command

npx runs an npm package temporarily. You do not install first; just run npx zhanglu-net --lang en list projects and it downloads and executes the latest package. For occasional use, npx is the easiest path.

The package name is zhanglu-net. The npm package zhanglu is someone else's empty package from 2021. Do not install that one.

Three ways to run it

1. No install: npx

npx zhanglu-net --help
npx zhanglu-net --lang en endpoints
npx zhanglu-net --lang en list skills --featured

Recommended. Good for one-off lookup, agent calls, or keeping your global environment clean.

2. Global install

npm i -g zhanglu-net
zhanglu-net --lang en list projects
zhanglu-net --lang en search "weekly"

Good if you use it often. Faster startup; upgrade manually with npm up -g zhanglu-net.

3. Run from source

git clone https://github.com/zhanglunet/zhanglu.net
node zhanglu.net/cli/bin/zhanglu-net.mjs --lang en list skills

Good when npm is unavailable, or when you want to inspect or modify the CLI. Zero dependencies; no install step needed.

Recipes

See what the site exposes

npx zhanglu-net --lang en endpoints

List live projects as JSON

npx zhanglu-net --lang en list projects --status live --json

Get a skill body as markdown

npx zhanglu-net --lang en get skill boss --md

Search for brand-judgment material

npx zhanglu-net --lang en search "brand judgment" --type skill

Read recent weekly notes

npx zhanglu-net --lang en list weekly

Switch to Chinese corpus

npx zhanglu-net search "品牌判断"

Point the CLI at a local dev server

ZHANGLU_BASE_URL=http://localhost:4321 npx zhanglu-net --lang en endpoints

Commands

Content types are called kinds. Use plural kinds with list: skills, projects, articles, presentations, weekly. Use singular kinds with get.

endpoints Show the manifest: content counts, all API URLs, and language links. list <kind> List skills / projects / articles / presentations / weekly. get <kind> <slug> Read one skill / project / weekly; articles and presentations are taken from their list endpoints. search <keyword> Substring search across the full corpus, optionally narrowed with --type. about Read the author bio, tagline and tags. social Read public social links; email is scrubbed. help <command> Show detailed help for one command. version Print the CLI version.

Flags

--lang <zh|en> Choose Chinese or English payloads; default is zh. --json Output raw JSON for agents, scripts and jq pipelines. --md On get, output only body_md; best for feeding a model. --featured Only featured items. --source <s> Filter skills / articles by source. --status <s> Filter projects by status. --type <t> For search: skill / project / article / presentation / weekly / about. --since <YYYY-MM-DD> For list articles: filter by date. --limit <N> Return at most N items. --base <url> Override the site root; use http://localhost:4321 for local dev.

Where it reads from

The CLI stores no data and talks to no database. Every command is just one or a few HTTP GET requests: Chinese data lives at https://zhanglu.net/api/*.json; English data lives at https://zhanglu.net/en/api/*.json. curl, browser fetch and the CLI all read the same build artifact.

# These two read the same project list
curl -s https://zhanglu.net/en/api/projects.json | jq '.items[].slug'
npx zhanglu-net --lang en list projects --json | jq '.items[].slug'

# Chinese is the same endpoint family without /en
curl -s https://zhanglu.net/api/projects.json | jq '.lang'
npx zhanglu-net list projects --json | jq '.lang'

Using it from an agent

Need structured data

npx zhanglu-net --lang en list projects --json

Use --json; output is ready for jq, scripts or model input.

Need body text for a model

npx zhanglu-net --lang en get project boss --md

Use --md; it strips the wrapper and returns body markdown.

Environment variables

ZHANGLU_BASE_URL Default https://zhanglu.net; set to http://localhost:4321 for local dev. ZHANGLU_LANG Default language, equivalent to adding --lang each time. NO_COLOR=1 Turn off ANSI colors; non-TTY pipes avoid colors automatically too.

FAQ

Do I need an API key?

No. The site content is public; endpoints are CORS-open and tokenless.

Does npx hit the network every time?

It normally checks / uses its cache. Use global install if you want less startup latency.

Why does English search not find Chinese content?

The corpora are language-separated. English uses --lang en; Chinese is the default.

When should I skip the CLI?

If your agent can already make HTTP calls, read /en/api/index.json directly. The CLI is for terminals and agents without HTTP tooling.

Next