@10kbwiki/cli
v1.2.0
Published
CLI for 10KB Wiki — manage your wikis from the terminal
Downloads
288
Readme
10KB Wiki CLI
The 10KB Wiki CLI lets you manage your wikis from the terminal. Write documentation as local markdown files and sync them to your wiki with a single command.
Installation
npm install -g @10kbwiki/cliRequires Node.js 18+.
Quick Start
# 1. Authenticate
tkb login
# 2. Create a wiki and local docs/ folder
tkb init my-project
# 3. Edit markdown files in docs/
# 4. Push to your wiki
tkb push
# 5. Open in browser
tkb openHow It Works
The CLI follows a docs-as-code workflow:
- You write markdown files (
.md) in a localdocs/folder - Each file uses YAML frontmatter for metadata (
title,sort) - The CLI syncs these files to your 10KB Wiki via the API
- The server builds everything into a single HTML file (under 10 KB)
File Format
---
title: Getting Started
sort: 1
---
# Getting Started
Your content here...title— Page title displayed in the wiki sidebarsort— Controls page ordering (lower = first)
Folder Structure
Files can be nested in subdirectories to create hierarchical navigation:
docs/
index.md → /index
getting-started.md → /getting-started
guides/
setup.md → /guides/setup
deployment.md → /guides/deployment
api/
reference.md → /api/referenceCommands
| Command | Alias | Description |
|---------|-------|-------------|
| tkb login | — | Authenticate with your account |
| tkb whoami | — | Show account info and plan |
| tkb init <name> | — | Initialize a wiki project |
| tkb push | — | Push local docs to your wiki |
| tkb pull | — | Pull wiki pages to local files |
| tkb status | s | Show wiki sync status |
| tkb build | b | Trigger a wiki build |
| tkb watch | w | Watch for changes and auto-push |
| tkb open | o | Open wiki in the browser |
| tkb generate | gen | Generate docs with an AI agent |
Configuration
The CLI uses two config files:
| File | Location | Purpose |
|------|----------|---------|
| ~/.10kb/config.json | Home directory | API token (global, shared across projects) |
| .10kb.json | Project root | Wiki slug, docs directory, auto-build setting |
.10kb.json Example
{
"wiki": "my-project",
"docs": "docs",
"auto_build": true
}License
MIT
