A powerful terminal client for Outline that brings your knowledge base to your command line.
Disclaimer: This project is not affiliated with, endorsed by, or connected to Outline in any way. This is an independent open-source project.
- Beautiful UI: Rich terminal interface with colors, tables, and progress indicators
- Document Management: Create, read, update, and delete documents
- Powerful Search: Full-text search with ranking and context preview
- Collection Support: Browse and organize documents by collections
- Quick Actions: Fast document access by title or ID
- Markdown Support: Full markdown rendering and editing
- Vim Integration: Edit documents with your favorite editor
- Configuration Management: Secure credential storage
- Interactive Mode: User-friendly menu-driven interface
- MCP Support: Model Context Protocol server for AI integration
from source:
git clone https://github.com/nils010485/outlinecli.git
cd outlinecli
pip install .The tool requires Python 3.8+ and automatically installs these dependencies:
requests- HTTP client for API callsrich- Beautiful terminal outputclick- Command line interface frameworkpython-dotenv- Environment variable managementmarkdown- Markdown processingmcp- Model Context Protocol server
outlinecli setupThis will prompt you for:
- Your Outline server URL
- Your API key (found in Outline settings)
outlinecli interactiveLaunch a user-friendly menu interface for all operations.
# List recent documents
outlinecli list --limit 50
# Search documents
outlinecli search "query"
# Quick search and view by title
outlinecli quick "my document title"
# View a document (by ID or search)
outlinecli show "document-id-or-query"
# Edit a document
outlinecli edit "document-id-or-query"
# Delete a document (with confirmation)
outlinecli delete "document-id-or-query"# List all collections
outlinecli collections# Create a quick note
outlinecli note --title "My Note" --content "Note content"
# Create a note with vim editor
outlinecli vimnoteOutline CLI includes an MCP (Model Context Protocol) server that allows AI assistants like Claude to interact with your Outline knowledge base.
outlinecli mcpTo use this MCP server with Claude Desktop or Claude Code:
claude mcp add --transport stdio outline -- /path/to/source/outlinecli/.venv/bin/outlinecli mcpDocument Reading (Token-efficient):
| Tool | Description |
|---|---|
list_titles_only |
List documents with id, title, and updatedAt only |
list_collections |
List all collections with id, name, description, and documentCount |
search_titles |
Search in document titles only |
flex_search |
Search by keywords in titles (mode: "or" or "and") |
search_documents |
Full-text search with relevance ranking |
get_document_meta |
Get document metadata without content text |
get_document_content |
Get document content text only (no metadata) |
get_document_preview |
Get first N characters of document content |
get_document |
Get complete document with text |
search_in_document |
Search keywords in a document, return excerpts with context |
Document Modification (Precise edits without full content transfer):
| Tool | Description |
|---|---|
insert_after |
Insert text after a specific string |
insert_before |
Insert text before a specific string |
replace_text |
Replace specific or all occurrences of a string |
delete_between |
Delete text between two markers |
append |
Add text to the end of a document |
prepend |
Add text to the beginning of a document |
update_document |
Replace entire document content |
Document Management:
| Tool | Description |
|---|---|
create_document |
Create a new document |
create_subdocument |
Create a subdocument under a parent document |
delete_document |
Delete a document (accepts ID or search query) |
Server & Metadata:
| Tool | Description |
|---|---|
get_domain |
Get the configured Outline domain URL |
get_collection |
Get collection details |
get_server_info |
Get information about the currently active server (name, domain) |
Outline CLI supports managing multiple Outline servers from a single installation. This is useful when you work with multiple Outline instances (e.g., personal, work, staging).
All server management is done through the interactive setup command:
outlinecli setupThe TUI (Terminal User Interface) provides the following options:
- Add a new server - Configure a new Outline server with a name, URL, and API key
- Edit existing server - Update URL, API key, or name of an existing server
- Delete a server - Remove a server configuration (cannot delete active server)
- Set active server - Switch the active server
- List all servers - View all configured servers with active indicator
# List all configured servers (shows active server)
outlinecli switch
# Switch to a specific server
outlinecli switch production
# Quick switch and verify
outlinecli switch staging && outlinecli collectionsThe MCP server supports two modes of operation:
1. Active Server Mode (Default)
# MCP follows the current active server set by 'outlinecli switch'
outlinecli mcp
# Claude Desktop configuration (follows switch)
claude mcp add --transport stdio outline -- /path/to/outlinecli mcp2. Forced Server Mode
# Force MCP to use a specific server (overrides active)
outlinecli mcp staging
# Claude Desktop configuration (locked to staging)
claude mcp add --transport stdio outline-staging -- /path/to/outlinecli mcp stagingImportant: MCP cannot change servers itself. It either follows the active server or uses the server specified at startup. This prevents AI assistants from accidentally switching contexts.
Servers are stored in ~/.outline/servers.json with secure permissions (0o600):
{
"active": "production",
"servers": {
"production": {
"url": "https://docs.company.com",
"api_key": "olix_xxxxx..."
},
"staging": {
"url": "https://staging-docs.company.com",
"api_key": "olix_yyyyy..."
},
"personal": {
"url": "https://app.getoutline.com",
"api_key": "olix_zzzzz..."
}
}
}If you have an existing ~/.outline/config file from a previous version, it will be automatically migrated to the new format on first run:
- Old configuration is backed up to
~/.outline/.config.bak - A new server named "default" is created with your existing credentials
- No manual intervention required
Environment variables still work and override the active server configuration:
export OUTLINE_BASE_URL="https://your-outline-instance.com"
export OUTLINE_API_KEY="your-api-key"The client stores configuration in ~/.outline/servers.json with secure file permissions (0o600).
For single-server setups or overrides, you can also use environment variables:
export OUTLINE_BASE_URL="https://your-outline-instance.com"
export OUTLINE_API_KEY="your-api-key"Or create a .env file:
OUTLINE_BASE_URL=https://your-outline-instance.com
OUTLINE_API_KEY=your-api-key# Search for documents
outlinecli search "project planning"
# View specific document
outlinecli show "doc-id-here"
# Edit document
outlinecli edit "doc-id-here"
# Or use quick title search
outlinecli quick "meeting notes"# Quick note creation
outlinecli note --title "Meeting Notes" --content "## Team Meeting
- Discussed project timeline
- Decided on next steps
- Action items assigned"
# Or use vim for complex documents
outlinecli vimnote- Use
outlinecli quickfor fast document access by title - The interactive mode is great for exploring your knowledge base
- Document IDs work with all commands for direct access
- Search results show ranking quality (●●●●● = Excellent match)
- Use vim integration for complex document editing
- Verify your Outline server URL is accessible
- Check your API key has proper permissions
- Ensure your Outline instance allows API access
- "Not configured": Run
outlinecli setupfirst - "API request failed": Check your network connection and credentials
- Editor not found: Set the
EDITORenvironment variable
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Created and maintained by Nils Begou
- Website: nils.begou.dev
- GitHub: nils010485