{"_id":"@3ns/cli","_rev":"5-d8902e7c3103abe1b5b64bc158b1f859","name":"@3ns/cli","dist-tags":{"latest":"1.2.2"},"versions":{"1.0.0":{"name":"@3ns/cli","version":"1.0.0","keywords":["3ns","agent","domain","cli","openclaw","a2a","lobehub"],"author":{"name":"3NS Domains","email":"hello@3ns.domains"},"license":"MIT","_id":"@3ns/cli@1.0.0","maintainers":[{"name":"3ns","email":"at@livetree.com"}],"homepage":"https://3ns.domains","bugs":{"url":"https://github.com/AshleyTuring/3ns-cli/issues"},"bin":{"3ns":"dist/index.js"},"dist":{"shasum":"827f7f771e39913fbd16c6848d532fbbca48e023","tarball":"https://registry.npmjs.org/@3ns/cli/-/cli-1.0.0.tgz","fileCount":51,"integrity":"sha512-9t9iaQ0xDHindV/s5P17S3CATAwP/AwQgPDmPPBJicdgIquOpi/e5DQlGJnM3YCLshilCQRADKtbZbvHaIhI/Q==","signatures":[{"sig":"MEUCIDrvc35pS5qe7fc3pHp8spZMsjAxRNbUAemwac80SqXHAiEA7bals0GvD3XC2FyoEUkxh3B1AOjABN95euX5EbOaEl0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":101274},"main":"dist/index.js","types":"./dist/index.d.ts","engines":{"node":">=18"},"gitHead":"5d9e4cc52353c9e2c94f30b78e44399d38de60fc","scripts":{"dev":"tsc --watch","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"3ns","email":"at@livetree.com"},"repository":{"url":"git+https://github.com/AshleyTuring/3ns-cli.git","type":"git"},"_npmVersion":"11.6.2","description":"Control your 3NS agent domain from the command line","directories":{},"_nodeVersion":"24.13.0","dependencies":{"commander":"^13.1.0","node-fetch":"^3.3.2"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cli_1.0.0_1774968052921_0.688877707474741","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@3ns/cli","version":"1.1.0","keywords":["3ns","agent","domain","cli","openclaw","a2a","lobehub"],"author":{"name":"3NS Domains","email":"hello@3ns.domains"},"license":"MIT","_id":"@3ns/cli@1.1.0","maintainers":[{"name":"3ns","email":"at@livetree.com"}],"homepage":"https://3ns.domains","bugs":{"url":"https://github.com/AshleyTuring/3ns-cli/issues"},"bin":{"3ns":"dist/index.js"},"dist":{"shasum":"171733fea83a3db2beca676b94b7c533c6e4c84b","tarball":"https://registry.npmjs.org/@3ns/cli/-/cli-1.1.0.tgz","fileCount":51,"integrity":"sha512-L7ezJ/qnb02palGoRcZzTdaflDWF8tYMFUOUXUvvztxdYM7Yrc0nOKsz3tGQL1SSzGT3yVSR9W5mDdLr6eJFeg==","signatures":[{"sig":"MEQCIElbh6X3E4BSWdMPtlYE9YBf9xnAY87z5O0nsGTSyaS6AiBWQMQ1UKGhqj6cRu4729tMRXCfHDYxEVrntV6Q0TSA5w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":105227},"main":"dist/index.js","types":"./dist/index.d.ts","engines":{"node":">=18"},"gitHead":"1985562d9ceea8dd3211d8347b062b45202fdbf8","scripts":{"dev":"tsc --watch","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"3ns","email":"at@livetree.com"},"repository":{"url":"git+https://github.com/AshleyTuring/3ns-cli.git","type":"git"},"_npmVersion":"11.6.2","description":"Control your 3NS agent domain from the command line","directories":{},"_nodeVersion":"24.13.0","dependencies":{"commander":"^13.1.0","node-fetch":"^3.3.2"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cli_1.1.0_1774970535304_0.7270121156761169","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@3ns/cli","version":"1.2.0","keywords":["3ns","agent","domain","cli","openclaw","a2a","lobehub"],"author":{"name":"3NS Domains","email":"hello@3ns.domains"},"license":"MIT","_id":"@3ns/cli@1.2.0","maintainers":[{"name":"3ns","email":"at@livetree.com"}],"homepage":"https://3ns.domains","bugs":{"url":"https://github.com/AshleyTuring/3ns-cli/issues"},"bin":{"3ns":"dist/index.js"},"dist":{"shasum":"bf08b115311ecd19a243f8149fb5d73acc23ffdf","tarball":"https://registry.npmjs.org/@3ns/cli/-/cli-1.2.0.tgz","fileCount":51,"integrity":"sha512-XBDM74BsNZTLYFlKSnSDEKp08BbPUJTF6vb9IgQAJ3LsIItSHHdhWGR4rA0Rws5Y78rDgvN2d1EzMO2rAZudXA==","signatures":[{"sig":"MEUCIAm2VW1QvHS4flq9thcgFnw7nPJcH38DH8icrzySH1BUAiEAiYwFuj2GU4MStasHWZmAYyH0ZFNpfffUQk4CuG4qx+Q=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":101233},"main":"dist/index.js","types":"./dist/index.d.ts","engines":{"node":">=18"},"gitHead":"1985562d9ceea8dd3211d8347b062b45202fdbf8","scripts":{"dev":"tsc --watch","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"3ns","email":"at@livetree.com"},"repository":{"url":"git+https://github.com/AshleyTuring/3ns-cli.git","type":"git"},"_npmVersion":"11.6.2","description":"Control your 3NS agent domain from the command line","directories":{},"_nodeVersion":"24.13.0","dependencies":{"commander":"^13.1.0","node-fetch":"^3.3.2"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cli_1.2.0_1774971516847_0.9247793987631798","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"@3ns/cli","version":"1.2.1","keywords":["3ns","agent","domain","cli","openclaw","a2a","lobehub"],"author":{"name":"3NS Domains","email":"hello@3ns.domains"},"license":"MIT","_id":"@3ns/cli@1.2.1","maintainers":[{"name":"3ns","email":"at@livetree.com"}],"homepage":"https://3ns.domains","bugs":{"url":"https://github.com/AshleyTuring/3ns-cli/issues"},"bin":{"3ns":"dist/index.js"},"dist":{"shasum":"b8a9b7b9d2cbae97edc876135a855b45f6a80040","tarball":"https://registry.npmjs.org/@3ns/cli/-/cli-1.2.1.tgz","fileCount":51,"integrity":"sha512-5fvLcmtk/XBBHBL51zmsVMKWw3pdeVOcueptBamzKmwRYMiAneW6b0jpa9B/jPhCA5UiOStBN7Y780TxMoz7ew==","signatures":[{"sig":"MEUCIGw83qPyaS8afCPi0iZ8ReZkZDO6o8S1IR0iFVb70B6VAiEAtpjBGZXb58IrXyu1XrkhnA+bM/OBBBCNGpfv3YGQ8Wg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":102464},"main":"dist/index.js","types":"./dist/index.d.ts","engines":{"node":">=18"},"gitHead":"1985562d9ceea8dd3211d8347b062b45202fdbf8","scripts":{"dev":"tsc --watch","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"3ns","email":"at@livetree.com"},"repository":{"url":"git+https://github.com/AshleyTuring/3ns-cli.git","type":"git"},"_npmVersion":"11.6.2","description":"Control your 3NS agent domain from the command line","directories":{},"_nodeVersion":"24.13.0","dependencies":{"commander":"^13.1.0","node-fetch":"^3.3.2"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cli_1.2.1_1774974939037_0.48977861617173724","host":"s3://npm-registry-packages-npm-production"}},"1.2.2":{"name":"@3ns/cli","version":"1.2.2","description":"Control your 3NS agent domain from the command line","main":"dist/index.js","bin":{"3ns":"dist/index.js"},"scripts":{"build":"tsc","dev":"tsc --watch","start":"node dist/index.js","prepublishOnly":"npm run build"},"keywords":["3ns","agent","domain","cli","openclaw","a2a","lobehub"],"author":{"name":"3NS Domains","email":"hello@3ns.domains"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/AshleyTuring/3ns-cli.git"},"homepage":"https://3ns.domains","engines":{"node":">=18"},"dependencies":{"commander":"^13.1.0","node-fetch":"^3.3.2"},"devDependencies":{"@types/node":"^22.0.0","typescript":"^5.7.0"},"gitHead":"7c2391dcf5070dd93a2c9e6542dff81a465a92b8","types":"./dist/index.d.ts","_id":"@3ns/cli@1.2.2","bugs":{"url":"https://github.com/AshleyTuring/3ns-cli/issues"},"_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-/pDVRHIDvVnqJ+ogC62sNckdWSkhDvlmFocVIJAIUiReAdGPvcln1TcgzPNupm7Q7Z6mwHY7Kd7OZdvUr9DVNg==","shasum":"d386ca70d01ff90c6e554083a83e6a9e86bee5a7","tarball":"https://registry.npmjs.org/@3ns/cli/-/cli-1.2.2.tgz","fileCount":51,"unpackedSize":104359,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDCx/DYIMeB1xMQX2D32O5ddps1ApR05ZpTNA+gvs2ukAIhAPfIa/is/D5S3Sm+qWUUZyMcs0o1Jwl7MC7d7kANGsyR"}]},"_npmUser":{"name":"3ns","email":"at@livetree.com"},"directories":{},"maintainers":[{"name":"3ns","email":"at@livetree.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cli_1.2.2_1774978421241_0.5164397603486162"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-31T14:40:52.835Z","modified":"2026-03-31T17:33:41.493Z","1.0.0":"2026-03-31T14:40:53.097Z","1.1.0":"2026-03-31T15:22:15.462Z","1.2.0":"2026-03-31T15:38:36.993Z","1.2.1":"2026-03-31T16:35:39.184Z","1.2.2":"2026-03-31T17:33:41.395Z"},"bugs":{"url":"https://github.com/AshleyTuring/3ns-cli/issues"},"author":{"name":"3NS Domains","email":"hello@3ns.domains"},"license":"MIT","homepage":"https://3ns.domains","keywords":["3ns","agent","domain","cli","openclaw","a2a","lobehub"],"repository":{"type":"git","url":"git+https://github.com/AshleyTuring/3ns-cli.git"},"description":"Control your 3NS agent domain from the command line","maintainers":[{"name":"3ns","email":"at@livetree.com"}],"readme":"# 3NS CLI\n\n**Your AI agent, your website, your links, your data -- controlled from the command line.**\n\nThe 3NS CLI gives you full control over your [3NS agent domain](https://3ns.domains) without opening a browser. Build a Linktree-style link page, customise your website's look and feel, manage the AI instruction files that power your agent, browse chat history, upload files, discover other agents on the network, and back everything up -- all from your terminal.\n\nDesigned for developers, power users, and AI assistants (OpenClaw, Cursor, LobeHub, and any tool that can run shell commands).\n\n## What You Can Do\n\n| Feature             | What it does                                                                                                                |\n| ------------------- | --------------------------------------------------------------------------------------------------------------------------- |\n| **Links**           | Build a Linktree-style page with custom links, icons, labels, ordering, and visibility toggles                              |\n| **Website Skins**   | Customise every colour, font, chat bubble style, and background image on your 3NS website                                   |\n| **Agent Config**    | Read, write, and create the Markdown instruction files that define your AI agent's personality, knowledge, and capabilities |\n| **Chat History**    | Browse conversations, read full message threads, send new messages, and clean up old chats                                  |\n| **Files**           | Upload documents (PDF, images, anything up to 10 MB), download them, and manage your file library                           |\n| **Agent Discovery** | Search for other agents on the 3NS network, view their capability cards, and send them messages (A2A protocol)              |\n| **Export / Import** | Full backup and restore of your entire agent -- config, chats, files, everything                                            |\n| **Setup Prompt**    | Generate a personalised AI instruction prompt you can paste into any LLM to connect it to your 3NS agent                    |\n\n## Quick Start\n\n```bash\nnpm install -g @3ns/cli\n```\n\nOr use without installing:\n\n```bash\nnpx @3ns/cli --help\n```\n\n### Get Your API Key\n\n1. Sign in at [3ns.domains](https://3ns.domains)\n2. Open the **Export** menu and select **Export to OpenClaw**\n3. Click **Generate API Key**\n4. Copy the key (you'll only see it once)\n\n### Authenticate\n\n```bash\n3ns auth login YOUR_API_KEY\n```\n\nThe CLI verifies your key immediately and shows your agent name. Credentials are stored in `~/.3nsrc` with restricted file permissions (0600).\n\n### Verify\n\n```bash\n3ns auth whoami\n```\n\n---\n\n## Commands\n\n### `3ns auth` -- Authentication\n\n```bash\n3ns auth login <api-key>            # Store API key and verify it\n3ns auth login <key> --base-url URL # Use a custom API endpoint\n3ns auth whoami                     # Show current agent name and key prefix\n3ns auth logout                     # Remove stored credentials\n```\n\n---\n\n### `3ns links` -- Linktree-Style Link Page\n\nManage the links that appear on your 3NS website. Each link has a URL, title, description, icon, platform tag, display order, and active/inactive toggle.\n\n```bash\n# List all your links\n3ns links list\n3ns links list --json\n\n# Add a link with full details\n3ns links add --url https://twitter.com/myhandle --title \"Follow me on X\" --platform twitter --username myhandle\n\n# Add a simple link\n3ns links add --url https://myportfolio.com --title \"My Portfolio\"\n\n# Update a link's title and order\n3ns links update LINK_ID --title \"Updated Title\" --order 1\n\n# Toggle a link's visibility\n3ns links update LINK_ID --active false\n\n# Remove a link\n3ns links remove LINK_ID\n```\n\n**All options for `add` and `update`:**\n\n| Option          | Description                 | Example                                                                     |\n| --------------- | --------------------------- | --------------------------------------------------------------------------- |\n| `--url`         | Link URL (required for add) | `https://youtube.com/@me`                                                   |\n| `--title`       | Display title               | `\"My YouTube Channel\"`                                                      |\n| `--description` | Short description           | `\"Weekly tech videos\"`                                                      |\n| `--icon`        | Icon URL or emoji           | `\"https://example.com/icon.png\"`                                            |\n| `--platform`    | Platform key                | `twitter`, `instagram`, `youtube`, `github`, `linkedin`, `tiktok`, `custom` |\n| `--username`    | Username for the platform   | `myhandle`                                                                  |\n| `--order`       | Display order (integer)     | `1`                                                                         |\n| `--active`      | Visible on site             | `true` or `false`                                                           |\n\n---\n\n### `3ns models` -- Available AI Models\n\nList all AI models you can use with your agent. Filter by provider, or use `--json` for scripting.\n\n```bash\n# List all available models\n3ns models\n\n# Filter by provider\n3ns models --provider openai\n3ns models --provider google\n3ns models --provider anthropic\n3ns models --provider xai\n\n# JSON output for scripting\n3ns models --json\n```\n\nOutput includes model name (for use with `--model`), display label, provider, and context window size.\n\n**Currently available (21 models):**\n\n| Provider | Models |\n|---|---|\n| Google (Vertex AI) | Gemini 2.0 Flash, 2.5 Flash, 2.5 Pro, 3 Flash, 3 Pro |\n| OpenAI | GPT-4o, GPT-4o Mini, GPT-4.1, GPT-4.1 Mini, GPT-5 Mini, GPT-5.1, GPT-5.2, O3 |\n| Anthropic | Claude 4.5 Haiku, Claude 4.5 Sonnet, Claude 4 Opus, Claude Sonnet 4.6, Claude Opus 4.6 |\n| xAI | Grok 4, Grok 4 Fast, Grok 4.1 Fast |\n| Self-hosted | Any Ollama model (configured separately via the dashboard) |\n\n---\n\n### `3ns skins` -- Website Appearance\n\nFull control over your 3NS website's visual design. Change colours, fonts, background images, chat bubble styles, button appearance, and more.\n\n```bash\n# View your current skin\n3ns skins get\n3ns skins get --json\n\n# Update individual properties\n3ns skins update --theme \"midnight\" --bg-color \"#0a0a2e\" --font-color \"#e0e0ff\"\n\n# Set chat bubble colours\n3ns skins update --chat-bubble-color \"#1a1a3e\" --user-bubble-color \"#2a2a5e\" \\\n  --chat-bubble-font \"#ffffff\" --user-bubble-font \"#ffffff\"\n\n# Style buttons\n3ns skins update --button-color \"#4a90d9\" --button-font-color \"#ffffff\" \\\n  --button-border \"#6ab0ff\" --button-bg \"#2a2a5e\"\n\n# Change the font\n3ns skins update --font-family \"Inter\"\n\n# Upload a background image (jpg, png, gif, webp -- max 10 MB)\n3ns skins upload-bg ./my-background.jpg\n3ns skins upload-bg ./desktop-bg.png --target desktop\n\n# Browse preset themes\n3ns skins presets\n3ns skins presets --json\n```\n\n**All skin properties:**\n\n| Option                | Description                       |\n| --------------------- | --------------------------------- |\n| `--theme`             | Theme preset name                 |\n| `--bg-color`          | Background colour (hex)           |\n| `--bg-image`          | Background image URL              |\n| `--bg-image-desktop`  | Desktop-only background image URL |\n| `--video`             | Background video URL              |\n| `--font-color`        | Main text colour                  |\n| `--font-family`       | Font family name                  |\n| `--button-color`      | Button colour                     |\n| `--button-font-color` | Button font colour                |\n| `--button-border`     | Button border colour              |\n| `--button-bg`         | Button background colour          |\n| `--hover-color`       | Hover state colour                |\n| `--chat-bubble-color` | Agent chat bubble background      |\n| `--user-bubble-color` | User chat bubble background       |\n| `--chat-bubble-font`  | Agent chat bubble text colour     |\n| `--user-bubble-font`  | User chat bubble text colour      |\n\n---\n\n### `3ns config` -- Agent Instruction Files\n\nYour agent's brain lives in Markdown files. These instruction files control your agent's personality, knowledge, capabilities, and behaviour. Edit them to shape how your AI responds.\n\n```bash\n# List all folders containing instruction files\n3ns config folders\n3ns config folders --json\n\n# Read a document\n3ns config read DOC_ID\n3ns config read DOC_ID --json\n\n# Update a document from a local file\n3ns config write DOC_ID --file ./my-new-instructions.md\n\n# Update with inline content\n3ns config write DOC_ID --content \"# Updated Instructions\\nYou are a helpful cooking assistant.\"\n\n# Create a new document in a folder (skips if it already exists)\n3ns config ensure FOLDER_ID --name capabilities.md --content \"# My Agent's Skills\"\n3ns config ensure FOLDER_ID --name personality.md --file ./personality.md\n```\n\n**What to put in instruction files:**\n\n- **Instructions** -- How your agent should behave, its tone, personality, and rules\n- **Knowledge** -- Facts, product information, company details your agent should know\n- **Capabilities** -- What your agent can do, tools it has access to\n- **Permissions** -- What topics your agent should avoid or handle carefully\n\n---\n\n### `3ns chats` -- Chat with Your Agent\n\nSend a message and get an AI response. The chat folder is auto-detected so you can just send a message.\n\n```bash\n# Send a message and get an AI response\n3ns chats send \"What can you help me with?\"\n\n# Use a specific AI model for this message\n3ns chats send \"Summarise this document\" --model openai/gpt-5.2\n3ns chats send \"Write a poem\" --model anthropic/claude-4-opus\n\n# Continue an existing conversation\n3ns chats send \"Tell me more about that\" --chat-id 1743435000000\n\n# Send with an image/file attachment (upload first, then pass the URL)\n3ns files upload ./photo.jpg --folder FOLDER_ID       # note the returned URL\n3ns chats send \"What's in this image?\" --attachment https://storage.googleapis.com/.../photo.jpg\n\n# Multiple attachments\n3ns chats send \"Compare these\" --attachment URL1 --attachment URL2\n\n# List all conversations (most recent first)\n3ns chats list\n3ns chats list --json\n\n# View full messages in a chat\n3ns chats history CHAT_ID\n3ns chats history CHAT_ID --json\n\n# Delete a chat and all its messages\n3ns chats delete CHAT_ID\n```\n\nUse `--model` to override the default model for a single message. Run `3ns models` to see all valid model names. Ollama models are also supported with `ollamadynamic/MODEL_NAME`.\n\n**Attachment workflow:** Upload the file first with `3ns files upload`, then pass the returned URL via `--attachment`. The MIME type is auto-detected from the file extension. Supported: jpg, png, gif, webp, svg, pdf, mp3, wav, mp4.\n\n---\n\n### `3ns files` -- File Management\n\nUpload, download, and manage files attached to your agent (PDFs, images, documents -- up to 10 MB each).\n\n```bash\n# List all uploaded files\n3ns files list\n3ns files list --json\n\n# Upload a file to a specific folder\n3ns files upload ./report.pdf --folder FOLDER_ID\n3ns files upload ./photo.jpg --folder FOLDER_ID --name \"team-photo.jpg\"\n3ns files upload ./data.csv --folder FOLDER_ID --type \"text/csv\"\n\n# Download a file\n3ns files download FILE_ID -o ./downloaded-report.pdf\n\n# Delete a file\n3ns files delete FILE_ID\n```\n\n---\n\n### `3ns agents` -- Discovery & Communication\n\nFind other agents on the 3NS network and communicate with them using the Agent-to-Agent (A2A) protocol.\n\n```bash\n# Search for agents by keyword\n3ns agents search \"cooking\"\n3ns agents search \"finance\" --json\n\n# View an agent's full capability card\n3ns agents card SPACE_ID\n3ns agents card SPACE_ID --json\n\n# Send a message to another agent\n3ns agents chat SPACE_ID \"Can you help me plan a dinner menu?\"\n\n# List your own agent spaces\n3ns agents list\n```\n\n---\n\n### `3ns export` / `3ns import` -- Backup & Restore\n\nBack up your entire agent (config, chats, files) to a single JSON file, or restore from a backup. Migrate between accounts or keep local snapshots.\n\n```bash\n# Full backup\n3ns export -o my-agent-backup.json\n\n# Backup without chat history\n3ns export --no-chats -o config-only.json\n\n# Backup without files\n3ns export --no-files -o lightweight-backup.json\n\n# Restore from backup\n3ns import my-agent-backup.json\n```\n\n---\n\n### `3ns openclaw` -- Setup Prompt\n\nGet your personalised AI setup prompt to connect any AI assistant to your 3NS agent.\n\n```bash\n# Get your setup prompt (formatted)\n3ns openclaw setup-prompt\n\n# Get raw prompt text (pipe to clipboard)\n3ns openclaw setup-prompt --raw\n3ns openclaw setup-prompt --raw | pbcopy        # macOS\n3ns openclaw setup-prompt --raw | clip           # Windows\n3ns openclaw setup-prompt --raw | xclip -sel c   # Linux\n```\n\n---\n\n## JSON Output\n\nEvery list command supports `--json` for machine-readable output, making the CLI easy to pipe into other tools:\n\n```bash\n3ns links list --json | jq '.[0].url'\n3ns agents search \"finance\" --json | jq '.[] | .name'\n3ns skins get --json | jq '.themeName'\n```\n\n---\n\n## Full API Coverage\n\nThe CLI provides complete parity with the 3NS web dashboard. Everything you can do on the website, you can do from the command line.\n\n| Feature                | CLI Command                 | API Endpoint                 | Method                    |\n| ---------------------- | --------------------------- | ---------------------------- | ------------------------- |\n| Profile & metadata     | `3ns auth whoami` (GET)     | `/openclaw/profile`          | GET / PUT (PUT via API)   |\n| Default AI model       | via API                     | `/openclaw/model`            | GET / PUT                 |\n| Website passcode       | via API                     | `/openclaw/passcode`         | GET / PUT                 |\n| Links (CRUD)           | `3ns links`                 | `/openclaw/links`            | GET / POST / PUT / DELETE |\n| Website skin           | `3ns skins`                 | `/openclaw/skins`            | GET / PUT                 |\n| Skin background upload | `3ns skins upload-bg`       | `/openclaw/skins/upload`     | POST                      |\n| Skin presets           | `3ns skins presets`         | `/openclaw/skins/presets`    | GET                       |\n| Config folders         | `3ns config folders`        | `/openclaw/config/folders`   | GET                       |\n| Config documents       | `3ns config read/write`     | `/openclaw/config/documents` | GET / PUT / POST          |\n| Available AI models    | `3ns models`                | `/openclaw/models`           | GET                       |\n| Chat (send + AI reply) | `3ns chats send`            | `/openclaw/chats`            | GET / POST / DELETE       |\n| File management        | `3ns files`                 | `/openclaw/files`            | GET / POST / DELETE       |\n| Agent search           | `3ns agents search`         | `/openclaw/agents/search`    | GET                       |\n| Agent card             | `3ns agents card`           | `/openclaw/agents/:id/card`  | GET                       |\n| A2A messaging          | `3ns agents chat`           | `/openclaw/agents/:id/chat`  | POST                      |\n| Export                 | `3ns export`                | `/openclaw/export`           | POST                      |\n| Import                 | `3ns import`                | `/openclaw/import`           | POST                      |\n| Setup prompt           | `3ns openclaw setup-prompt` | `/openclaw/setup-prompt`     | GET                       |\n| Payment settings       | via API                     | `/openclaw/profile`          | PUT                       |\n\n---\n\n## Security\n\n- **Per-user API keys** -- Your key is SHA-256 hashed before storage. The plaintext is shown once at generation time and cannot be retrieved.\n- **User isolation** -- Your key can only access your own data. One user cannot view or modify another user's links, config, chats, files, or skins.\n- **Folder ownership** -- Document and file operations verify that the target folder belongs to you.\n- **Upload limits** -- Max 10 MB per file. Skin background uploads accept images only (jpeg, png, gif, webp). Filenames are sanitized automatically.\n- **Secure storage** -- Credentials in `~/.3nsrc` are written with 0600 permissions (owner-only read/write).\n\n---\n\n## Configuration\n\n### Credentials file\n\nStored at `~/.3nsrc`:\n\n```json\n{\n  \"apiKey\": \"your-api-key\",\n  \"baseUrl\": \"https://us-central1-prod3ns.cloudfunctions.net/openclaw/openclaw\"\n}\n```\n\n### Custom API endpoint\n\n```bash\n3ns auth login YOUR_KEY --base-url https://your-custom-endpoint/openclaw\n```\n\n### Environment variable override\n\n```bash\nexport THREENS_API_URL=https://us-central1-prod3ns.cloudfunctions.net/openclaw/openclaw\n```\n\nDefault: `https://us-central1-prod3ns.cloudfunctions.net/openclaw/openclaw`\n\n---\n\n## For AI Agents\n\nThis CLI is built to be used by AI assistants. Generate a complete instruction prompt and paste it into any LLM:\n\n```bash\n# Copy setup prompt to clipboard\n3ns openclaw setup-prompt --raw | pbcopy   # macOS\n3ns openclaw setup-prompt --raw | clip     # Windows\n```\n\nThe prompt includes your agent name, API key prefix, base URL, and every available endpoint with usage examples. Paste it into OpenClaw, Cursor, LobeHub, ChatGPT, Claude, or any AI assistant to give it full access to your 3NS agent.\n\n---\n\n## Requirements\n\n- Node.js 18+\n- A 3NS account with a domain at [3ns.domains](https://3ns.domains)\n\n## Development\n\n```bash\ngit clone https://github.com/AshleyTuring/3ns-cli.git\ncd 3ns-cli\nnpm install\nnpm run build\nnode dist/index.js --help\n```\n\n## Links\n\n- **Website:** [3ns.domains](https://3ns.domains)\n- **FAQ:** [3ns.domains/faq](https://3ns.domains/faq)\n- **GitHub:** [github.com/AshleyTuring/3ns-cli](https://github.com/AshleyTuring/3ns-cli)\n\n## License\n\nMIT\n","readmeFilename":"README.md"}