Command line client for Fundamento Cloud - a modern documentation and knowledge management platform.
# Configure npm to use GitHub Packages for @ikigai-systems scope
npm config set @ikigai-systems:registry https://npm.pkg.github.com
# Install globally
npm install -g @ikigai-systems/fundamento-cli
# Or use with npx (no installation needed)
npx @ikigai-systems/fundamento-cli spaces listgit clone https://github.com/Ikigai-Systems/fundamento-cli.git
cd fundamento-cli
npm install
npm linkYou need a Fundamento API key to use this CLI. Get one from your Fundamento account settings.
Set your API key using one of these methods:
-
Environment variable (recommended):
export FUNDAMENTO_API_KEY=your_api_key_here -
.envfile (for development):echo "FUNDAMENTO_API_KEY=your_api_key_here" > .env
-
Command line option:
funcli --token your_api_key_here spaces list
By default, the CLI connects to https://fundamento.cloud. For testing or self-hosted instances:
funcli --base-url http://localhost:3000 spaces listfuncli [options] [command]-t, --token <token>- API token (overrides FUNDAMENTO_API_KEY)-u, --base-url <url>- Base URL (default: https://fundamento.cloud)-V, --version- Output the version number-h, --help- Display help
funcli spaces listExample output:
Available Spaces:
Acme Inc. (EsTSuqOvx-)
└─ 15 documents
Fundamento (Ioku6z_xP_)
└─ 42 documents
My Space (z2zK66AaEF)
└─ 8 documents
funcli spaces get <space-npi>Shows space information with hierarchical document structure.
Options:
-j, --json- Output as JSON
Example:
# Human-readable format
funcli spaces get z2zK66AaEF
# JSON format
funcli spaces get z2zK66AaEF --jsonfuncli spaces create <name>Creates a new space. Note: Requires manager permissions in your organization.
Arguments:
<name>- Space name (must be unique within your organization)
Options:
-a, --access-mode <mode>- Access mode:public,restricted, orprivate(default:public)
Access Modes:
- public: Visible to all organization members
- restricted: Visible to organization members but with limited access
- private: Only visible to space members and teams
Examples:
# Create a public space (default)
funcli spaces create "My New Space"
# Create a private space
funcli spaces create "Private Team Space" --access-mode private
# Create a restricted space
funcli spaces create "Restricted Space" -a restrictedNote: When a space is created, a home document is automatically created for it.
funcli documents list <space-npi>Options:
-j, --json- Output as JSON
Example:
funcli documents list z2zK66AaEFExample output:
Documents:
Meeting Notes (abc123)
Project Roadmap (def456)
API Documentation (ghi789)
funcli documents get <document-npi>Retrieves document content in Markdown format.
Options:
-f, --format <format>- Output format:markdown(default) orjson
Example:
# Markdown format (default)
funcli documents get abc123
# JSON format (with metadata)
funcli documents get abc123 --format jsonfuncli documents create <space-npi> [file]Creates a new document from a markdown file, Word/OpenOffice file, or stdin. Supports frontmatter for metadata.
Arguments:
<space-npi>- Space NPI where the document will be created[file]- Path to file (optional, reads markdown from stdin if omitted)- Markdown files:
.md - Word/OpenOffice files:
.docx,.doc,.odt,.rtf,.txt
- Markdown files:
Options:
-p, --parent <npi>- Parent document NPI (for nested documents)-t, --title <title>- Document title (overrides frontmatter and filename)
Frontmatter Support:
You can include metadata in your markdown file using YAML frontmatter:
---
title: My Document Title
parentId: abc123
---
# Document content starts hereTitle Resolution Priority:
- CLI option (
--title) - Frontmatter (
title) - Filename (without extension)
- "Untitled" (fallback)
Parent Resolution Priority:
- CLI option (
--parent) - Frontmatter (
parentId) - None (document created at space root)
Examples:
# Create from markdown file (title from frontmatter or filename)
funcli documents create z2zK66AaEF my-document.md
# Create from Word document
funcli documents create z2zK66AaEF report.docx
# Create from OpenOffice document
funcli documents create z2zK66AaEF document.odt
# Create from file with custom title
funcli documents create z2zK66AaEF my-document.md --title "Custom Title"
# Create nested document (under parent)
funcli documents create z2zK66AaEF child.md --parent abc123
# Create nested Word document
funcli documents create z2zK66AaEF section.docx --parent abc123 --title "Section 1"
# Create from stdin (markdown only)
echo "# My Document\n\nContent here" | funcli documents create z2zK66AaEF
# Create from stdin with title
cat document.md | funcli documents create z2zK66AaEF --title "New Document"Example with frontmatter:
# my-document.md
---
title: API Documentation
parentId: def456
---
# API Reference
This document contains API documentation...funcli documents create z2zK66AaEF my-document.md
# Creates "API Documentation" as child of def456funcli documents update <document-npi> [file]Updates an existing document with new markdown content from a file or stdin. This creates a new version of the document while preserving its history.
Arguments:
<document-npi>- NPI of the document to update[file]- Path to markdown file (optional, reads from stdin if omitted)
Frontmatter Support:
The update command supports YAML frontmatter for tags, just like the create command:
---
tags:
- updated/tag1
- updated/tag2
---
# Updated content starts hereNote: Tags from frontmatter will replace any existing tags on the document.
Examples:
# Update from file
funcli documents update abc123 updated-content.md
# Update from stdin
echo "# Updated Content\n\nNew text here" | funcli documents update abc123
# Update from stdin (multiline)
cat updated-document.md | funcli documents update abc123
# Update with tags from frontmatter
funcli documents update abc123 document-with-tags.mdExample with frontmatter:
# updated-content.md
---
tags:
- version/2.0
- status/reviewed
---
# Updated API Documentation
This document has been updated with new information...funcli documents update abc123 updated-content.md
# Updates document abc123 and replaces tags with "version/2.0" and "status/reviewed"Notes:
- Creates a new version of the document (preserves history)
- Updates the document's sync state for real-time collaboration
- Tags from frontmatter replace existing tags
- Does not change document title or hierarchy position
funcli documents import <space-npi> <directory>Imports all markdown files from a directory, maintaining the folder hierarchy as nested documents.
Arguments:
<space-npi>- Space NPI where documents will be imported<directory>- Path to directory containing markdown files
Behavior:
- Recursively traverses the directory
- Creates a document for each subdirectory (using directory name as title)
- Creates a document for each
.mdfile (with full content) - Maintains parent-child relationships based on folder structure
- Skips non-markdown files (
.png,.jpg,.pdf, etc.) - Processes frontmatter in markdown files
Directory Structure Example:
Notes/
├── README.md
├── Projects/
│ ├── Project A.md
│ └── Project B.md
└── Ideas/
└── Future Ideas.md
Result: Creates documents with this hierarchy:
- README (root level)
- Projects (root level)
- Project A (child of Projects)
- Project B (child of Projects)
- Ideas (root level)
- Future Ideas (child of Ideas)
Examples:
# Import entire directory
funcli documents import z2zK66AaEF ./my-notes
# Import with relative path
funcli documents import z2zK66AaEF ../documentation
# Import with absolute path
funcli documents import z2zK66AaEF /home/user/Documents/notesOutput:
Starting import from: ./my-notes
Target space: z2zK66AaEF
Import Summary:
✓ Successful: 15
⊘ Skipped: 3
Total processed: 15
Notes:
- Large directories may take some time to import
- Failed imports will be reported with error details
- Non-markdown files are automatically skipped
- Folder names become document titles
- File names (without
.md) become document titles
funcli documents get abc123 > document.md# Create a simple document
echo "# My Notes\n\nSome content" | funcli documents create z2zK66AaEF --title "Daily Notes"
# Import an existing markdown file
funcli documents create z2zK66AaEF README.md
# Import a Word document
funcli documents create z2zK66AaEF report.docx
# Import an OpenOffice document
funcli documents create z2zK66AaEF document.odt --title "Important Document"
# Update an existing document
funcli documents update abc123 updated-content.md
# Update from stdin
cat changes.md | funcli documents update abc123
# Create a nested document hierarchy
funcli documents create z2zK66AaEF parent.md
# Note the NPI of the created document, then:
funcli documents create z2zK66AaEF child.md --parent <parent-npi>
# Batch import markdown documents
for file in docs/*.md; do
funcli documents create z2zK66AaEF "$file"
done
# Batch import Word documents
for file in reports/*.docx; do
funcli documents create z2zK66AaEF "$file"
done# List all spaces and find the one you want
funcli spaces list
# Get documents from that space
funcli documents list EsTSuqOvx-
# Read a specific document
funcli documents get def456# Get all document titles from a space
funcli documents list z2zK66AaEF --json | jq -r '.[].title'
# Get document with metadata
funcli documents get abc123 --format json | jq '.title, .created_at'# Convert document to PDF using pandoc
funcli documents get abc123 | pandoc -f markdown -o document.pdf
# Search within document content
funcli documents get abc123 | grep "TODO"- Node.js >= 24.11.1
git clone https://github.com/Ikigai-Systems/fundamento-cli.git
cd fundamento-cli
npm installnode bin/funcli.js --helpnpm testnpm run lintContributions are welcome! Please feel free to submit a Pull Request.
For issues and feature requests, please use the GitHub issue tracker.
- Fundamento Cloud - The main web application
- Fundamento Documentation - Official documentation