Skip to main content

Thin CLI for the Cairn local-first file-organization harness: scriptable file ops, a local HTTP API (serve), and the MCP server launcher.

Project description

cairn-cli

A thin command-line interface over cairn-core. Standard-library only.

uvx cairn --workspace ~/Documents/notes ls

Commands

cairn [--workspace DIR] [--json] <command>

  ls [path]                  list a directory
  tree [path]                show the file tree
  read <path>                print a file (flattened .uni text)
  create <path> [content]    create a file ('-' reads stdin)
  mkdir <path>               create a folder
  mv <path> <target_dir>     move a file/folder
  rename <path> <new_name>   rename in place
  rm <path>                  delete
  edit <path> <old> <new>    replace a unique occurrence
  import <path> [--all]      convert docx/pdf/pptx/csv/xlsx/md into .uni
  grep <pattern> [path]      search file contents
  find <query> [path]        search file names
  tag <path> [tags...]       get (no args) or set tags
  tags                       show the workspace tag tree
  retrieve <query> [-k N]    find relevant documents

  serve [--host H --port N]  run the local HTTP API (contract for the web UI)
  mcp                        run the MCP server (stdio) for Claude Code / Codex

--json makes any command emit machine-readable JSON.

Examples

export CAIRN_WORKSPACE=~/Documents/notes
cairn tree
echo "meeting notes" | cairn create inbox/2026-07-16.uni -
cairn tag inbox/2026-07-16.uni meetings q3
cairn retrieve "budget planning" -k 5
cairn serve            # http://127.0.0.1:4177/api/health

Three faces, one core

cairn (this CLI), cairn-mcp (the MCP server), and the planned web UI are all thin adapters over cairn-core, so they can never drift. Use the CLI for scripting, mcp inside Claude Code / Codex, and serve to back the web UI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cairn_cli-0.2.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file cairn_cli-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: cairn_cli-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for cairn_cli-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8e3aa722409e4404ba4f8c2da13e740d38dceea4f8c7be27fd2873e19e617eb0
MD5 bb07b677ceaa6bf9198dc2d1595bc07d
BLAKE2b-256 4b2f7a1d6f8402b578afc4c66e022e14ac9c006c71957dde18fd00e99e974ad3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page