Command-Line Interface (CLI)
The CLI is designed to help you sync local markdown knowledge bases with the Tiny Foundation cloud.
1. Authentication
The CLI uses a secure, browser-based callback to authenticate.
You can configure the URL and port if needed:tiny login --web-url https://your-site.com --port 8989
2. Configuration (tiny.yaml)
To link a directory to a remote workspace, navigate to your knowledge base folder and initialize it:
This generates atiny.yaml file in the current directory:
Note: You should commit this file to your version control (Git).
3. Syncing Knowledge
Push local files to remote:
This recursively scans your directory for.md files and uploads them to the drafts state.
Pull remote files to local:
This fetches all drafts from the remote workspace and writes them locally. Safety feature: Before overwriting any files,tiny pull will automatically back up your current local .md files into a .tiny_backup_YYYYMMDD_HHMMSS/ directory.
Note: Both commands support a --workspace <id> flag to override the configuration file.
4. Workspace Management
List your workspaces:
(Prints a formatted table of all workspaces you belong to)List files in a workspace:
(Prints a hierarchical tree of all documents currently in the target workspace)5. Document Approvals
Check approval status:
Example Output:Approval Status for workspace 45c73de6-4afa-4564-82da-d2ad163c79f3
┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Path ┃ Status ┃
┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
│ index.md │ APPROVED │
│ products/a.md │ PENDING │
└────────────────────┴──────────┘
Approve documents:
Example Output: (Interactively select which documents to approve. Approving a document automatically triggers the graph extraction pipeline.) You can also approve all withtiny approve --all or specific documents with tiny approve path/to/doc.md.
6. Graph Explorer
Fetch and print the graph data:
Example Output:Graph for workspace 45c73de6-4afa-4564-82da-d2ad163c79f3:
Nodes: 12
Edges: 9
┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━┓
┃ Node ID ┃ Label ┃ Type ┃
┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━┩
│ b │ Product B │ product │
│ plant1 │ Plant 1 │ company │
└──────────────────┴───────────┴─────────┘
Launch the interactive Graph Explorer TUI:
(Opens a full-screen, keyboard-navigable interface to explore graph nodes and their connections.) (Screenshot placeholder: Add a screenshot of the TUI here)