Skip to content

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.

tiny login
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:

cd my-knowledge-base
tiny init <workspace_id_or_name>
This generates a tiny.yaml file in the current directory:
api_url: https://tiny-foundation.spikinglabs.com
workspace_id: your-uuid-here
Note: You should commit this file to your version control (Git).

3. Syncing Knowledge

Push local files to remote:

tiny push
This recursively scans your directory for .md files and uploads them to the drafts state.

Pull remote files to local:

tiny pull
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:

tiny workspace --list
(Prints a formatted table of all workspaces you belong to)

List files in a workspace:

tiny workspace list <workspace_uuid>
(Prints a hierarchical tree of all documents currently in the target workspace)

5. Document Approvals

Check approval status:

tiny status
Example Output:
Approval Status for workspace 45c73de6-4afa-4564-82da-d2ad163c79f3
┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Path               ┃ Status   ┃
┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
│ index.md           │ APPROVED │
│ products/a.md      │ PENDING  │
└────────────────────┴──────────┘

Approve documents:

tiny approve
Example Output:
? Select documents to approve: 
  instructions.md
❯ products/a.md
(Interactively select which documents to approve. Approving a document automatically triggers the graph extraction pipeline.) You can also approve all with tiny approve --all or specific documents with tiny approve path/to/doc.md.

6. Graph Explorer

Fetch and print the graph data:

tiny graph
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:

tiny tui
(Opens a full-screen, keyboard-navigable interface to explore graph nodes and their connections.) (Screenshot placeholder: Add a screenshot of the TUI here)